Skip to content

Commit d1253db

Browse files
committed
Enable CPU Type on machine template
1 parent a05c8c4 commit d1253db

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

api/v1beta1/type.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ type Hardware struct {
6868
// +kubebuilder:default:=2
6969
CPU int `json:"cpu,omitempty"`
7070

71-
// emulated cpu type
72-
// CPUType string `json:"cpuType,omitempty"`
71+
// Emulated CPU Type. Defaults to kvm64
72+
CPUType string `json:"cpuType,omitempty"`
7373

7474
// +kubebuilder:validation:Minimum:=1
7575
// The number of CPU sockets. Defaults to 1.

cloud/services/compute/instance/qemu.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ func (s *Service) generateVMOptions() api.VirtualMachineCreateOptions {
105105
Boot: fmt.Sprintf("order=%s", bootDvice),
106106
CiCustom: cicustom,
107107
Cores: hardware.CPU,
108+
Cpu: hardware.CPUType,
108109
CpuLimit: hardware.CPULimit,
109110
Description: options.Description,
110111
HugePages: options.HugePages.String(),

config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachines.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ spec:
247247
Defaults to 0.
248248
minimum: 0
249249
type: integer
250+
cpuType:
251+
description: Emulated CPU Type. Defaults to kvm64
252+
type: string
250253
disk:
251254
default: 50G
252255
description: hard disk size

config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachinetemplates.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ spec:
264264
no CPU limit. Defaults to 0.
265265
minimum: 0
266266
type: integer
267+
cpuType:
268+
description: Emulated CPU Type. Defaults to kvm64
269+
type: string
267270
disk:
268271
default: 50G
269272
description: hard disk size

0 commit comments

Comments
 (0)