use the value of disable kvm flag when creating the VM

This commit is contained in:
Roman Tomjak 2020-07-15 19:12:01 +01:00
parent 60d38f1e10
commit 376b8c045e
No known key found for this signature in database
GPG Key ID: BB29BA0B3501D719
1 changed files with 6 additions and 0 deletions

View File

@ -27,12 +27,18 @@ func (s *stepStartVM) Run(ctx context.Context, state multistep.StateBag) multist
agent = 0
}
kvm := true
if c.DisableKVM {
kvm = false
}
isoFile := state.Get("iso_file").(string)
ui.Say("Creating VM")
config := proxmox.ConfigQemu{
Name: c.VMName,
Agent: agent,
QemuKVM: kvm,
Boot: "cdn", // Boot priority, c:CDROM -> d:Disk -> n:Network
QemuCpu: c.CPUType,
Description: "Packer ephemeral build VM",