Skip to content

Commit 3d2890a

Browse files
authored
Merge pull request #174 from gecgooden/enable-cpu-type
Enable CPU Type on machine template
2 parents dff1aaf + d1253db commit 3d2890a

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

api/v1beta1/type.go

+2-2
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

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ func (s *Service) generateVMOptions() api.VirtualMachineCreateOptions {
120120
Boot: fmt.Sprintf("order=%s", bootDvice),
121121
CiCustom: cicustom,
122122
Cores: hardware.CPU,
123+
Cpu: hardware.CPUType,
123124
CpuLimit: hardware.CPULimit,
124125
Description: options.Description,
125126
HugePages: options.HugePages.String(),

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

+3
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

+3
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)