Skip to content

Commit

Permalink
Support setting the BIOS implementation (seabios|ovmf)
Browse files Browse the repository at this point in the history
This allows booting UEFI VMs.
  • Loading branch information
basvandijk committed Jan 30, 2020
1 parent e463f3d commit f76d701
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ func resourceVmQemu() *schema.Resource {
Type: schema.TypeString,
Required: true,
},
"bios": {
Type: schema.TypeString,
Optional: true,
Default: "seabios",
},
"onboot": {
Type: schema.TypeBool,
Optional: true,
Expand Down Expand Up @@ -498,6 +503,7 @@ func resourceVmQemuCreate(d *schema.ResourceData, meta interface{}) error {
Name: vmName,
Description: d.Get("desc").(string),
Pool: d.Get("pool").(string),
Bios: d.Get("bios").(string),
Onboot: d.Get("onboot").(bool),
Boot: d.Get("boot").(string),
BootDisk: d.Get("bootdisk").(string),
Expand Down Expand Up @@ -695,6 +701,7 @@ func resourceVmQemuUpdate(d *schema.ResourceData, meta interface{}) error {
Name: d.Get("name").(string),
Description: d.Get("desc").(string),
Pool: d.Get("pool").(string),
Bios: d.Get("bios").(string),
Onboot: d.Get("onboot").(bool),
Boot: d.Get("boot").(string),
BootDisk: d.Get("bootdisk").(string),
Expand Down Expand Up @@ -798,6 +805,7 @@ func resourceVmQemuRead(d *schema.ResourceData, meta interface{}) error {
d.Set("name", config.Name)
d.Set("desc", config.Description)
d.Set("pool", config.Pool)
d.Set("bios", config.Bios)
d.Set("onboot", config.Onboot)
d.Set("boot", config.Boot)
d.Set("bootdisk", config.BootDisk)
Expand Down

0 comments on commit f76d701

Please sign in to comment.