virtualmachine.yaml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. apiVersion: kubevirt.io/v1alpha3
  2. kind: VirtualMachine
  3. metadata:
  4. labels:
  5. kubevirt.io/vm: vm-$1-datavolume
  6. name: vm-$1-datavolume
  7. spec:
  8. dataVolumeTemplates:
  9. - metadata:
  10. name: vm-$1-datavolume-data-volume
  11. spec:
  12. pvc:
  13. accessModes:
  14. - ReadWriteMany
  15. resources:
  16. requests:
  17. storage: 80Gi
  18. volumeMode: Block
  19. storageClassName: linstor-kubevirt-storage0
  20. source:
  21. http:
  22. url: https://jenkins.corp1.majordomo.ru/job/nixos/job/nixos%252Fkubevirt/job/master/lastSuccessfulBuild/artifact/nixos.qcow2
  23. running: true
  24. template:
  25. metadata:
  26. labels:
  27. kubevirt.io/vm: vm-$1-datavolume
  28. spec:
  29. domain:
  30. cpu:
  31. cores: 4
  32. sockets: 1
  33. threads: 1
  34. devices:
  35. interfaces:
  36. - masquerade: {}
  37. model: virtio
  38. name: default
  39. disks:
  40. - disk:
  41. bus: virtio
  42. name: vm-$1-datavolume-data-volume-disk
  43. - disk:
  44. bus: virtio
  45. name: serviceaccountdisk
  46. resources:
  47. overcommitGuestOverhead: true
  48. requests:
  49. cpu: 2000m
  50. memory: 2048M
  51. limits:
  52. cpu: 4000m
  53. memory: 8G
  54. firmware:
  55. bootloader:
  56. efi:
  57. secureBoot: false
  58. memory:
  59. guest: 8G
  60. volumes:
  61. - name: vm-$1-datavolume-data-volume-disk
  62. dataVolume:
  63. name: vm-$1-datavolume-data-volume
  64. - name: serviceaccountdisk
  65. serviceAccount:
  66. serviceAccountName: default
  67. networks:
  68. - name: default
  69. pod: {}
  70. # livenessProbe:
  71. # tcpSocket:
  72. # port: 22
  73. # # 3 minutes for boot
  74. # initialDelaySeconds: 300