|
| 1 | +package v1beta1 |
| 2 | + |
| 3 | +// import "encoding/json" |
| 4 | + |
| 5 | +// +kubebuilder:validation:Enum:=x86_64;aarch64 |
| 6 | +type Arch string |
| 7 | + |
| 8 | +// +kubebuilder:validation:Enum:=seabios;ovmf |
| 9 | +type BIOS string |
| 10 | + |
| 11 | +// +kubebuilder:validation:Enum:=0;2;1024 |
| 12 | +type HugePages int |
| 13 | + |
| 14 | +// +kubebuilder:validation:Enum:=backup;clone;create;migrate;rollback;snapshot;snapshot-delete;suspending;suspended |
| 15 | +type Lock string |
| 16 | + |
| 17 | +// +kubebuilder:validation:Enum:=other;wxp;w2k;w2k3;w2k8;wvista;win7;win8;win10;win11;l24;l26;solaris |
| 18 | +type OSType string |
| 19 | + |
| 20 | +// Options |
| 21 | +type Options struct { |
| 22 | + // Enable/Disable ACPI. Defaults to true. |
| 23 | + ACPI bool `json:"acpi,omitempty"` |
| 24 | + |
| 25 | + // Virtual processor architecture. Defaults to the host. x86_64 or aarch64. |
| 26 | + Arch Arch `json:"arch,omitempty"` |
| 27 | + |
| 28 | + // +kubebuilder:validation:Minimum:=0 |
| 29 | + // Amount of target RAM for the VM in MiB. Using zero disables the ballon driver. |
| 30 | + Balloon int `json:"balloon,omitempty"` |
| 31 | + |
| 32 | + // Description for the VM. Shown in the web-interface VM's summary. |
| 33 | + // This is saved as comment inside the configuration file. |
| 34 | + Description string `json:"description,omitempty"` |
| 35 | + |
| 36 | + // Script that will be executed during various steps in the vms lifetime. |
| 37 | + // HookScripts []Hookscript `json:"hookScripts,omitempty"` |
| 38 | + |
| 39 | + // enable hotplug feature. list og devices. |
| 40 | + // network, disk, cpu, memory, usb. Defaults to [network, disk, usb]. |
| 41 | + // HotPlug []HotPlugDevice `json:"hotPlug,omitempty"` |
| 42 | + |
| 43 | + // enable/disable hugepages memory. 0 or 2 or 1024. 0 indicated 'any' |
| 44 | + HugePages HugePages `json:"hugePages,omitempty"` |
| 45 | + |
| 46 | + // Use together with hugepages. If enabled, hugepages will not not be deleted |
| 47 | + // after VM shutdown and can be used for subsequent starts. Defaults to false. |
| 48 | + KeepHugePages bool `json:"keepHugePages,omitempty"` |
| 49 | + |
| 50 | + // Enable/disable KVM hardware virtualization. Defaults to true. |
| 51 | + KVM bool `json:"kvm,omitempty"` |
| 52 | + |
| 53 | + // Set the real time clock (RTC) to local time. |
| 54 | + // This is enabled by default if the `ostype` indicates a Microsoft Windows OS. |
| 55 | + LocalTime bool `json:"localTime,omitempty"` |
| 56 | + |
| 57 | + // Lock/unlock the VM. |
| 58 | + Lock Lock `json:"lock,omitempty"` |
| 59 | + |
| 60 | + // Set maximum tolerated downtime (in seconds) for migrations. |
| 61 | + // MigrateDowntime json.Number `json:"migrateDowntime,omitempty"` |
| 62 | + |
| 63 | + // Set maximum speed (in MB/s) for migrations. Value 0 is no limit. |
| 64 | + // MigrateSpeed `json:"migrateSpeed,omitempty"` |
| 65 | + |
| 66 | + // Enable/disable NUMA. |
| 67 | + NUMA bool `json:"numa,omitempty"` |
| 68 | + |
| 69 | + // Specifies whether a VM will be started during system bootup. |
| 70 | + OnBoot bool `json:"onBoot,omitempty"` |
| 71 | + |
| 72 | + // Specify guest operating system. This is used to enable special |
| 73 | + // optimization/features for specific operating systems. |
| 74 | + OSType OSType `json:"osType,omitempty"` |
| 75 | + |
| 76 | + // Sets the protection flag of the VM. |
| 77 | + // This will disable the remove VM and remove disk operations. |
| 78 | + // Defaults to false. |
| 79 | + Protection bool `json:"protection,omitempty"` |
| 80 | + |
| 81 | + // Allow reboot. If set to 'false' the VM exit on reboot. |
| 82 | + // Defaults to true. |
| 83 | + Reboot bool `json:"reboot,omitempty"` |
| 84 | + |
| 85 | + // +kubebuilder:validation:Minimum:=0 |
| 86 | + // +kubebuilder:validation:Maximum:=5000 |
| 87 | + // Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. |
| 88 | + // Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. |
| 89 | + // Auto-ballooning is done by pvestatd. 0 ~ 5000. Defaults to 1000. |
| 90 | + Shares int `json:"shares,omitempty"` |
| 91 | + |
| 92 | + // Set the initial date of the real time clock. |
| 93 | + // Valid format for date are:'now' or '2006-06-17T16:01:21' or '2006-06-17'. |
| 94 | + // Defaults to 'now'. |
| 95 | + // StartDate string `json:"startDate,omitempty"` |
| 96 | + |
| 97 | + // StartUp string `json:"startUp,omitempty` |
| 98 | + |
| 99 | + // Enable/disable the USB tablet device. This device is usually needed to allow |
| 100 | + // absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. |
| 101 | + // If you're running lots of console-only guests on one host, |
| 102 | + // you may consider disabling this to save some context switches. |
| 103 | + // This is turned off by default if you use spice (`qm set <vmid> --vga qxl`). |
| 104 | + // Defaults to true. |
| 105 | + Tablet bool `json:"tablet,omitempty"` |
| 106 | + |
| 107 | + // Tags of the VM. This is only meta information. |
| 108 | + Tags []string `json:"tags,omitempty"` |
| 109 | + |
| 110 | + // Enable/disable time drift fix. Defaults to false. |
| 111 | + TimeDriftFix bool `json:"timeDriftFix,omitempty"` |
| 112 | + |
| 113 | + // Enable/disable Template. Defaults to false. |
| 114 | + Template bool `json:"template,omitempty"` |
| 115 | + |
| 116 | + // TPMState string `json:"tpmState,omitempty"` |
| 117 | + |
| 118 | + // +kubebuilder:validation:Minimum:=0 |
| 119 | + // Number of hotplugged vcpus. Defaults to 0. |
| 120 | + VCPUs int `json:"vcpus,omitempty"` |
| 121 | + |
| 122 | + // VGA string `json:"vga,omitempty"` |
| 123 | + |
| 124 | + // The VM generation ID (vmgenid) device exposes a 128-bit integer value identifier to the guest OS. |
| 125 | + // This allows to notify the guest operating system when the virtual machine is executed with a different configuration |
| 126 | + // (e.g. snapshot execution or creation from a template). |
| 127 | + // The guest operating system notices the change, and is then able to react as appropriate by marking its copies of distributed databases as dirty, |
| 128 | + // re-initializing its random number generator, etc. |
| 129 | + // Note that auto-creation only works when done through API/CLI create or update methods, but not when manually editing the config file. |
| 130 | + // regex: (?:[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}|[01]). Defaults to 1 (autogenerated) |
| 131 | + VMGenerationID string `json:"vmGenerationID,omitempty"` |
| 132 | + |
| 133 | + // Default storage for VM state volumes/files. |
| 134 | + // VMStateStorage string `json:"vmStateStorage,omitempty"` |
| 135 | + |
| 136 | + // Create a virtual hardware watchdog device. Once enabled (by a guest action), |
| 137 | + // the watchdog must be periodically polled by an agent inside the guest or else |
| 138 | + // the watchdog will reset the guest (or execute the respective action specified) |
| 139 | + // WatchDog string `json:"watchDog,omitempty"` |
| 140 | +} |
0 commit comments