Skip to content

Commit

Permalink
Add kvm flag
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenHoms committed Oct 22, 2021
1 parent 094e136 commit 2af7d4a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions proxmox/qemu_structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ var resourceQemuSchema = map[string]*schema.Schema{
Type: schema.TypeString,
Optional: true,
},
"kvm": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"sshkeys": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -377,6 +382,7 @@ func flattenVmQemu(vmr *pxapi.VmRef, config *pxapi.ConfigQemu, d *schema.Resourc
d.Set("vcpus", config.QemuVcpus)
d.Set("cpu", config.QemuCpu)
d.Set("numa", config.QemuNuma)
d.Set("kvm", config.QemuKVM)
d.Set("hotplug", config.Hotplug)
d.Set("scsihw", config.Scsihw)
d.Set("hastate", vmr.HaState())
Expand Down Expand Up @@ -488,6 +494,7 @@ func expandVmQemu(d *schema.ResourceData) pxapi.ConfigQemu {
QemuVcpus: d.Get("vcpus").(int),
QemuCpu: d.Get("cpu").(string),
QemuNuma: d.Get("numa").(bool),
QemuKVM: d.Get("kvm").(bool),
Hotplug: d.Get("hotplug").(string),
Scsihw: d.Get("scsihw").(string),
HaState: d.Get("hastate").(string),
Expand Down

0 comments on commit 2af7d4a

Please sign in to comment.