Skip to main content

clientapi_pve/models/
cluster_qemu_create_custom_cpu_models_request.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ClusterQemuCreateCustomCpuModelsRequest {
16
17    /// Name for the custom CPU model. The 'custom-' prefix is optional.
18    #[serde(rename = "cputype")]
19    pub cputype: String,
20
21    /// 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
22    #[serde(rename = "flags", skip_serializing_if = "Option::is_none")]
23    pub flags: Option<String>,
24
25    /// Number of physical address bits available to the guest.
26    #[serde(rename = "guest-phys-bits", skip_serializing_if = "Option::is_none")]
27    pub guest_phys_bits: Option<i32>,
28
29    /// Do not identify as a KVM virtual machine. Only affects vCPUs with x86-64 architecture.
30    #[serde(rename = "hidden", skip_serializing_if = "Option::is_none")]
31    pub hidden: Option<models::PveBoolean>,
32
33    /// The Hyper-V vendor ID. Some drivers or programs inside Windows guests need a specific ID.
34    #[serde(rename = "hv-vendor-id", skip_serializing_if = "Option::is_none")]
35    pub hv_vendor_id: Option<String>,
36
37    /// 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.
38    #[serde(rename = "level", skip_serializing_if = "Option::is_none")]
39    pub level: Option<i32>,
40
41    /// 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.
42    #[serde(rename = "phys-bits", skip_serializing_if = "Option::is_none")]
43    pub phys_bits: Option<String>,
44
45    /// 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.
46    #[serde(rename = "reported-model")]
47    pub reported_model: models::PveReportedModelEnum,
48
49
50}
51
52impl ClusterQemuCreateCustomCpuModelsRequest {
53    pub fn new(cputype: String, reported_model: models::PveReportedModelEnum) -> ClusterQemuCreateCustomCpuModelsRequest {
54        ClusterQemuCreateCustomCpuModelsRequest {
55            
56            cputype,
57            
58            flags: None,
59            
60            guest_phys_bits: None,
61            
62            hidden: None,
63            
64            hv_vendor_id: None,
65            
66            level: None,
67            
68            phys_bits: None,
69            
70            reported_model,
71            
72        }
73    }
74}
75
76