1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
* Proxmox Virtual Environment API
*
* Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
*
* The version of the OpenAPI document: 9.x
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClusterQemuConfigResponseDataInner {
/// Emulated CPU type. Can be default or custom name (custom model names must be prefixed with 'custom-').
#[serde(rename = "cputype")]
pub cputype: String,
/// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
#[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
pub digest: Option<String>,
/// List of additional CPU flags separated by ';'. Use '+FLAG' to enable, '-FLAG' to disable a flag. There is a special 'nested-virt' shorthand which controls nested virtualization for the current CPU ('svm' for AMD and 'vmx' for Intel). Custom CPU models can specify any flag supported by QEMU/KVM, VM-specific flags must be from the following set for security reasons: aes, amd-no-ssb, amd-ssbd, hv-evmcs, hv-tlbflush, ibpb, md-clear, nested-virt, pcid, pdpe1gb, spec-ctrl, ssbd, virt-ssbd
#[serde(rename = "flags", skip_serializing_if = "Option::is_none")]
pub flags: Option<String>,
/// Number of physical address bits available to the guest.
#[serde(rename = "guest-phys-bits", skip_serializing_if = "Option::is_none")]
pub guest_phys_bits: Option<i32>,
/// Do not identify as a KVM virtual machine. Only affects vCPUs with x86-64 architecture.
#[serde(rename = "hidden", skip_serializing_if = "Option::is_none")]
pub hidden: Option<models::PveBoolean>,
/// The Hyper-V vendor ID. Some drivers or programs inside Windows guests need a specific ID.
#[serde(rename = "hv-vendor-id", skip_serializing_if = "Option::is_none")]
pub hv_vendor_id: Option<String>,
/// Maximum input value for the basic CPUID leaves the guest can query - that is the vendor (leaf 0), family/model/stepping and feature bits (leaf 1), cache and topology info (leaves 4 and B), and so on. Higher-numbered leaves are hidden. Setting '30' is a common workaround for Hyper-V boot failures on Windows guests running on recent Intel hosts. Only applies when the vCPU architecture is x86_64.
#[serde(rename = "level", skip_serializing_if = "Option::is_none")]
pub level: Option<i32>,
/// The physical memory address bits that are reported to the guest OS. Should be smaller or equal to the host's. Set to 'host' to use value from host CPU, but note that doing so will break live migration to CPUs with other values.
#[serde(rename = "phys-bits", skip_serializing_if = "Option::is_none")]
pub phys_bits: Option<String>,
/// CPU model and vendor to report to the guest. Must be a QEMU/KVM supported model. Only valid for custom CPU model definitions, default models will always report themselves to the guest OS.
#[serde(rename = "reported-model", skip_serializing_if = "Option::is_none")]
pub reported_model: Option<models::PveReportedModelEnum>,
}
impl ClusterQemuConfigResponseDataInner {
pub fn new(cputype: String) -> ClusterQemuConfigResponseDataInner {
ClusterQemuConfigResponseDataInner {
cputype,
digest: None,
flags: None,
guest_phys_bits: None,
hidden: None,
hv_vendor_id: None,
level: None,
phys_bits: None,
reported_model: None,
}
}
}