Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'args' as optional configuration parameter when creating a VM #245

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .web-docs/components/builder/clone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ boot time.
- `vm_interface` (string) - Name of the network interface that Packer gets
the VMs IP from. Defaults to the first non loopback interface.

- `qemu_additional_args` (string) - Arbitrary arguments passed to KVM.
For example `-no-reboot -smbios type=0,vendor=FOO`.
Note: this option is for experts only.

<!-- End of code generated from the comments of the Config struct in builder/proxmox/common/config.go; -->


Expand Down
4 changes: 4 additions & 0 deletions .web-docs/components/builder/iso/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ in the image's Cloud-Init settings for provisioning.
- `vm_interface` (string) - Name of the network interface that Packer gets
the VMs IP from. Defaults to the first non loopback interface.

- `qemu_additional_args` (string) - Arbitrary arguments passed to KVM.
For example `-no-reboot -smbios type=0,vendor=FOO`.
Note: this option is for experts only.

<!-- End of code generated from the comments of the Config struct in builder/proxmox/common/config.go; -->


Expand Down
2 changes: 2 additions & 0 deletions builder/proxmox/clone/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions builder/proxmox/common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ type Config struct {
// the VMs IP from. Defaults to the first non loopback interface.
VMInterface string `mapstructure:"vm_interface"`

// Arbitrary arguments passed to KVM.
// For example `-no-reboot -smbios type=0,vendor=FOO`.
// Note: this option is for experts only.
AdditionalArgs string `mapstructure:"qemu_additional_args"`

Ctx interpolate.Context `mapstructure-to-hcl2:",skip"`
}

Expand Down
1 change: 1 addition & 0 deletions builder/proxmox/common/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions builder/proxmox/common/step_start_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func (s *stepStartVM) Run(ctx context.Context, state multistep.StateBag) multist
QemuSerials: generateProxmoxSerials(c.Serials),
Scsihw: c.SCSIController,
Onboot: &c.Onboot,
Args: c.AdditionalArgs,
}

// 0 disables the ballooning device, which is useful for all VMs
Expand Down
2 changes: 2 additions & 0 deletions builder/proxmox/iso/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading