diff --git a/api/v1beta1/type.go b/api/v1beta1/type.go index aca7623..0221840 100644 --- a/api/v1beta1/type.go +++ b/api/v1beta1/type.go @@ -68,8 +68,8 @@ type Hardware struct { // +kubebuilder:default:=2 CPU int `json:"cpu,omitempty"` - // emulated cpu type - // CPUType string `json:"cpuType,omitempty"` + // Emulated CPU Type. Defaults to kvm64 + CPUType string `json:"cpuType,omitempty"` // +kubebuilder:validation:Minimum:=1 // The number of CPU sockets. Defaults to 1. diff --git a/cloud/services/compute/instance/qemu.go b/cloud/services/compute/instance/qemu.go index 037a1bc..dba3743 100644 --- a/cloud/services/compute/instance/qemu.go +++ b/cloud/services/compute/instance/qemu.go @@ -120,6 +120,7 @@ func (s *Service) generateVMOptions() api.VirtualMachineCreateOptions { Boot: fmt.Sprintf("order=%s", bootDvice), CiCustom: cicustom, Cores: hardware.CPU, + Cpu: hardware.CPUType, CpuLimit: hardware.CPULimit, Description: options.Description, HugePages: options.HugePages.String(), diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachines.yaml index 65944e9..1c8ea51 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachines.yaml @@ -247,6 +247,9 @@ spec: Defaults to 0. minimum: 0 type: integer + cpuType: + description: Emulated CPU Type. Defaults to kvm64 + type: string disk: default: 50G description: hard disk size diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachinetemplates.yaml index f47a2c0..312207d 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachinetemplates.yaml @@ -264,6 +264,9 @@ spec: no CPU limit. Defaults to 0. minimum: 0 type: integer + cpuType: + description: Emulated CPU Type. Defaults to kvm64 + type: string disk: default: 50G description: hard disk size