1pub struct ConfigClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> ConfigClient<T>
6where
7 T: crate::client::Client,
8{
9 pub fn new(client: T, parent_path: &str) -> Self {
10 Self {
11 client,
12 path: format!("{}{}", parent_path, "/config"),
13 }
14 }
15}
16impl<T> ConfigClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Get the virtual machine configuration with pending configuration changes applied. Set the 'current' parameter to get the current configuration instead."]
21 pub fn get(&self, params: GetParams) -> Result<GetOutput, T::Error> {
22 let path = self.path.to_string();
23 self.client.get(&path, ¶ms)
24 }
25}
26impl<T> ConfigClient<T>
27where
28 T: crate::client::Client,
29{
30 #[doc = "Set virtual machine options (asynchrounous API)."]
31 pub fn post(&self, params: PostParams) -> Result<Option<String>, T::Error> {
32 let path = self.path.to_string();
33 self.client.post(&path, ¶ms)
34 }
35}
36impl<T> ConfigClient<T>
37where
38 T: crate::client::Client,
39{
40 #[doc = "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation."]
41 pub fn put(&self, params: PutParams) -> Result<(), T::Error> {
42 let path = self.path.to_string();
43 self.client.put(&path, ¶ms)
44 }
45}
46impl GetOutput {
47 pub fn new(digest: String) -> Self {
48 Self {
49 digest,
50 acpi: Default::default(),
51 affinity: Default::default(),
52 agent: Default::default(),
53 arch: Default::default(),
54 args: Default::default(),
55 audio0: Default::default(),
56 autostart: Default::default(),
57 balloon: Default::default(),
58 bios: Default::default(),
59 boot: Default::default(),
60 bootdisk: Default::default(),
61 cdrom: Default::default(),
62 cicustom: Default::default(),
63 cipassword: Default::default(),
64 citype: Default::default(),
65 ciupgrade: Default::default(),
66 ciuser: Default::default(),
67 cores: Default::default(),
68 cpu: Default::default(),
69 cpulimit: Default::default(),
70 cpuunits: Default::default(),
71 description: Default::default(),
72 efidisk0: Default::default(),
73 freeze: Default::default(),
74 hookscript: Default::default(),
75 hostpcis: Default::default(),
76 hotplug: Default::default(),
77 hugepages: Default::default(),
78 ides: Default::default(),
79 ipconfigs: Default::default(),
80 ivshmem: Default::default(),
81 keephugepages: Default::default(),
82 keyboard: Default::default(),
83 kvm: Default::default(),
84 localtime: Default::default(),
85 lock: Default::default(),
86 machine: Default::default(),
87 memory: Default::default(),
88 migrate_downtime: Default::default(),
89 migrate_speed: Default::default(),
90 name: Default::default(),
91 nameserver: Default::default(),
92 nets: Default::default(),
93 numa: Default::default(),
94 numas: Default::default(),
95 onboot: Default::default(),
96 ostype: Default::default(),
97 parallels: Default::default(),
98 protection: Default::default(),
99 reboot: Default::default(),
100 rng0: Default::default(),
101 satas: Default::default(),
102 scsis: Default::default(),
103 scsihw: Default::default(),
104 searchdomain: Default::default(),
105 serials: Default::default(),
106 shares: Default::default(),
107 smbios1: Default::default(),
108 smp: Default::default(),
109 sockets: Default::default(),
110 spice_enhancements: Default::default(),
111 sshkeys: Default::default(),
112 startdate: Default::default(),
113 startup: Default::default(),
114 tablet: Default::default(),
115 tags: Default::default(),
116 tdf: Default::default(),
117 template: Default::default(),
118 tpmstate0: Default::default(),
119 unuseds: Default::default(),
120 usbs: Default::default(),
121 vcpus: Default::default(),
122 vga: Default::default(),
123 virtios: Default::default(),
124 vmgenid: Default::default(),
125 vmstatestorage: Default::default(),
126 watchdog: Default::default(),
127 additional_properties: Default::default(),
128 }
129 }
130}
131#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
132pub struct GetOutput {
133 #[serde(
134 serialize_with = "crate::types::serialize_bool_optional",
135 deserialize_with = "crate::types::deserialize_bool_optional"
136 )]
137 #[serde(skip_serializing_if = "Option::is_none", default)]
138 #[doc = "Enable/disable ACPI."]
139 pub acpi: Option<bool>,
140 #[serde(skip_serializing_if = "Option::is_none", default)]
141 #[doc = "List of host cores used to execute guest processes, for example: 0,5,8-11"]
142 pub affinity: Option<String>,
143 #[serde(skip_serializing_if = "Option::is_none", default)]
144 #[doc = "Enable/disable communication with the QEMU Guest Agent and its properties."]
145 pub agent: Option<String>,
146 #[serde(skip_serializing_if = "Option::is_none", default)]
147 #[doc = "Virtual processor architecture. Defaults to the host."]
148 pub arch: Option<Arch>,
149 #[serde(skip_serializing_if = "Option::is_none", default)]
150 #[doc = "Arbitrary arguments passed to kvm."]
151 #[doc = "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -smbios 'type=0,vendor=FOO'\n\nNOTE: this option is for experts only.\n"]
152 pub args: Option<String>,
153 #[serde(skip_serializing_if = "Option::is_none", default)]
154 #[doc = "Configure a audio device, useful in combination with QXL/Spice."]
155 pub audio0: Option<String>,
156 #[serde(
157 serialize_with = "crate::types::serialize_bool_optional",
158 deserialize_with = "crate::types::deserialize_bool_optional"
159 )]
160 #[serde(skip_serializing_if = "Option::is_none", default)]
161 #[doc = "Automatic restart after crash (currently ignored)."]
162 pub autostart: Option<bool>,
163 #[serde(
164 serialize_with = "crate::types::serialize_int_optional",
165 deserialize_with = "crate::types::deserialize_int_optional"
166 )]
167 #[serde(skip_serializing_if = "Option::is_none", default)]
168 #[doc = "Amount of target RAM for the VM in MiB. Using zero disables the ballon driver."]
169 pub balloon: Option<u64>,
170 #[serde(skip_serializing_if = "Option::is_none", default)]
171 #[doc = "Select BIOS implementation."]
172 pub bios: Option<Bios>,
173 #[serde(skip_serializing_if = "Option::is_none", default)]
174 #[doc = "Specify guest boot order. Use the 'order=' sub-property as usage with no key or 'legacy=' is deprecated."]
175 pub boot: Option<String>,
176 #[serde(skip_serializing_if = "Option::is_none", default)]
177 #[doc = "Enable booting from specified disk. Deprecated: Use 'boot: order=foo;bar' instead."]
178 pub bootdisk: Option<String>,
179 #[serde(skip_serializing_if = "Option::is_none", default)]
180 #[doc = "This is an alias for option -ide2"]
181 pub cdrom: Option<String>,
182 #[serde(skip_serializing_if = "Option::is_none", default)]
183 #[doc = "cloud-init: Specify custom files to replace the automatically generated ones at start."]
184 pub cicustom: Option<String>,
185 #[serde(skip_serializing_if = "Option::is_none", default)]
186 #[doc = "cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords."]
187 pub cipassword: Option<String>,
188 #[serde(skip_serializing_if = "Option::is_none", default)]
189 #[doc = "Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows."]
190 pub citype: Option<Citype>,
191 #[serde(
192 serialize_with = "crate::types::serialize_bool_optional",
193 deserialize_with = "crate::types::deserialize_bool_optional"
194 )]
195 #[serde(skip_serializing_if = "Option::is_none", default)]
196 #[doc = "cloud-init: do an automatic package upgrade after the first boot."]
197 pub ciupgrade: Option<bool>,
198 #[serde(skip_serializing_if = "Option::is_none", default)]
199 #[doc = "cloud-init: User name to change ssh keys and password for instead of the image's configured default user."]
200 pub ciuser: Option<String>,
201 #[serde(
202 serialize_with = "crate::types::serialize_int_optional",
203 deserialize_with = "crate::types::deserialize_int_optional"
204 )]
205 #[serde(skip_serializing_if = "Option::is_none", default)]
206 #[doc = "The number of cores per socket."]
207 pub cores: Option<u64>,
208 #[serde(skip_serializing_if = "Option::is_none", default)]
209 #[doc = "Emulated CPU type."]
210 pub cpu: Option<String>,
211 #[serde(
212 serialize_with = "crate::types::serialize_number_optional",
213 deserialize_with = "crate::types::deserialize_number_optional"
214 )]
215 #[serde(skip_serializing_if = "Option::is_none", default)]
216 #[doc = "Limit of CPU usage."]
217 #[doc = "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit."]
218 pub cpulimit: Option<f64>,
219 #[serde(skip_serializing_if = "Option::is_none", default)]
220 #[doc = "CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2."]
221 #[doc = "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs."]
222 pub cpuunits: Option<()>,
223 #[serde(skip_serializing_if = "Option::is_none", default)]
224 #[doc = "Description for the VM. Shown in the web-interface VM's summary. This is saved as comment inside the configuration file."]
225 pub description: Option<String>,
226 #[doc = "SHA1 digest of configuration file. This can be used to prevent concurrent modifications."]
227 pub digest: String,
228 #[serde(skip_serializing_if = "Option::is_none", default)]
229 #[doc = "Configure a disk for storing EFI vars."]
230 pub efidisk0: Option<String>,
231 #[serde(
232 serialize_with = "crate::types::serialize_bool_optional",
233 deserialize_with = "crate::types::deserialize_bool_optional"
234 )]
235 #[serde(skip_serializing_if = "Option::is_none", default)]
236 #[doc = "Freeze CPU at startup (use 'c' monitor command to start execution)."]
237 pub freeze: Option<bool>,
238 #[serde(skip_serializing_if = "Option::is_none", default)]
239 #[doc = "Script that will be executed during various steps in the vms lifetime."]
240 pub hookscript: Option<String>,
241 #[serde(rename = "hostpci[n]")]
242 #[serde(
243 serialize_with = "crate::types::serialize_multi::<NumberedHostpcis, _>",
244 deserialize_with = "crate::types::deserialize_multi::<NumberedHostpcis, _>"
245 )]
246 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
247 #[serde(flatten)]
248 #[doc = "Map host PCI devices into guest."]
249 #[doc = "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer\npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"]
250 pub hostpcis: ::std::collections::HashMap<u32, String>,
251 #[serde(skip_serializing_if = "Option::is_none", default)]
252 #[doc = "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory', 'usb' and 'cloudinit'. Use '0' to disable hotplug completely. Using '1' as value is an alias for the default `network,disk,usb`. USB hotplugging is possible for guests with machine version \\>= 7.1 and ostype l26 or windows \\> 7."]
253 pub hotplug: Option<String>,
254 #[serde(skip_serializing_if = "Option::is_none", default)]
255 #[doc = "Enable/disable hugepages memory."]
256 pub hugepages: Option<Hugepages>,
257 #[serde(rename = "ide[n]")]
258 #[serde(
259 serialize_with = "crate::types::serialize_multi::<NumberedIdes, _>",
260 deserialize_with = "crate::types::deserialize_multi::<NumberedIdes, _>"
261 )]
262 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
263 #[serde(flatten)]
264 #[doc = "Use volume as IDE hard disk or CD-ROM (n is 0 to 3)."]
265 pub ides: ::std::collections::HashMap<u32, String>,
266 #[serde(rename = "ipconfig[n]")]
267 #[serde(
268 serialize_with = "crate::types::serialize_multi::<NumberedIpconfigs, _>",
269 deserialize_with = "crate::types::deserialize_multi::<NumberedIpconfigs, _>"
270 )]
271 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
272 #[serde(flatten)]
273 #[doc = "cloud-init: Specify IP addresses and gateways for the corresponding interface.\n\nIP addresses use CIDR notation, gateways are optional but need an IP of the same type specified.\n\nThe special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit\ngateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires\ncloud-init 19.4 or newer.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using\ndhcp on IPv4.\n"]
274 pub ipconfigs: ::std::collections::HashMap<u32, String>,
275 #[serde(skip_serializing_if = "Option::is_none", default)]
276 #[doc = "Inter-VM shared memory. Useful for direct communication between VMs, or to the host."]
277 pub ivshmem: Option<String>,
278 #[serde(
279 serialize_with = "crate::types::serialize_bool_optional",
280 deserialize_with = "crate::types::deserialize_bool_optional"
281 )]
282 #[serde(skip_serializing_if = "Option::is_none", default)]
283 #[doc = "Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts."]
284 pub keephugepages: Option<bool>,
285 #[serde(skip_serializing_if = "Option::is_none", default)]
286 #[doc = "Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS."]
287 pub keyboard: Option<Keyboard>,
288 #[serde(
289 serialize_with = "crate::types::serialize_bool_optional",
290 deserialize_with = "crate::types::deserialize_bool_optional"
291 )]
292 #[serde(skip_serializing_if = "Option::is_none", default)]
293 #[doc = "Enable/disable KVM hardware virtualization."]
294 pub kvm: Option<bool>,
295 #[serde(
296 serialize_with = "crate::types::serialize_bool_optional",
297 deserialize_with = "crate::types::deserialize_bool_optional"
298 )]
299 #[serde(skip_serializing_if = "Option::is_none", default)]
300 #[doc = "Set the real time clock (RTC) to local time. This is enabled by default if the `ostype` indicates a Microsoft Windows OS."]
301 pub localtime: Option<bool>,
302 #[serde(skip_serializing_if = "Option::is_none", default)]
303 #[doc = "Lock/unlock the VM."]
304 pub lock: Option<Lock>,
305 #[serde(skip_serializing_if = "Option::is_none", default)]
306 #[doc = "Specifies the QEMU machine type."]
307 pub machine: Option<String>,
308 #[serde(skip_serializing_if = "Option::is_none", default)]
309 #[doc = "Memory properties."]
310 pub memory: Option<String>,
311 #[serde(
312 serialize_with = "crate::types::serialize_number_optional",
313 deserialize_with = "crate::types::deserialize_number_optional"
314 )]
315 #[serde(skip_serializing_if = "Option::is_none", default)]
316 #[doc = "Set maximum tolerated downtime (in seconds) for migrations."]
317 pub migrate_downtime: Option<f64>,
318 #[serde(
319 serialize_with = "crate::types::serialize_int_optional",
320 deserialize_with = "crate::types::deserialize_int_optional"
321 )]
322 #[serde(skip_serializing_if = "Option::is_none", default)]
323 #[doc = "Set maximum speed (in MB/s) for migrations. Value 0 is no limit."]
324 pub migrate_speed: Option<u64>,
325 #[serde(skip_serializing_if = "Option::is_none", default)]
326 #[doc = "Set a name for the VM. Only used on the configuration web interface."]
327 pub name: Option<String>,
328 #[serde(skip_serializing_if = "Option::is_none", default)]
329 #[doc = "cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set."]
330 pub nameserver: Option<String>,
331 #[serde(rename = "net[n]")]
332 #[serde(
333 serialize_with = "crate::types::serialize_multi::<NumberedNets, _>",
334 deserialize_with = "crate::types::deserialize_multi::<NumberedNets, _>"
335 )]
336 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
337 #[serde(flatten)]
338 #[doc = "Specify network devices."]
339 pub nets: ::std::collections::HashMap<u32, String>,
340 #[serde(
341 serialize_with = "crate::types::serialize_bool_optional",
342 deserialize_with = "crate::types::deserialize_bool_optional"
343 )]
344 #[serde(skip_serializing_if = "Option::is_none", default)]
345 #[doc = "Enable/disable NUMA."]
346 pub numa: Option<bool>,
347 #[serde(rename = "numa[n]")]
348 #[serde(
349 serialize_with = "crate::types::serialize_multi::<NumberedNumas, _>",
350 deserialize_with = "crate::types::deserialize_multi::<NumberedNumas, _>"
351 )]
352 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
353 #[serde(flatten)]
354 #[doc = "NUMA topology."]
355 pub numas: ::std::collections::HashMap<u32, String>,
356 #[serde(
357 serialize_with = "crate::types::serialize_bool_optional",
358 deserialize_with = "crate::types::deserialize_bool_optional"
359 )]
360 #[serde(skip_serializing_if = "Option::is_none", default)]
361 #[doc = "Specifies whether a VM will be started during system bootup."]
362 pub onboot: Option<bool>,
363 #[serde(skip_serializing_if = "Option::is_none", default)]
364 #[doc = "Specify guest operating system."]
365 #[doc = "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012/2012r2\nwin10;; Microsoft Windows 10/2016/2019\nwin11;; Microsoft Windows 11/2022\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6 - 6.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"]
366 pub ostype: Option<Ostype>,
367 #[serde(rename = "parallel[n]")]
368 #[serde(
369 serialize_with = "crate::types::serialize_multi::<NumberedParallels, _>",
370 deserialize_with = "crate::types::deserialize_multi::<NumberedParallels, _>"
371 )]
372 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
373 #[serde(flatten)]
374 #[doc = "Map host parallel devices (n is 0 to 2)."]
375 #[doc = "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such\nmachines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"]
376 pub parallels: ::std::collections::HashMap<u32, String>,
377 #[serde(
378 serialize_with = "crate::types::serialize_bool_optional",
379 deserialize_with = "crate::types::deserialize_bool_optional"
380 )]
381 #[serde(skip_serializing_if = "Option::is_none", default)]
382 #[doc = "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations."]
383 pub protection: Option<bool>,
384 #[serde(
385 serialize_with = "crate::types::serialize_bool_optional",
386 deserialize_with = "crate::types::deserialize_bool_optional"
387 )]
388 #[serde(skip_serializing_if = "Option::is_none", default)]
389 #[doc = "Allow reboot. If set to '0' the VM exit on reboot."]
390 pub reboot: Option<bool>,
391 #[serde(skip_serializing_if = "Option::is_none", default)]
392 #[doc = "Configure a VirtIO-based Random Number Generator."]
393 pub rng0: Option<String>,
394 #[serde(rename = "sata[n]")]
395 #[serde(
396 serialize_with = "crate::types::serialize_multi::<NumberedSatas, _>",
397 deserialize_with = "crate::types::deserialize_multi::<NumberedSatas, _>"
398 )]
399 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
400 #[serde(flatten)]
401 #[doc = "Use volume as SATA hard disk or CD-ROM (n is 0 to 5)."]
402 pub satas: ::std::collections::HashMap<u32, String>,
403 #[serde(rename = "scsi[n]")]
404 #[serde(
405 serialize_with = "crate::types::serialize_multi::<NumberedScsis, _>",
406 deserialize_with = "crate::types::deserialize_multi::<NumberedScsis, _>"
407 )]
408 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
409 #[serde(flatten)]
410 #[doc = "Use volume as SCSI hard disk or CD-ROM (n is 0 to 30)."]
411 pub scsis: ::std::collections::HashMap<u32, String>,
412 #[serde(skip_serializing_if = "Option::is_none", default)]
413 #[doc = "SCSI controller model"]
414 pub scsihw: Option<Scsihw>,
415 #[serde(skip_serializing_if = "Option::is_none", default)]
416 #[doc = "cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set."]
417 pub searchdomain: Option<String>,
418 #[serde(rename = "serial[n]")]
419 #[serde(
420 serialize_with = "crate::types::serialize_multi::<NumberedSerials, _>",
421 deserialize_with = "crate::types::deserialize_multi::<NumberedSerials, _>"
422 )]
423 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
424 #[serde(flatten)]
425 #[doc = "Create a serial device inside the VM (n is 0 to 3)"]
426 #[doc = "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines -\nuse with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"]
427 pub serials: ::std::collections::HashMap<u32, String>,
428 #[serde(
429 serialize_with = "crate::types::serialize_int_optional",
430 deserialize_with = "crate::types::deserialize_int_optional"
431 )]
432 #[serde(skip_serializing_if = "Option::is_none", default)]
433 #[doc = "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. Auto-ballooning is done by pvestatd."]
434 pub shares: Option<u64>,
435 #[serde(skip_serializing_if = "Option::is_none", default)]
436 #[doc = "Specify SMBIOS type 1 fields."]
437 pub smbios1: Option<String>,
438 #[serde(
439 serialize_with = "crate::types::serialize_int_optional",
440 deserialize_with = "crate::types::deserialize_int_optional"
441 )]
442 #[serde(skip_serializing_if = "Option::is_none", default)]
443 #[doc = "The number of CPUs. Please use option -sockets instead."]
444 pub smp: Option<u64>,
445 #[serde(
446 serialize_with = "crate::types::serialize_int_optional",
447 deserialize_with = "crate::types::deserialize_int_optional"
448 )]
449 #[serde(skip_serializing_if = "Option::is_none", default)]
450 #[doc = "The number of CPU sockets."]
451 pub sockets: Option<u64>,
452 #[serde(skip_serializing_if = "Option::is_none", default)]
453 #[doc = "Configure additional enhancements for SPICE."]
454 pub spice_enhancements: Option<String>,
455 #[serde(skip_serializing_if = "Option::is_none", default)]
456 #[doc = "cloud-init: Setup public SSH keys (one key per line, OpenSSH format)."]
457 pub sshkeys: Option<String>,
458 #[serde(skip_serializing_if = "Option::is_none", default)]
459 #[doc = "Set the initial date of the real time clock. Valid format for date are:'now' or '2006-06-17T16:01:21' or '2006-06-17'."]
460 pub startdate: Option<String>,
461 #[serde(skip_serializing_if = "Option::is_none", default)]
462 #[doc = "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped."]
463 pub startup: Option<String>,
464 #[serde(
465 serialize_with = "crate::types::serialize_bool_optional",
466 deserialize_with = "crate::types::deserialize_bool_optional"
467 )]
468 #[serde(skip_serializing_if = "Option::is_none", default)]
469 #[doc = "Enable/disable the USB tablet device."]
470 #[doc = "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (`qm set \\<vmid\\> --vga qxl`)."]
471 pub tablet: Option<bool>,
472 #[serde(skip_serializing_if = "Option::is_none", default)]
473 #[doc = "Tags of the VM. This is only meta information."]
474 pub tags: Option<String>,
475 #[serde(
476 serialize_with = "crate::types::serialize_bool_optional",
477 deserialize_with = "crate::types::deserialize_bool_optional"
478 )]
479 #[serde(skip_serializing_if = "Option::is_none", default)]
480 #[doc = "Enable/disable time drift fix."]
481 pub tdf: Option<bool>,
482 #[serde(
483 serialize_with = "crate::types::serialize_bool_optional",
484 deserialize_with = "crate::types::deserialize_bool_optional"
485 )]
486 #[serde(skip_serializing_if = "Option::is_none", default)]
487 #[doc = "Enable/disable Template."]
488 pub template: Option<bool>,
489 #[serde(skip_serializing_if = "Option::is_none", default)]
490 #[doc = "Configure a Disk for storing TPM state. The format is fixed to 'raw'."]
491 pub tpmstate0: Option<String>,
492 #[serde(rename = "unused[n]")]
493 #[serde(
494 serialize_with = "crate::types::serialize_multi::<NumberedUnuseds, _>",
495 deserialize_with = "crate::types::deserialize_multi::<NumberedUnuseds, _>"
496 )]
497 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
498 #[serde(flatten)]
499 #[doc = "Reference to unused volumes. This is used internally, and should not be modified manually."]
500 pub unuseds: ::std::collections::HashMap<u32, String>,
501 #[serde(rename = "usb[n]")]
502 #[serde(
503 serialize_with = "crate::types::serialize_multi::<NumberedUsbs, _>",
504 deserialize_with = "crate::types::deserialize_multi::<NumberedUsbs, _>"
505 )]
506 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
507 #[serde(flatten)]
508 #[doc = "Configure an USB device (n is 0 to 4, for machine version \\>= 7.1 and ostype l26 or windows \\> 7, n can be up to 14)."]
509 pub usbs: ::std::collections::HashMap<u32, String>,
510 #[serde(
511 serialize_with = "crate::types::serialize_int_optional",
512 deserialize_with = "crate::types::deserialize_int_optional"
513 )]
514 #[serde(skip_serializing_if = "Option::is_none", default)]
515 #[doc = "Number of hotplugged vcpus."]
516 pub vcpus: Option<u64>,
517 #[serde(skip_serializing_if = "Option::is_none", default)]
518 #[doc = "Configure the VGA hardware."]
519 #[doc = "Configure the VGA Hardware. If you want to use high resolution modes (\\>= 1280x1024x16) you may need to increase the vga memory option. Since QEMU 2.9 the default VGA display type is 'std' for all OS types besides some Windows versions (XP and older) which use 'cirrus'. The 'qxl' option enables the SPICE display server. For win* OS you can select how many independent displays you want, Linux guests can add displays them self.\nYou can also run without any graphic card, using a serial device as terminal."]
520 pub vga: Option<String>,
521 #[serde(rename = "virtio[n]")]
522 #[serde(
523 serialize_with = "crate::types::serialize_multi::<NumberedVirtios, _>",
524 deserialize_with = "crate::types::deserialize_multi::<NumberedVirtios, _>"
525 )]
526 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
527 #[serde(flatten)]
528 #[doc = "Use volume as VIRTIO hard disk (n is 0 to 15)."]
529 pub virtios: ::std::collections::HashMap<u32, String>,
530 #[serde(skip_serializing_if = "Option::is_none", default)]
531 #[doc = "Set VM Generation ID. Use '1' to autogenerate on create or update, pass '0' to disable explicitly."]
532 #[doc = "The VM generation ID (vmgenid) device exposes a 128-bit integer value identifier to the guest OS. This allows to notify the guest operating system when the virtual machine is executed with a different configuration (e.g. snapshot execution or creation from a template). The guest operating system notices the change, and is then able to react as appropriate by marking its copies of distributed databases as dirty, re-initializing its random number generator, etc.\nNote that auto-creation only works when done through API/CLI create or update methods, but not when manually editing the config file."]
533 pub vmgenid: Option<String>,
534 #[serde(skip_serializing_if = "Option::is_none", default)]
535 #[doc = "Default storage for VM state volumes/files."]
536 pub vmstatestorage: Option<String>,
537 #[serde(skip_serializing_if = "Option::is_none", default)]
538 #[doc = "Create a virtual hardware watchdog device."]
539 #[doc = "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)"]
540 pub watchdog: Option<String>,
541 #[serde(
542 flatten,
543 deserialize_with = "crate::types::multi::deserialize_additional_data::<'_, GetOutput, _, _>"
544 )]
545 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
546}
547impl crate::types::multi::Test for GetOutput {
548 fn test_fn() -> fn(&str) -> bool {
549 fn the_test(input: &str) -> bool {
550 let array = [
551 <NumberedHostpcis as crate::types::multi::NumberedItems>::key_matches
552 as fn(&str) -> bool,
553 <NumberedIdes as crate::types::multi::NumberedItems>::key_matches
554 as fn(&str) -> bool,
555 <NumberedIpconfigs as crate::types::multi::NumberedItems>::key_matches
556 as fn(&str) -> bool,
557 <NumberedNets as crate::types::multi::NumberedItems>::key_matches
558 as fn(&str) -> bool,
559 <NumberedNumas as crate::types::multi::NumberedItems>::key_matches
560 as fn(&str) -> bool,
561 <NumberedParallels as crate::types::multi::NumberedItems>::key_matches
562 as fn(&str) -> bool,
563 <NumberedSatas as crate::types::multi::NumberedItems>::key_matches
564 as fn(&str) -> bool,
565 <NumberedScsis as crate::types::multi::NumberedItems>::key_matches
566 as fn(&str) -> bool,
567 <NumberedSerials as crate::types::multi::NumberedItems>::key_matches
568 as fn(&str) -> bool,
569 <NumberedUnuseds as crate::types::multi::NumberedItems>::key_matches
570 as fn(&str) -> bool,
571 <NumberedUsbs as crate::types::multi::NumberedItems>::key_matches
572 as fn(&str) -> bool,
573 <NumberedVirtios as crate::types::multi::NumberedItems>::key_matches
574 as fn(&str) -> bool,
575 ];
576 array.iter().any(|f| f(input))
577 }
578 the_test as _
579 }
580}
581#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
582pub struct GetParams {
583 #[serde(
584 serialize_with = "crate::types::serialize_bool_optional",
585 deserialize_with = "crate::types::deserialize_bool_optional"
586 )]
587 #[serde(skip_serializing_if = "Option::is_none", default)]
588 #[doc = "Get current values (instead of pending values)."]
589 pub current: Option<bool>,
590 #[serde(skip_serializing_if = "Option::is_none", default)]
591 #[doc = "Fetch config values from given snapshot."]
592 pub snapshot: Option<String>,
593 #[serde(
594 flatten,
595 default,
596 skip_serializing_if = "::std::collections::HashMap::is_empty"
597 )]
598 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
599}
600#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
601pub struct PostParams {
602 #[serde(
603 serialize_with = "crate::types::serialize_bool_optional",
604 deserialize_with = "crate::types::deserialize_bool_optional"
605 )]
606 #[serde(skip_serializing_if = "Option::is_none", default)]
607 #[doc = "Enable/disable ACPI."]
608 pub acpi: Option<bool>,
609 #[serde(skip_serializing_if = "Option::is_none", default)]
610 #[doc = "List of host cores used to execute guest processes, for example: 0,5,8-11"]
611 pub affinity: Option<String>,
612 #[serde(skip_serializing_if = "Option::is_none", default)]
613 #[doc = "Enable/disable communication with the QEMU Guest Agent and its properties."]
614 pub agent: Option<String>,
615 #[serde(skip_serializing_if = "Option::is_none", default)]
616 #[doc = "Virtual processor architecture. Defaults to the host."]
617 pub arch: Option<Arch>,
618 #[serde(skip_serializing_if = "Option::is_none", default)]
619 #[doc = "Arbitrary arguments passed to kvm."]
620 #[doc = "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -smbios 'type=0,vendor=FOO'\n\nNOTE: this option is for experts only.\n"]
621 pub args: Option<String>,
622 #[serde(skip_serializing_if = "Option::is_none", default)]
623 #[doc = "Configure a audio device, useful in combination with QXL/Spice."]
624 pub audio0: Option<String>,
625 #[serde(
626 serialize_with = "crate::types::serialize_bool_optional",
627 deserialize_with = "crate::types::deserialize_bool_optional"
628 )]
629 #[serde(skip_serializing_if = "Option::is_none", default)]
630 #[doc = "Automatic restart after crash (currently ignored)."]
631 pub autostart: Option<bool>,
632 #[serde(
633 serialize_with = "crate::types::serialize_int_optional",
634 deserialize_with = "crate::types::deserialize_int_optional"
635 )]
636 #[serde(skip_serializing_if = "Option::is_none", default)]
637 #[doc = "Time to wait for the task to finish. We return 'null' if the task finish within that time."]
638 pub background_delay: Option<u64>,
639 #[serde(
640 serialize_with = "crate::types::serialize_int_optional",
641 deserialize_with = "crate::types::deserialize_int_optional"
642 )]
643 #[serde(skip_serializing_if = "Option::is_none", default)]
644 #[doc = "Amount of target RAM for the VM in MiB. Using zero disables the ballon driver."]
645 pub balloon: Option<u64>,
646 #[serde(skip_serializing_if = "Option::is_none", default)]
647 #[doc = "Select BIOS implementation."]
648 pub bios: Option<Bios>,
649 #[serde(skip_serializing_if = "Option::is_none", default)]
650 #[doc = "Specify guest boot order. Use the 'order=' sub-property as usage with no key or 'legacy=' is deprecated."]
651 pub boot: Option<String>,
652 #[serde(skip_serializing_if = "Option::is_none", default)]
653 #[doc = "Enable booting from specified disk. Deprecated: Use 'boot: order=foo;bar' instead."]
654 pub bootdisk: Option<String>,
655 #[serde(skip_serializing_if = "Option::is_none", default)]
656 #[doc = "This is an alias for option -ide2"]
657 pub cdrom: Option<String>,
658 #[serde(skip_serializing_if = "Option::is_none", default)]
659 #[doc = "cloud-init: Specify custom files to replace the automatically generated ones at start."]
660 pub cicustom: Option<String>,
661 #[serde(skip_serializing_if = "Option::is_none", default)]
662 #[doc = "cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords."]
663 pub cipassword: Option<String>,
664 #[serde(skip_serializing_if = "Option::is_none", default)]
665 #[doc = "Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows."]
666 pub citype: Option<Citype>,
667 #[serde(
668 serialize_with = "crate::types::serialize_bool_optional",
669 deserialize_with = "crate::types::deserialize_bool_optional"
670 )]
671 #[serde(skip_serializing_if = "Option::is_none", default)]
672 #[doc = "cloud-init: do an automatic package upgrade after the first boot."]
673 pub ciupgrade: Option<bool>,
674 #[serde(skip_serializing_if = "Option::is_none", default)]
675 #[doc = "cloud-init: User name to change ssh keys and password for instead of the image's configured default user."]
676 pub ciuser: Option<String>,
677 #[serde(
678 serialize_with = "crate::types::serialize_int_optional",
679 deserialize_with = "crate::types::deserialize_int_optional"
680 )]
681 #[serde(skip_serializing_if = "Option::is_none", default)]
682 #[doc = "The number of cores per socket."]
683 pub cores: Option<u64>,
684 #[serde(skip_serializing_if = "Option::is_none", default)]
685 #[doc = "Emulated CPU type."]
686 pub cpu: Option<String>,
687 #[serde(
688 serialize_with = "crate::types::serialize_number_optional",
689 deserialize_with = "crate::types::deserialize_number_optional"
690 )]
691 #[serde(skip_serializing_if = "Option::is_none", default)]
692 #[doc = "Limit of CPU usage."]
693 #[doc = "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit."]
694 pub cpulimit: Option<f64>,
695 #[serde(skip_serializing_if = "Option::is_none", default)]
696 #[doc = "CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2."]
697 #[doc = "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs."]
698 pub cpuunits: Option<()>,
699 #[serde(skip_serializing_if = "Option::is_none", default)]
700 #[doc = "A list of settings you want to delete."]
701 pub delete: Option<String>,
702 #[serde(skip_serializing_if = "Option::is_none", default)]
703 #[doc = "Description for the VM. Shown in the web-interface VM's summary. This is saved as comment inside the configuration file."]
704 pub description: Option<String>,
705 #[serde(skip_serializing_if = "Option::is_none", default)]
706 #[doc = "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications."]
707 pub digest: Option<String>,
708 #[serde(skip_serializing_if = "Option::is_none", default)]
709 #[doc = "Configure a disk for storing EFI vars. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and that the default EFI vars are copied to the volume instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
710 pub efidisk0: Option<String>,
711 #[serde(
712 serialize_with = "crate::types::serialize_bool_optional",
713 deserialize_with = "crate::types::deserialize_bool_optional"
714 )]
715 #[serde(skip_serializing_if = "Option::is_none", default)]
716 #[doc = "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal."]
717 pub force: Option<bool>,
718 #[serde(
719 serialize_with = "crate::types::serialize_bool_optional",
720 deserialize_with = "crate::types::deserialize_bool_optional"
721 )]
722 #[serde(skip_serializing_if = "Option::is_none", default)]
723 #[doc = "Freeze CPU at startup (use 'c' monitor command to start execution)."]
724 pub freeze: Option<bool>,
725 #[serde(skip_serializing_if = "Option::is_none", default)]
726 #[doc = "Script that will be executed during various steps in the vms lifetime."]
727 pub hookscript: Option<String>,
728 #[serde(rename = "hostpci[n]")]
729 #[serde(
730 serialize_with = "crate::types::serialize_multi::<NumberedHostpcis, _>",
731 deserialize_with = "crate::types::deserialize_multi::<NumberedHostpcis, _>"
732 )]
733 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
734 #[serde(flatten)]
735 #[doc = "Map host PCI devices into guest."]
736 #[doc = "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer\npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"]
737 pub hostpcis: ::std::collections::HashMap<u32, String>,
738 #[serde(skip_serializing_if = "Option::is_none", default)]
739 #[doc = "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory', 'usb' and 'cloudinit'. Use '0' to disable hotplug completely. Using '1' as value is an alias for the default `network,disk,usb`. USB hotplugging is possible for guests with machine version \\>= 7.1 and ostype l26 or windows \\> 7."]
740 pub hotplug: Option<String>,
741 #[serde(skip_serializing_if = "Option::is_none", default)]
742 #[doc = "Enable/disable hugepages memory."]
743 pub hugepages: Option<Hugepages>,
744 #[serde(rename = "ide[n]")]
745 #[serde(
746 serialize_with = "crate::types::serialize_multi::<NumberedIdes, _>",
747 deserialize_with = "crate::types::deserialize_multi::<NumberedIdes, _>"
748 )]
749 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
750 #[serde(flatten)]
751 #[doc = "Use volume as IDE hard disk or CD-ROM (n is 0 to 3). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
752 pub ides: ::std::collections::HashMap<u32, String>,
753 #[serde(rename = "ipconfig[n]")]
754 #[serde(
755 serialize_with = "crate::types::serialize_multi::<NumberedIpconfigs, _>",
756 deserialize_with = "crate::types::deserialize_multi::<NumberedIpconfigs, _>"
757 )]
758 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
759 #[serde(flatten)]
760 #[doc = "cloud-init: Specify IP addresses and gateways for the corresponding interface.\n\nIP addresses use CIDR notation, gateways are optional but need an IP of the same type specified.\n\nThe special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit\ngateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires\ncloud-init 19.4 or newer.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using\ndhcp on IPv4.\n"]
761 pub ipconfigs: ::std::collections::HashMap<u32, String>,
762 #[serde(skip_serializing_if = "Option::is_none", default)]
763 #[doc = "Inter-VM shared memory. Useful for direct communication between VMs, or to the host."]
764 pub ivshmem: Option<String>,
765 #[serde(
766 serialize_with = "crate::types::serialize_bool_optional",
767 deserialize_with = "crate::types::deserialize_bool_optional"
768 )]
769 #[serde(skip_serializing_if = "Option::is_none", default)]
770 #[doc = "Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts."]
771 pub keephugepages: Option<bool>,
772 #[serde(skip_serializing_if = "Option::is_none", default)]
773 #[doc = "Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS."]
774 pub keyboard: Option<Keyboard>,
775 #[serde(
776 serialize_with = "crate::types::serialize_bool_optional",
777 deserialize_with = "crate::types::deserialize_bool_optional"
778 )]
779 #[serde(skip_serializing_if = "Option::is_none", default)]
780 #[doc = "Enable/disable KVM hardware virtualization."]
781 pub kvm: Option<bool>,
782 #[serde(
783 serialize_with = "crate::types::serialize_bool_optional",
784 deserialize_with = "crate::types::deserialize_bool_optional"
785 )]
786 #[serde(skip_serializing_if = "Option::is_none", default)]
787 #[doc = "Set the real time clock (RTC) to local time. This is enabled by default if the `ostype` indicates a Microsoft Windows OS."]
788 pub localtime: Option<bool>,
789 #[serde(skip_serializing_if = "Option::is_none", default)]
790 #[doc = "Lock/unlock the VM."]
791 pub lock: Option<Lock>,
792 #[serde(skip_serializing_if = "Option::is_none", default)]
793 #[doc = "Specifies the QEMU machine type."]
794 pub machine: Option<String>,
795 #[serde(skip_serializing_if = "Option::is_none", default)]
796 #[doc = "Memory properties."]
797 pub memory: Option<String>,
798 #[serde(
799 serialize_with = "crate::types::serialize_number_optional",
800 deserialize_with = "crate::types::deserialize_number_optional"
801 )]
802 #[serde(skip_serializing_if = "Option::is_none", default)]
803 #[doc = "Set maximum tolerated downtime (in seconds) for migrations."]
804 pub migrate_downtime: Option<f64>,
805 #[serde(
806 serialize_with = "crate::types::serialize_int_optional",
807 deserialize_with = "crate::types::deserialize_int_optional"
808 )]
809 #[serde(skip_serializing_if = "Option::is_none", default)]
810 #[doc = "Set maximum speed (in MB/s) for migrations. Value 0 is no limit."]
811 pub migrate_speed: Option<u64>,
812 #[serde(skip_serializing_if = "Option::is_none", default)]
813 #[doc = "Set a name for the VM. Only used on the configuration web interface."]
814 pub name: Option<String>,
815 #[serde(skip_serializing_if = "Option::is_none", default)]
816 #[doc = "cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set."]
817 pub nameserver: Option<String>,
818 #[serde(rename = "net[n]")]
819 #[serde(
820 serialize_with = "crate::types::serialize_multi::<NumberedNets, _>",
821 deserialize_with = "crate::types::deserialize_multi::<NumberedNets, _>"
822 )]
823 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
824 #[serde(flatten)]
825 #[doc = "Specify network devices."]
826 pub nets: ::std::collections::HashMap<u32, String>,
827 #[serde(
828 serialize_with = "crate::types::serialize_bool_optional",
829 deserialize_with = "crate::types::deserialize_bool_optional"
830 )]
831 #[serde(skip_serializing_if = "Option::is_none", default)]
832 #[doc = "Enable/disable NUMA."]
833 pub numa: Option<bool>,
834 #[serde(rename = "numa[n]")]
835 #[serde(
836 serialize_with = "crate::types::serialize_multi::<NumberedNumas, _>",
837 deserialize_with = "crate::types::deserialize_multi::<NumberedNumas, _>"
838 )]
839 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
840 #[serde(flatten)]
841 #[doc = "NUMA topology."]
842 pub numas: ::std::collections::HashMap<u32, String>,
843 #[serde(
844 serialize_with = "crate::types::serialize_bool_optional",
845 deserialize_with = "crate::types::deserialize_bool_optional"
846 )]
847 #[serde(skip_serializing_if = "Option::is_none", default)]
848 #[doc = "Specifies whether a VM will be started during system bootup."]
849 pub onboot: Option<bool>,
850 #[serde(skip_serializing_if = "Option::is_none", default)]
851 #[doc = "Specify guest operating system."]
852 #[doc = "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012/2012r2\nwin10;; Microsoft Windows 10/2016/2019\nwin11;; Microsoft Windows 11/2022\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6 - 6.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"]
853 pub ostype: Option<Ostype>,
854 #[serde(rename = "parallel[n]")]
855 #[serde(
856 serialize_with = "crate::types::serialize_multi::<NumberedParallels, _>",
857 deserialize_with = "crate::types::deserialize_multi::<NumberedParallels, _>"
858 )]
859 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
860 #[serde(flatten)]
861 #[doc = "Map host parallel devices (n is 0 to 2)."]
862 #[doc = "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such\nmachines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"]
863 pub parallels: ::std::collections::HashMap<u32, String>,
864 #[serde(
865 serialize_with = "crate::types::serialize_bool_optional",
866 deserialize_with = "crate::types::deserialize_bool_optional"
867 )]
868 #[serde(skip_serializing_if = "Option::is_none", default)]
869 #[doc = "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations."]
870 pub protection: Option<bool>,
871 #[serde(
872 serialize_with = "crate::types::serialize_bool_optional",
873 deserialize_with = "crate::types::deserialize_bool_optional"
874 )]
875 #[serde(skip_serializing_if = "Option::is_none", default)]
876 #[doc = "Allow reboot. If set to '0' the VM exit on reboot."]
877 pub reboot: Option<bool>,
878 #[serde(skip_serializing_if = "Option::is_none", default)]
879 #[doc = "Revert a pending change."]
880 pub revert: Option<String>,
881 #[serde(skip_serializing_if = "Option::is_none", default)]
882 #[doc = "Configure a VirtIO-based Random Number Generator."]
883 pub rng0: Option<String>,
884 #[serde(rename = "sata[n]")]
885 #[serde(
886 serialize_with = "crate::types::serialize_multi::<NumberedSatas, _>",
887 deserialize_with = "crate::types::deserialize_multi::<NumberedSatas, _>"
888 )]
889 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
890 #[serde(flatten)]
891 #[doc = "Use volume as SATA hard disk or CD-ROM (n is 0 to 5). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
892 pub satas: ::std::collections::HashMap<u32, String>,
893 #[serde(rename = "scsi[n]")]
894 #[serde(
895 serialize_with = "crate::types::serialize_multi::<NumberedScsis, _>",
896 deserialize_with = "crate::types::deserialize_multi::<NumberedScsis, _>"
897 )]
898 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
899 #[serde(flatten)]
900 #[doc = "Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
901 pub scsis: ::std::collections::HashMap<u32, String>,
902 #[serde(skip_serializing_if = "Option::is_none", default)]
903 #[doc = "SCSI controller model"]
904 pub scsihw: Option<Scsihw>,
905 #[serde(skip_serializing_if = "Option::is_none", default)]
906 #[doc = "cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set."]
907 pub searchdomain: Option<String>,
908 #[serde(rename = "serial[n]")]
909 #[serde(
910 serialize_with = "crate::types::serialize_multi::<NumberedSerials, _>",
911 deserialize_with = "crate::types::deserialize_multi::<NumberedSerials, _>"
912 )]
913 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
914 #[serde(flatten)]
915 #[doc = "Create a serial device inside the VM (n is 0 to 3)"]
916 #[doc = "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines -\nuse with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"]
917 pub serials: ::std::collections::HashMap<u32, String>,
918 #[serde(
919 serialize_with = "crate::types::serialize_int_optional",
920 deserialize_with = "crate::types::deserialize_int_optional"
921 )]
922 #[serde(skip_serializing_if = "Option::is_none", default)]
923 #[doc = "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. Auto-ballooning is done by pvestatd."]
924 pub shares: Option<u64>,
925 #[serde(
926 serialize_with = "crate::types::serialize_bool_optional",
927 deserialize_with = "crate::types::deserialize_bool_optional"
928 )]
929 #[serde(skip_serializing_if = "Option::is_none", default)]
930 #[doc = "Ignore locks - only root is allowed to use this option."]
931 pub skiplock: Option<bool>,
932 #[serde(skip_serializing_if = "Option::is_none", default)]
933 #[doc = "Specify SMBIOS type 1 fields."]
934 pub smbios1: Option<String>,
935 #[serde(
936 serialize_with = "crate::types::serialize_int_optional",
937 deserialize_with = "crate::types::deserialize_int_optional"
938 )]
939 #[serde(skip_serializing_if = "Option::is_none", default)]
940 #[doc = "The number of CPUs. Please use option -sockets instead."]
941 pub smp: Option<u64>,
942 #[serde(
943 serialize_with = "crate::types::serialize_int_optional",
944 deserialize_with = "crate::types::deserialize_int_optional"
945 )]
946 #[serde(skip_serializing_if = "Option::is_none", default)]
947 #[doc = "The number of CPU sockets."]
948 pub sockets: Option<u64>,
949 #[serde(skip_serializing_if = "Option::is_none", default)]
950 #[doc = "Configure additional enhancements for SPICE."]
951 pub spice_enhancements: Option<String>,
952 #[serde(skip_serializing_if = "Option::is_none", default)]
953 #[doc = "cloud-init: Setup public SSH keys (one key per line, OpenSSH format)."]
954 pub sshkeys: Option<String>,
955 #[serde(skip_serializing_if = "Option::is_none", default)]
956 #[doc = "Set the initial date of the real time clock. Valid format for date are:'now' or '2006-06-17T16:01:21' or '2006-06-17'."]
957 pub startdate: Option<String>,
958 #[serde(skip_serializing_if = "Option::is_none", default)]
959 #[doc = "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped."]
960 pub startup: Option<String>,
961 #[serde(
962 serialize_with = "crate::types::serialize_bool_optional",
963 deserialize_with = "crate::types::deserialize_bool_optional"
964 )]
965 #[serde(skip_serializing_if = "Option::is_none", default)]
966 #[doc = "Enable/disable the USB tablet device."]
967 #[doc = "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (`qm set \\<vmid\\> --vga qxl`)."]
968 pub tablet: Option<bool>,
969 #[serde(skip_serializing_if = "Option::is_none", default)]
970 #[doc = "Tags of the VM. This is only meta information."]
971 pub tags: Option<String>,
972 #[serde(
973 serialize_with = "crate::types::serialize_bool_optional",
974 deserialize_with = "crate::types::deserialize_bool_optional"
975 )]
976 #[serde(skip_serializing_if = "Option::is_none", default)]
977 #[doc = "Enable/disable time drift fix."]
978 pub tdf: Option<bool>,
979 #[serde(
980 serialize_with = "crate::types::serialize_bool_optional",
981 deserialize_with = "crate::types::deserialize_bool_optional"
982 )]
983 #[serde(skip_serializing_if = "Option::is_none", default)]
984 #[doc = "Enable/disable Template."]
985 pub template: Option<bool>,
986 #[serde(skip_serializing_if = "Option::is_none", default)]
987 #[doc = "Configure a Disk for storing TPM state. The format is fixed to 'raw'. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and 4 MiB will be used instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
988 pub tpmstate0: Option<String>,
989 #[serde(rename = "unused[n]")]
990 #[serde(
991 serialize_with = "crate::types::serialize_multi::<NumberedUnuseds, _>",
992 deserialize_with = "crate::types::deserialize_multi::<NumberedUnuseds, _>"
993 )]
994 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
995 #[serde(flatten)]
996 #[doc = "Reference to unused volumes. This is used internally, and should not be modified manually."]
997 pub unuseds: ::std::collections::HashMap<u32, String>,
998 #[serde(rename = "usb[n]")]
999 #[serde(
1000 serialize_with = "crate::types::serialize_multi::<NumberedUsbs, _>",
1001 deserialize_with = "crate::types::deserialize_multi::<NumberedUsbs, _>"
1002 )]
1003 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1004 #[serde(flatten)]
1005 #[doc = "Configure an USB device (n is 0 to 4, for machine version \\>= 7.1 and ostype l26 or windows \\> 7, n can be up to 14)."]
1006 pub usbs: ::std::collections::HashMap<u32, String>,
1007 #[serde(
1008 serialize_with = "crate::types::serialize_int_optional",
1009 deserialize_with = "crate::types::deserialize_int_optional"
1010 )]
1011 #[serde(skip_serializing_if = "Option::is_none", default)]
1012 #[doc = "Number of hotplugged vcpus."]
1013 pub vcpus: Option<u64>,
1014 #[serde(skip_serializing_if = "Option::is_none", default)]
1015 #[doc = "Configure the VGA hardware."]
1016 #[doc = "Configure the VGA Hardware. If you want to use high resolution modes (\\>= 1280x1024x16) you may need to increase the vga memory option. Since QEMU 2.9 the default VGA display type is 'std' for all OS types besides some Windows versions (XP and older) which use 'cirrus'. The 'qxl' option enables the SPICE display server. For win* OS you can select how many independent displays you want, Linux guests can add displays them self.\nYou can also run without any graphic card, using a serial device as terminal."]
1017 pub vga: Option<String>,
1018 #[serde(rename = "virtio[n]")]
1019 #[serde(
1020 serialize_with = "crate::types::serialize_multi::<NumberedVirtios, _>",
1021 deserialize_with = "crate::types::deserialize_multi::<NumberedVirtios, _>"
1022 )]
1023 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1024 #[serde(flatten)]
1025 #[doc = "Use volume as VIRTIO hard disk (n is 0 to 15). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
1026 pub virtios: ::std::collections::HashMap<u32, String>,
1027 #[serde(skip_serializing_if = "Option::is_none", default)]
1028 #[doc = "Set VM Generation ID. Use '1' to autogenerate on create or update, pass '0' to disable explicitly."]
1029 #[doc = "The VM generation ID (vmgenid) device exposes a 128-bit integer value identifier to the guest OS. This allows to notify the guest operating system when the virtual machine is executed with a different configuration (e.g. snapshot execution or creation from a template). The guest operating system notices the change, and is then able to react as appropriate by marking its copies of distributed databases as dirty, re-initializing its random number generator, etc.\nNote that auto-creation only works when done through API/CLI create or update methods, but not when manually editing the config file."]
1030 pub vmgenid: Option<String>,
1031 #[serde(skip_serializing_if = "Option::is_none", default)]
1032 #[doc = "Default storage for VM state volumes/files."]
1033 pub vmstatestorage: Option<String>,
1034 #[serde(skip_serializing_if = "Option::is_none", default)]
1035 #[doc = "Create a virtual hardware watchdog device."]
1036 #[doc = "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)"]
1037 pub watchdog: Option<String>,
1038 #[serde(
1039 flatten,
1040 deserialize_with = "crate::types::multi::deserialize_additional_data::<'_, PostParams, _, _>"
1041 )]
1042 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
1043}
1044impl crate::types::multi::Test for PostParams {
1045 fn test_fn() -> fn(&str) -> bool {
1046 fn the_test(input: &str) -> bool {
1047 let array = [
1048 <NumberedHostpcis as crate::types::multi::NumberedItems>::key_matches
1049 as fn(&str) -> bool,
1050 <NumberedIdes as crate::types::multi::NumberedItems>::key_matches
1051 as fn(&str) -> bool,
1052 <NumberedIpconfigs as crate::types::multi::NumberedItems>::key_matches
1053 as fn(&str) -> bool,
1054 <NumberedNets as crate::types::multi::NumberedItems>::key_matches
1055 as fn(&str) -> bool,
1056 <NumberedNumas as crate::types::multi::NumberedItems>::key_matches
1057 as fn(&str) -> bool,
1058 <NumberedParallels as crate::types::multi::NumberedItems>::key_matches
1059 as fn(&str) -> bool,
1060 <NumberedSatas as crate::types::multi::NumberedItems>::key_matches
1061 as fn(&str) -> bool,
1062 <NumberedScsis as crate::types::multi::NumberedItems>::key_matches
1063 as fn(&str) -> bool,
1064 <NumberedSerials as crate::types::multi::NumberedItems>::key_matches
1065 as fn(&str) -> bool,
1066 <NumberedUnuseds as crate::types::multi::NumberedItems>::key_matches
1067 as fn(&str) -> bool,
1068 <NumberedUsbs as crate::types::multi::NumberedItems>::key_matches
1069 as fn(&str) -> bool,
1070 <NumberedVirtios as crate::types::multi::NumberedItems>::key_matches
1071 as fn(&str) -> bool,
1072 ];
1073 array.iter().any(|f| f(input))
1074 }
1075 the_test as _
1076 }
1077}
1078#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
1079pub struct PutParams {
1080 #[serde(
1081 serialize_with = "crate::types::serialize_bool_optional",
1082 deserialize_with = "crate::types::deserialize_bool_optional"
1083 )]
1084 #[serde(skip_serializing_if = "Option::is_none", default)]
1085 #[doc = "Enable/disable ACPI."]
1086 pub acpi: Option<bool>,
1087 #[serde(skip_serializing_if = "Option::is_none", default)]
1088 #[doc = "List of host cores used to execute guest processes, for example: 0,5,8-11"]
1089 pub affinity: Option<String>,
1090 #[serde(skip_serializing_if = "Option::is_none", default)]
1091 #[doc = "Enable/disable communication with the QEMU Guest Agent and its properties."]
1092 pub agent: Option<String>,
1093 #[serde(skip_serializing_if = "Option::is_none", default)]
1094 #[doc = "Virtual processor architecture. Defaults to the host."]
1095 pub arch: Option<Arch>,
1096 #[serde(skip_serializing_if = "Option::is_none", default)]
1097 #[doc = "Arbitrary arguments passed to kvm."]
1098 #[doc = "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -smbios 'type=0,vendor=FOO'\n\nNOTE: this option is for experts only.\n"]
1099 pub args: Option<String>,
1100 #[serde(skip_serializing_if = "Option::is_none", default)]
1101 #[doc = "Configure a audio device, useful in combination with QXL/Spice."]
1102 pub audio0: Option<String>,
1103 #[serde(
1104 serialize_with = "crate::types::serialize_bool_optional",
1105 deserialize_with = "crate::types::deserialize_bool_optional"
1106 )]
1107 #[serde(skip_serializing_if = "Option::is_none", default)]
1108 #[doc = "Automatic restart after crash (currently ignored)."]
1109 pub autostart: Option<bool>,
1110 #[serde(
1111 serialize_with = "crate::types::serialize_int_optional",
1112 deserialize_with = "crate::types::deserialize_int_optional"
1113 )]
1114 #[serde(skip_serializing_if = "Option::is_none", default)]
1115 #[doc = "Amount of target RAM for the VM in MiB. Using zero disables the ballon driver."]
1116 pub balloon: Option<u64>,
1117 #[serde(skip_serializing_if = "Option::is_none", default)]
1118 #[doc = "Select BIOS implementation."]
1119 pub bios: Option<Bios>,
1120 #[serde(skip_serializing_if = "Option::is_none", default)]
1121 #[doc = "Specify guest boot order. Use the 'order=' sub-property as usage with no key or 'legacy=' is deprecated."]
1122 pub boot: Option<String>,
1123 #[serde(skip_serializing_if = "Option::is_none", default)]
1124 #[doc = "Enable booting from specified disk. Deprecated: Use 'boot: order=foo;bar' instead."]
1125 pub bootdisk: Option<String>,
1126 #[serde(skip_serializing_if = "Option::is_none", default)]
1127 #[doc = "This is an alias for option -ide2"]
1128 pub cdrom: Option<String>,
1129 #[serde(skip_serializing_if = "Option::is_none", default)]
1130 #[doc = "cloud-init: Specify custom files to replace the automatically generated ones at start."]
1131 pub cicustom: Option<String>,
1132 #[serde(skip_serializing_if = "Option::is_none", default)]
1133 #[doc = "cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords."]
1134 pub cipassword: Option<String>,
1135 #[serde(skip_serializing_if = "Option::is_none", default)]
1136 #[doc = "Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows."]
1137 pub citype: Option<Citype>,
1138 #[serde(
1139 serialize_with = "crate::types::serialize_bool_optional",
1140 deserialize_with = "crate::types::deserialize_bool_optional"
1141 )]
1142 #[serde(skip_serializing_if = "Option::is_none", default)]
1143 #[doc = "cloud-init: do an automatic package upgrade after the first boot."]
1144 pub ciupgrade: Option<bool>,
1145 #[serde(skip_serializing_if = "Option::is_none", default)]
1146 #[doc = "cloud-init: User name to change ssh keys and password for instead of the image's configured default user."]
1147 pub ciuser: Option<String>,
1148 #[serde(
1149 serialize_with = "crate::types::serialize_int_optional",
1150 deserialize_with = "crate::types::deserialize_int_optional"
1151 )]
1152 #[serde(skip_serializing_if = "Option::is_none", default)]
1153 #[doc = "The number of cores per socket."]
1154 pub cores: Option<u64>,
1155 #[serde(skip_serializing_if = "Option::is_none", default)]
1156 #[doc = "Emulated CPU type."]
1157 pub cpu: Option<String>,
1158 #[serde(
1159 serialize_with = "crate::types::serialize_number_optional",
1160 deserialize_with = "crate::types::deserialize_number_optional"
1161 )]
1162 #[serde(skip_serializing_if = "Option::is_none", default)]
1163 #[doc = "Limit of CPU usage."]
1164 #[doc = "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit."]
1165 pub cpulimit: Option<f64>,
1166 #[serde(skip_serializing_if = "Option::is_none", default)]
1167 #[doc = "CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2."]
1168 #[doc = "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs."]
1169 pub cpuunits: Option<()>,
1170 #[serde(skip_serializing_if = "Option::is_none", default)]
1171 #[doc = "A list of settings you want to delete."]
1172 pub delete: Option<String>,
1173 #[serde(skip_serializing_if = "Option::is_none", default)]
1174 #[doc = "Description for the VM. Shown in the web-interface VM's summary. This is saved as comment inside the configuration file."]
1175 pub description: Option<String>,
1176 #[serde(skip_serializing_if = "Option::is_none", default)]
1177 #[doc = "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications."]
1178 pub digest: Option<String>,
1179 #[serde(skip_serializing_if = "Option::is_none", default)]
1180 #[doc = "Configure a disk for storing EFI vars. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and that the default EFI vars are copied to the volume instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
1181 pub efidisk0: Option<String>,
1182 #[serde(
1183 serialize_with = "crate::types::serialize_bool_optional",
1184 deserialize_with = "crate::types::deserialize_bool_optional"
1185 )]
1186 #[serde(skip_serializing_if = "Option::is_none", default)]
1187 #[doc = "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal."]
1188 pub force: Option<bool>,
1189 #[serde(
1190 serialize_with = "crate::types::serialize_bool_optional",
1191 deserialize_with = "crate::types::deserialize_bool_optional"
1192 )]
1193 #[serde(skip_serializing_if = "Option::is_none", default)]
1194 #[doc = "Freeze CPU at startup (use 'c' monitor command to start execution)."]
1195 pub freeze: Option<bool>,
1196 #[serde(skip_serializing_if = "Option::is_none", default)]
1197 #[doc = "Script that will be executed during various steps in the vms lifetime."]
1198 pub hookscript: Option<String>,
1199 #[serde(rename = "hostpci[n]")]
1200 #[serde(
1201 serialize_with = "crate::types::serialize_multi::<NumberedHostpcis, _>",
1202 deserialize_with = "crate::types::deserialize_multi::<NumberedHostpcis, _>"
1203 )]
1204 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1205 #[serde(flatten)]
1206 #[doc = "Map host PCI devices into guest."]
1207 #[doc = "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer\npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"]
1208 pub hostpcis: ::std::collections::HashMap<u32, String>,
1209 #[serde(skip_serializing_if = "Option::is_none", default)]
1210 #[doc = "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory', 'usb' and 'cloudinit'. Use '0' to disable hotplug completely. Using '1' as value is an alias for the default `network,disk,usb`. USB hotplugging is possible for guests with machine version \\>= 7.1 and ostype l26 or windows \\> 7."]
1211 pub hotplug: Option<String>,
1212 #[serde(skip_serializing_if = "Option::is_none", default)]
1213 #[doc = "Enable/disable hugepages memory."]
1214 pub hugepages: Option<Hugepages>,
1215 #[serde(rename = "ide[n]")]
1216 #[serde(
1217 serialize_with = "crate::types::serialize_multi::<NumberedIdes, _>",
1218 deserialize_with = "crate::types::deserialize_multi::<NumberedIdes, _>"
1219 )]
1220 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1221 #[serde(flatten)]
1222 #[doc = "Use volume as IDE hard disk or CD-ROM (n is 0 to 3). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
1223 pub ides: ::std::collections::HashMap<u32, String>,
1224 #[serde(rename = "ipconfig[n]")]
1225 #[serde(
1226 serialize_with = "crate::types::serialize_multi::<NumberedIpconfigs, _>",
1227 deserialize_with = "crate::types::deserialize_multi::<NumberedIpconfigs, _>"
1228 )]
1229 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1230 #[serde(flatten)]
1231 #[doc = "cloud-init: Specify IP addresses and gateways for the corresponding interface.\n\nIP addresses use CIDR notation, gateways are optional but need an IP of the same type specified.\n\nThe special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit\ngateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires\ncloud-init 19.4 or newer.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using\ndhcp on IPv4.\n"]
1232 pub ipconfigs: ::std::collections::HashMap<u32, String>,
1233 #[serde(skip_serializing_if = "Option::is_none", default)]
1234 #[doc = "Inter-VM shared memory. Useful for direct communication between VMs, or to the host."]
1235 pub ivshmem: Option<String>,
1236 #[serde(
1237 serialize_with = "crate::types::serialize_bool_optional",
1238 deserialize_with = "crate::types::deserialize_bool_optional"
1239 )]
1240 #[serde(skip_serializing_if = "Option::is_none", default)]
1241 #[doc = "Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts."]
1242 pub keephugepages: Option<bool>,
1243 #[serde(skip_serializing_if = "Option::is_none", default)]
1244 #[doc = "Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS."]
1245 pub keyboard: Option<Keyboard>,
1246 #[serde(
1247 serialize_with = "crate::types::serialize_bool_optional",
1248 deserialize_with = "crate::types::deserialize_bool_optional"
1249 )]
1250 #[serde(skip_serializing_if = "Option::is_none", default)]
1251 #[doc = "Enable/disable KVM hardware virtualization."]
1252 pub kvm: Option<bool>,
1253 #[serde(
1254 serialize_with = "crate::types::serialize_bool_optional",
1255 deserialize_with = "crate::types::deserialize_bool_optional"
1256 )]
1257 #[serde(skip_serializing_if = "Option::is_none", default)]
1258 #[doc = "Set the real time clock (RTC) to local time. This is enabled by default if the `ostype` indicates a Microsoft Windows OS."]
1259 pub localtime: Option<bool>,
1260 #[serde(skip_serializing_if = "Option::is_none", default)]
1261 #[doc = "Lock/unlock the VM."]
1262 pub lock: Option<Lock>,
1263 #[serde(skip_serializing_if = "Option::is_none", default)]
1264 #[doc = "Specifies the QEMU machine type."]
1265 pub machine: Option<String>,
1266 #[serde(skip_serializing_if = "Option::is_none", default)]
1267 #[doc = "Memory properties."]
1268 pub memory: Option<String>,
1269 #[serde(
1270 serialize_with = "crate::types::serialize_number_optional",
1271 deserialize_with = "crate::types::deserialize_number_optional"
1272 )]
1273 #[serde(skip_serializing_if = "Option::is_none", default)]
1274 #[doc = "Set maximum tolerated downtime (in seconds) for migrations."]
1275 pub migrate_downtime: Option<f64>,
1276 #[serde(
1277 serialize_with = "crate::types::serialize_int_optional",
1278 deserialize_with = "crate::types::deserialize_int_optional"
1279 )]
1280 #[serde(skip_serializing_if = "Option::is_none", default)]
1281 #[doc = "Set maximum speed (in MB/s) for migrations. Value 0 is no limit."]
1282 pub migrate_speed: Option<u64>,
1283 #[serde(skip_serializing_if = "Option::is_none", default)]
1284 #[doc = "Set a name for the VM. Only used on the configuration web interface."]
1285 pub name: Option<String>,
1286 #[serde(skip_serializing_if = "Option::is_none", default)]
1287 #[doc = "cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set."]
1288 pub nameserver: Option<String>,
1289 #[serde(rename = "net[n]")]
1290 #[serde(
1291 serialize_with = "crate::types::serialize_multi::<NumberedNets, _>",
1292 deserialize_with = "crate::types::deserialize_multi::<NumberedNets, _>"
1293 )]
1294 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1295 #[serde(flatten)]
1296 #[doc = "Specify network devices."]
1297 pub nets: ::std::collections::HashMap<u32, String>,
1298 #[serde(
1299 serialize_with = "crate::types::serialize_bool_optional",
1300 deserialize_with = "crate::types::deserialize_bool_optional"
1301 )]
1302 #[serde(skip_serializing_if = "Option::is_none", default)]
1303 #[doc = "Enable/disable NUMA."]
1304 pub numa: Option<bool>,
1305 #[serde(rename = "numa[n]")]
1306 #[serde(
1307 serialize_with = "crate::types::serialize_multi::<NumberedNumas, _>",
1308 deserialize_with = "crate::types::deserialize_multi::<NumberedNumas, _>"
1309 )]
1310 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1311 #[serde(flatten)]
1312 #[doc = "NUMA topology."]
1313 pub numas: ::std::collections::HashMap<u32, String>,
1314 #[serde(
1315 serialize_with = "crate::types::serialize_bool_optional",
1316 deserialize_with = "crate::types::deserialize_bool_optional"
1317 )]
1318 #[serde(skip_serializing_if = "Option::is_none", default)]
1319 #[doc = "Specifies whether a VM will be started during system bootup."]
1320 pub onboot: Option<bool>,
1321 #[serde(skip_serializing_if = "Option::is_none", default)]
1322 #[doc = "Specify guest operating system."]
1323 #[doc = "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012/2012r2\nwin10;; Microsoft Windows 10/2016/2019\nwin11;; Microsoft Windows 11/2022\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6 - 6.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"]
1324 pub ostype: Option<Ostype>,
1325 #[serde(rename = "parallel[n]")]
1326 #[serde(
1327 serialize_with = "crate::types::serialize_multi::<NumberedParallels, _>",
1328 deserialize_with = "crate::types::deserialize_multi::<NumberedParallels, _>"
1329 )]
1330 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1331 #[serde(flatten)]
1332 #[doc = "Map host parallel devices (n is 0 to 2)."]
1333 #[doc = "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such\nmachines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"]
1334 pub parallels: ::std::collections::HashMap<u32, String>,
1335 #[serde(
1336 serialize_with = "crate::types::serialize_bool_optional",
1337 deserialize_with = "crate::types::deserialize_bool_optional"
1338 )]
1339 #[serde(skip_serializing_if = "Option::is_none", default)]
1340 #[doc = "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations."]
1341 pub protection: Option<bool>,
1342 #[serde(
1343 serialize_with = "crate::types::serialize_bool_optional",
1344 deserialize_with = "crate::types::deserialize_bool_optional"
1345 )]
1346 #[serde(skip_serializing_if = "Option::is_none", default)]
1347 #[doc = "Allow reboot. If set to '0' the VM exit on reboot."]
1348 pub reboot: Option<bool>,
1349 #[serde(skip_serializing_if = "Option::is_none", default)]
1350 #[doc = "Revert a pending change."]
1351 pub revert: Option<String>,
1352 #[serde(skip_serializing_if = "Option::is_none", default)]
1353 #[doc = "Configure a VirtIO-based Random Number Generator."]
1354 pub rng0: Option<String>,
1355 #[serde(rename = "sata[n]")]
1356 #[serde(
1357 serialize_with = "crate::types::serialize_multi::<NumberedSatas, _>",
1358 deserialize_with = "crate::types::deserialize_multi::<NumberedSatas, _>"
1359 )]
1360 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1361 #[serde(flatten)]
1362 #[doc = "Use volume as SATA hard disk or CD-ROM (n is 0 to 5). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
1363 pub satas: ::std::collections::HashMap<u32, String>,
1364 #[serde(rename = "scsi[n]")]
1365 #[serde(
1366 serialize_with = "crate::types::serialize_multi::<NumberedScsis, _>",
1367 deserialize_with = "crate::types::deserialize_multi::<NumberedScsis, _>"
1368 )]
1369 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1370 #[serde(flatten)]
1371 #[doc = "Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
1372 pub scsis: ::std::collections::HashMap<u32, String>,
1373 #[serde(skip_serializing_if = "Option::is_none", default)]
1374 #[doc = "SCSI controller model"]
1375 pub scsihw: Option<Scsihw>,
1376 #[serde(skip_serializing_if = "Option::is_none", default)]
1377 #[doc = "cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set."]
1378 pub searchdomain: Option<String>,
1379 #[serde(rename = "serial[n]")]
1380 #[serde(
1381 serialize_with = "crate::types::serialize_multi::<NumberedSerials, _>",
1382 deserialize_with = "crate::types::deserialize_multi::<NumberedSerials, _>"
1383 )]
1384 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1385 #[serde(flatten)]
1386 #[doc = "Create a serial device inside the VM (n is 0 to 3)"]
1387 #[doc = "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines -\nuse with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"]
1388 pub serials: ::std::collections::HashMap<u32, String>,
1389 #[serde(
1390 serialize_with = "crate::types::serialize_int_optional",
1391 deserialize_with = "crate::types::deserialize_int_optional"
1392 )]
1393 #[serde(skip_serializing_if = "Option::is_none", default)]
1394 #[doc = "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. Auto-ballooning is done by pvestatd."]
1395 pub shares: Option<u64>,
1396 #[serde(
1397 serialize_with = "crate::types::serialize_bool_optional",
1398 deserialize_with = "crate::types::deserialize_bool_optional"
1399 )]
1400 #[serde(skip_serializing_if = "Option::is_none", default)]
1401 #[doc = "Ignore locks - only root is allowed to use this option."]
1402 pub skiplock: Option<bool>,
1403 #[serde(skip_serializing_if = "Option::is_none", default)]
1404 #[doc = "Specify SMBIOS type 1 fields."]
1405 pub smbios1: Option<String>,
1406 #[serde(
1407 serialize_with = "crate::types::serialize_int_optional",
1408 deserialize_with = "crate::types::deserialize_int_optional"
1409 )]
1410 #[serde(skip_serializing_if = "Option::is_none", default)]
1411 #[doc = "The number of CPUs. Please use option -sockets instead."]
1412 pub smp: Option<u64>,
1413 #[serde(
1414 serialize_with = "crate::types::serialize_int_optional",
1415 deserialize_with = "crate::types::deserialize_int_optional"
1416 )]
1417 #[serde(skip_serializing_if = "Option::is_none", default)]
1418 #[doc = "The number of CPU sockets."]
1419 pub sockets: Option<u64>,
1420 #[serde(skip_serializing_if = "Option::is_none", default)]
1421 #[doc = "Configure additional enhancements for SPICE."]
1422 pub spice_enhancements: Option<String>,
1423 #[serde(skip_serializing_if = "Option::is_none", default)]
1424 #[doc = "cloud-init: Setup public SSH keys (one key per line, OpenSSH format)."]
1425 pub sshkeys: Option<String>,
1426 #[serde(skip_serializing_if = "Option::is_none", default)]
1427 #[doc = "Set the initial date of the real time clock. Valid format for date are:'now' or '2006-06-17T16:01:21' or '2006-06-17'."]
1428 pub startdate: Option<String>,
1429 #[serde(skip_serializing_if = "Option::is_none", default)]
1430 #[doc = "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped."]
1431 pub startup: Option<String>,
1432 #[serde(
1433 serialize_with = "crate::types::serialize_bool_optional",
1434 deserialize_with = "crate::types::deserialize_bool_optional"
1435 )]
1436 #[serde(skip_serializing_if = "Option::is_none", default)]
1437 #[doc = "Enable/disable the USB tablet device."]
1438 #[doc = "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (`qm set \\<vmid\\> --vga qxl`)."]
1439 pub tablet: Option<bool>,
1440 #[serde(skip_serializing_if = "Option::is_none", default)]
1441 #[doc = "Tags of the VM. This is only meta information."]
1442 pub tags: Option<String>,
1443 #[serde(
1444 serialize_with = "crate::types::serialize_bool_optional",
1445 deserialize_with = "crate::types::deserialize_bool_optional"
1446 )]
1447 #[serde(skip_serializing_if = "Option::is_none", default)]
1448 #[doc = "Enable/disable time drift fix."]
1449 pub tdf: Option<bool>,
1450 #[serde(
1451 serialize_with = "crate::types::serialize_bool_optional",
1452 deserialize_with = "crate::types::deserialize_bool_optional"
1453 )]
1454 #[serde(skip_serializing_if = "Option::is_none", default)]
1455 #[doc = "Enable/disable Template."]
1456 pub template: Option<bool>,
1457 #[serde(skip_serializing_if = "Option::is_none", default)]
1458 #[doc = "Configure a Disk for storing TPM state. The format is fixed to 'raw'. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and 4 MiB will be used instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
1459 pub tpmstate0: Option<String>,
1460 #[serde(rename = "unused[n]")]
1461 #[serde(
1462 serialize_with = "crate::types::serialize_multi::<NumberedUnuseds, _>",
1463 deserialize_with = "crate::types::deserialize_multi::<NumberedUnuseds, _>"
1464 )]
1465 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1466 #[serde(flatten)]
1467 #[doc = "Reference to unused volumes. This is used internally, and should not be modified manually."]
1468 pub unuseds: ::std::collections::HashMap<u32, String>,
1469 #[serde(rename = "usb[n]")]
1470 #[serde(
1471 serialize_with = "crate::types::serialize_multi::<NumberedUsbs, _>",
1472 deserialize_with = "crate::types::deserialize_multi::<NumberedUsbs, _>"
1473 )]
1474 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1475 #[serde(flatten)]
1476 #[doc = "Configure an USB device (n is 0 to 4, for machine version \\>= 7.1 and ostype l26 or windows \\> 7, n can be up to 14)."]
1477 pub usbs: ::std::collections::HashMap<u32, String>,
1478 #[serde(
1479 serialize_with = "crate::types::serialize_int_optional",
1480 deserialize_with = "crate::types::deserialize_int_optional"
1481 )]
1482 #[serde(skip_serializing_if = "Option::is_none", default)]
1483 #[doc = "Number of hotplugged vcpus."]
1484 pub vcpus: Option<u64>,
1485 #[serde(skip_serializing_if = "Option::is_none", default)]
1486 #[doc = "Configure the VGA hardware."]
1487 #[doc = "Configure the VGA Hardware. If you want to use high resolution modes (\\>= 1280x1024x16) you may need to increase the vga memory option. Since QEMU 2.9 the default VGA display type is 'std' for all OS types besides some Windows versions (XP and older) which use 'cirrus'. The 'qxl' option enables the SPICE display server. For win* OS you can select how many independent displays you want, Linux guests can add displays them self.\nYou can also run without any graphic card, using a serial device as terminal."]
1488 pub vga: Option<String>,
1489 #[serde(rename = "virtio[n]")]
1490 #[serde(
1491 serialize_with = "crate::types::serialize_multi::<NumberedVirtios, _>",
1492 deserialize_with = "crate::types::deserialize_multi::<NumberedVirtios, _>"
1493 )]
1494 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
1495 #[serde(flatten)]
1496 #[doc = "Use volume as VIRTIO hard disk (n is 0 to 15). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume."]
1497 pub virtios: ::std::collections::HashMap<u32, String>,
1498 #[serde(skip_serializing_if = "Option::is_none", default)]
1499 #[doc = "Set VM Generation ID. Use '1' to autogenerate on create or update, pass '0' to disable explicitly."]
1500 #[doc = "The VM generation ID (vmgenid) device exposes a 128-bit integer value identifier to the guest OS. This allows to notify the guest operating system when the virtual machine is executed with a different configuration (e.g. snapshot execution or creation from a template). The guest operating system notices the change, and is then able to react as appropriate by marking its copies of distributed databases as dirty, re-initializing its random number generator, etc.\nNote that auto-creation only works when done through API/CLI create or update methods, but not when manually editing the config file."]
1501 pub vmgenid: Option<String>,
1502 #[serde(skip_serializing_if = "Option::is_none", default)]
1503 #[doc = "Default storage for VM state volumes/files."]
1504 pub vmstatestorage: Option<String>,
1505 #[serde(skip_serializing_if = "Option::is_none", default)]
1506 #[doc = "Create a virtual hardware watchdog device."]
1507 #[doc = "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)"]
1508 pub watchdog: Option<String>,
1509 #[serde(
1510 flatten,
1511 deserialize_with = "crate::types::multi::deserialize_additional_data::<'_, PutParams, _, _>"
1512 )]
1513 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
1514}
1515impl crate::types::multi::Test for PutParams {
1516 fn test_fn() -> fn(&str) -> bool {
1517 fn the_test(input: &str) -> bool {
1518 let array = [
1519 <NumberedHostpcis as crate::types::multi::NumberedItems>::key_matches
1520 as fn(&str) -> bool,
1521 <NumberedIdes as crate::types::multi::NumberedItems>::key_matches
1522 as fn(&str) -> bool,
1523 <NumberedIpconfigs as crate::types::multi::NumberedItems>::key_matches
1524 as fn(&str) -> bool,
1525 <NumberedNets as crate::types::multi::NumberedItems>::key_matches
1526 as fn(&str) -> bool,
1527 <NumberedNumas as crate::types::multi::NumberedItems>::key_matches
1528 as fn(&str) -> bool,
1529 <NumberedParallels as crate::types::multi::NumberedItems>::key_matches
1530 as fn(&str) -> bool,
1531 <NumberedSatas as crate::types::multi::NumberedItems>::key_matches
1532 as fn(&str) -> bool,
1533 <NumberedScsis as crate::types::multi::NumberedItems>::key_matches
1534 as fn(&str) -> bool,
1535 <NumberedSerials as crate::types::multi::NumberedItems>::key_matches
1536 as fn(&str) -> bool,
1537 <NumberedUnuseds as crate::types::multi::NumberedItems>::key_matches
1538 as fn(&str) -> bool,
1539 <NumberedUsbs as crate::types::multi::NumberedItems>::key_matches
1540 as fn(&str) -> bool,
1541 <NumberedVirtios as crate::types::multi::NumberedItems>::key_matches
1542 as fn(&str) -> bool,
1543 ];
1544 array.iter().any(|f| f(input))
1545 }
1546 the_test as _
1547 }
1548}
1549#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
1550pub enum Arch {
1551 #[serde(rename = "aarch64")]
1552 Aarch64,
1553 #[serde(rename = "x86_64")]
1554 X8664,
1555}
1556#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
1557pub enum Bios {
1558 #[serde(rename = "ovmf")]
1559 Ovmf,
1560 #[serde(rename = "seabios")]
1561 Seabios,
1562}
1563impl Default for Bios {
1564 fn default() -> Self {
1565 Self::Seabios
1566 }
1567}
1568#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
1569pub enum Citype {
1570 #[serde(rename = "configdrive2")]
1571 Configdrive2,
1572 #[serde(rename = "nocloud")]
1573 Nocloud,
1574 #[serde(rename = "opennebula")]
1575 Opennebula,
1576}
1577#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
1578pub enum Hugepages {
1579 #[serde(rename = "1024")]
1580 _1024,
1581 #[serde(rename = "2")]
1582 _2,
1583 #[serde(rename = "any")]
1584 Any,
1585}
1586#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
1587pub enum Keyboard {
1588 #[serde(rename = "da")]
1589 Da,
1590 #[serde(rename = "de")]
1591 De,
1592 #[serde(rename = "de-ch")]
1593 DeCh,
1594 #[serde(rename = "en-gb")]
1595 EnGb,
1596 #[serde(rename = "en-us")]
1597 EnUs,
1598 #[serde(rename = "es")]
1599 Es,
1600 #[serde(rename = "fi")]
1601 Fi,
1602 #[serde(rename = "fr")]
1603 Fr,
1604 #[serde(rename = "fr-be")]
1605 FrBe,
1606 #[serde(rename = "fr-ca")]
1607 FrCa,
1608 #[serde(rename = "fr-ch")]
1609 FrCh,
1610 #[serde(rename = "hu")]
1611 Hu,
1612 #[serde(rename = "is")]
1613 Is,
1614 #[serde(rename = "it")]
1615 It,
1616 #[serde(rename = "ja")]
1617 Ja,
1618 #[serde(rename = "lt")]
1619 Lt,
1620 #[serde(rename = "mk")]
1621 Mk,
1622 #[serde(rename = "nl")]
1623 Nl,
1624 #[serde(rename = "no")]
1625 No,
1626 #[serde(rename = "pl")]
1627 Pl,
1628 #[serde(rename = "pt")]
1629 Pt,
1630 #[serde(rename = "pt-br")]
1631 PtBr,
1632 #[serde(rename = "sl")]
1633 Sl,
1634 #[serde(rename = "sv")]
1635 Sv,
1636 #[serde(rename = "tr")]
1637 Tr,
1638}
1639#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
1640pub enum Lock {
1641 #[serde(rename = "backup")]
1642 Backup,
1643 #[serde(rename = "clone")]
1644 Clone,
1645 #[serde(rename = "create")]
1646 Create,
1647 #[serde(rename = "migrate")]
1648 Migrate,
1649 #[serde(rename = "rollback")]
1650 Rollback,
1651 #[serde(rename = "snapshot")]
1652 Snapshot,
1653 #[serde(rename = "snapshot-delete")]
1654 SnapshotDelete,
1655 #[serde(rename = "suspended")]
1656 Suspended,
1657 #[serde(rename = "suspending")]
1658 Suspending,
1659}
1660#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
1661pub enum Ostype {
1662 #[serde(rename = "l24")]
1663 L24,
1664 #[serde(rename = "l26")]
1665 L26,
1666 #[serde(rename = "other")]
1667 Other,
1668 #[serde(rename = "solaris")]
1669 Solaris,
1670 #[serde(rename = "w2k")]
1671 W2k,
1672 #[serde(rename = "w2k3")]
1673 W2k3,
1674 #[serde(rename = "w2k8")]
1675 W2k8,
1676 #[serde(rename = "win10")]
1677 Win10,
1678 #[serde(rename = "win11")]
1679 Win11,
1680 #[serde(rename = "win7")]
1681 Win7,
1682 #[serde(rename = "win8")]
1683 Win8,
1684 #[serde(rename = "wvista")]
1685 Wvista,
1686 #[serde(rename = "wxp")]
1687 Wxp,
1688}
1689#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
1690pub enum Scsihw {
1691 #[serde(rename = "lsi")]
1692 Lsi,
1693 #[serde(rename = "lsi53c810")]
1694 Lsi53c810,
1695 #[serde(rename = "megasas")]
1696 Megasas,
1697 #[serde(rename = "pvscsi")]
1698 Pvscsi,
1699 #[serde(rename = "virtio-scsi-pci")]
1700 VirtioScsiPci,
1701 #[serde(rename = "virtio-scsi-single")]
1702 VirtioScsiSingle,
1703}
1704impl Default for Scsihw {
1705 fn default() -> Self {
1706 Self::Lsi
1707 }
1708}
1709#[derive(Default)]
1710struct NumberedHostpcis;
1711impl crate::types::multi::NumberedItems for NumberedHostpcis {
1712 type Item = String;
1713 const PREFIX: &'static str = "hostpci";
1714}
1715#[derive(Default)]
1716struct NumberedIdes;
1717impl crate::types::multi::NumberedItems for NumberedIdes {
1718 type Item = String;
1719 const PREFIX: &'static str = "ide";
1720}
1721#[derive(Default)]
1722struct NumberedIpconfigs;
1723impl crate::types::multi::NumberedItems for NumberedIpconfigs {
1724 type Item = String;
1725 const PREFIX: &'static str = "ipconfig";
1726}
1727#[derive(Default)]
1728struct NumberedNets;
1729impl crate::types::multi::NumberedItems for NumberedNets {
1730 type Item = String;
1731 const PREFIX: &'static str = "net";
1732}
1733#[derive(Default)]
1734struct NumberedNumas;
1735impl crate::types::multi::NumberedItems for NumberedNumas {
1736 type Item = String;
1737 const PREFIX: &'static str = "numa";
1738}
1739#[derive(Default)]
1740struct NumberedParallels;
1741impl crate::types::multi::NumberedItems for NumberedParallels {
1742 type Item = String;
1743 const PREFIX: &'static str = "parallel";
1744}
1745#[derive(Default)]
1746struct NumberedSatas;
1747impl crate::types::multi::NumberedItems for NumberedSatas {
1748 type Item = String;
1749 const PREFIX: &'static str = "sata";
1750}
1751#[derive(Default)]
1752struct NumberedScsis;
1753impl crate::types::multi::NumberedItems for NumberedScsis {
1754 type Item = String;
1755 const PREFIX: &'static str = "scsi";
1756}
1757#[derive(Default)]
1758struct NumberedSerials;
1759impl crate::types::multi::NumberedItems for NumberedSerials {
1760 type Item = String;
1761 const PREFIX: &'static str = "serial";
1762}
1763#[derive(Default)]
1764struct NumberedUnuseds;
1765impl crate::types::multi::NumberedItems for NumberedUnuseds {
1766 type Item = String;
1767 const PREFIX: &'static str = "unused";
1768}
1769#[derive(Default)]
1770struct NumberedUsbs;
1771impl crate::types::multi::NumberedItems for NumberedUsbs {
1772 type Item = String;
1773 const PREFIX: &'static str = "usb";
1774}
1775#[derive(Default)]
1776struct NumberedVirtios;
1777impl crate::types::multi::NumberedItems for NumberedVirtios {
1778 type Item = String;
1779 const PREFIX: &'static str = "virtio";
1780}