Skip to content

Commit d1b7323

Browse files
authored
Added BIOS changing stuff (#25)
1 parent 4a21844 commit d1b7323

File tree

10 files changed

+50
-3
lines changed

10 files changed

+50
-3
lines changed

builder/proxmox/clone/config.hcl2spec.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

builder/proxmox/common/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ type Config struct {
5151
CPUType string `mapstructure:"cpu_type"`
5252
Sockets int `mapstructure:"sockets"`
5353
OS string `mapstructure:"os"`
54+
BIOS string `mapstructure:"bios"`
55+
EFIDisk string `mapstructure:"efidisk"`
56+
Machine string `mapstructure:"machine"`
5457
VGA vgaConfig `mapstructure:"vga"`
5558
NICs []nicConfig `mapstructure:"network_adapters"`
5659
Disks []diskConfig `mapstructure:"disks"`

builder/proxmox/common/config.hcl2spec.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

builder/proxmox/common/step_start_vm.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ func (s *stepStartVM) Run(ctx context.Context, state multistep.StateBag) multist
5454
QemuCores: c.Cores,
5555
QemuSockets: c.Sockets,
5656
QemuOs: c.OS,
57+
Bios: c.BIOS,
58+
EFIDisk: c.EFIDisk,
59+
Machine: c.Machine,
5760
QemuVga: generateProxmoxVga(c.VGA),
5861
QemuNetworks: generateProxmoxNetworkAdapters(c.NICs),
5962
QemuDisks: generateProxmoxDisks(c.Disks),

builder/proxmox/iso/config.hcl2spec.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs-partials/builder/proxmox/common/Config-not-required.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434

3535
- `os` (string) - OS
3636

37+
- `bios` (string) - BIOS
38+
39+
- `efidisk` (string) - EFI Disk
40+
41+
- `machine` (string) - Machine
42+
3743
- `vga` (vgaConfig) - VGA
3844

3945
- `network_adapters` ([]nicConfig) - NI Cs

docs/builders/clone.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ in the image's Cloud-Init settings for provisioning.
207207
- `boot` - (string) - Override default boot order. Format example `order=virtio0;ide2;net0`.
208208
Prior to Proxmox 6.2-15 the format was `cdn` (c:CDROM -> d:Disk -> n:Network)
209209

210+
- `bios` - (string) - Set the machine bios. This can be set to ovmf or seabios. The default value is seabios.
211+
212+
- `efidisk` - (string) - Set the efidisk storage location. This need to be set if you use ovmf uefi.
213+
214+
- `machine` - (string) - Set themachine type. i440fx or q35.
215+
210216
## Example: Cloud-Init enabled Debian
211217

212218
Here is a basic example creating a Debian 10 server image. This assumes

docs/builders/iso.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ builder.
272272
- `boot` - (string) - Override default boot order. Format example `order=virtio0;ide2;net0`.
273273
Prior to Proxmox 6.2-15 the format was `cdn` (c:CDROM -> d:Disk -> n:Network)
274274

275+
- `bios` - (string) - Set the machine bios. This can be set to ovmf or seabios. The default value is seabios.
276+
277+
- `efidisk` - (string) - Set the efidisk storage location. This need to be set if you use ovmf uefi boot
278+
279+
- `machine` - (string) - Set themachine type. i440fx or q35.
280+
275281
## Boot Command
276282

277283
The `boot_command` configuration is very important: it specifies the keys to

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/hashicorp/packer-plugin-proxmox
33
go 1.17
44

55
require (
6-
github.com/Telmate/proxmox-api-go v0.0.0-20210402150908-b9cc6607c070
6+
github.com/Telmate/proxmox-api-go v0.0.0-20210804143723-a6998deceba2
77
github.com/hashicorp/hcl/v2 v2.10.0
88
github.com/hashicorp/packer-plugin-sdk v0.2.2
99
github.com/mitchellh/mapstructure v1.4.0

go.sum

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
4242
github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022 h1:y8Gs8CzNfDF5AZvjr+5UyGQvQEBL7pwo+v+wX6q9JI8=
4343
github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
4444
github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
45-
github.com/Telmate/proxmox-api-go v0.0.0-20210402150908-b9cc6607c070 h1:Up56ddjq6/wc46Ng+MDQYuDqVDHQMmbV+q8qSUImask=
46-
github.com/Telmate/proxmox-api-go v0.0.0-20210402150908-b9cc6607c070/go.mod h1:ayPkdmEKnlssqLQ9K1BE1jlsaYhXVwkoduXI30oQF0I=
45+
github.com/NaverCloudPlatform/ncloud-sdk-go-v2 v1.1.0/go.mod h1:P+3VS0ETiQPyWOx3vB/oeC8J3qd7jnVZLYAFwWgGRt8=
46+
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
47+
github.com/Telmate/proxmox-api-go v0.0.0-20200715182505-ec97c70ba887/go.mod h1:OGWyIMJ87/k/GCz8CGiWB2HOXsOVDM6Lpe/nFPkC4IQ=
48+
github.com/Telmate/proxmox-api-go v0.0.0-20210331182840-ff89a0cebcfa/go.mod h1:ayPkdmEKnlssqLQ9K1BE1jlsaYhXVwkoduXI30oQF0I=
49+
github.com/Telmate/proxmox-api-go v0.0.0-20210804143723-a6998deceba2 h1:Zp/nKTHow4OawYvMRDSe3EUoxUf206k/1POU4JXtQAY=
50+
github.com/Telmate/proxmox-api-go v0.0.0-20210804143723-a6998deceba2/go.mod h1:keBhXWLa+UBajvf79xvKcfiqeIc7vZL9wOqxuy1CBGw=
51+
github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw=
4752
github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8=
4853
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
4954
github.com/antchfx/xpath v1.1.11 h1:WOFtK8TVAjLm3lbgqeP0arlHpvCEeTANeWZ/csPpJkQ=

0 commit comments

Comments
 (0)