diff --git a/builder/hyperv/iso/builder.hcl2spec.go b/builder/hyperv/iso/builder.hcl2spec.go index d06b4b3af..5753a3f41 100644 --- a/builder/hyperv/iso/builder.hcl2spec.go +++ b/builder/hyperv/iso/builder.hcl2spec.go @@ -97,6 +97,7 @@ type FlatConfig struct { SkipCompaction *bool `mapstructure:"skip_compaction" required:"false" cty:"skip_compaction"` SkipExport *bool `mapstructure:"skip_export" required:"false" cty:"skip_export"` Headless *bool `mapstructure:"headless" required:"false" cty:"headless"` + LegacyGen1BootOrder *bool `mapstructure:"legacy_gen1_boot_order" required:"false" cty:"legacy_gen1_boot_order"` ShutdownCommand *string `mapstructure:"shutdown_command" required:"false" cty:"shutdown_command"` ShutdownTimeout *string `mapstructure:"shutdown_timeout" required:"false" cty:"shutdown_timeout"` DiskSize *uint `mapstructure:"disk_size" required:"false" cty:"disk_size"` @@ -205,6 +206,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "skip_compaction": &hcldec.AttrSpec{Name: "skip_compaction", Type: cty.Bool, Required: false}, "skip_export": &hcldec.AttrSpec{Name: "skip_export", Type: cty.Bool, Required: false}, "headless": &hcldec.AttrSpec{Name: "headless", Type: cty.Bool, Required: false}, + "legacy_gen1_boot_order": &hcldec.AttrSpec{Name: "legacy_gen1_boot_order", Type: cty.Bool, Required: false}, "shutdown_command": &hcldec.AttrSpec{Name: "shutdown_command", Type: cty.String, Required: false}, "shutdown_timeout": &hcldec.AttrSpec{Name: "shutdown_timeout", Type: cty.String, Required: false}, "disk_size": &hcldec.AttrSpec{Name: "disk_size", Type: cty.Number, Required: false}, diff --git a/builder/hyperv/vmcx/builder.hcl2spec.go b/builder/hyperv/vmcx/builder.hcl2spec.go index 628436bf0..e2c028e73 100644 --- a/builder/hyperv/vmcx/builder.hcl2spec.go +++ b/builder/hyperv/vmcx/builder.hcl2spec.go @@ -97,6 +97,7 @@ type FlatConfig struct { SkipCompaction *bool `mapstructure:"skip_compaction" required:"false" cty:"skip_compaction"` SkipExport *bool `mapstructure:"skip_export" required:"false" cty:"skip_export"` Headless *bool `mapstructure:"headless" required:"false" cty:"headless"` + LegacyGen1BootOrder *bool `mapstructure:"legacy_gen1_boot_order" required:"false" cty:"legacy_gen1_boot_order"` ShutdownCommand *string `mapstructure:"shutdown_command" required:"false" cty:"shutdown_command"` ShutdownTimeout *string `mapstructure:"shutdown_timeout" required:"false" cty:"shutdown_timeout"` CloneFromVMCXPath *string `mapstructure:"clone_from_vmcx_path" cty:"clone_from_vmcx_path"` @@ -207,6 +208,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "skip_compaction": &hcldec.AttrSpec{Name: "skip_compaction", Type: cty.Bool, Required: false}, "skip_export": &hcldec.AttrSpec{Name: "skip_export", Type: cty.Bool, Required: false}, "headless": &hcldec.AttrSpec{Name: "headless", Type: cty.Bool, Required: false}, + "legacy_gen1_boot_order": &hcldec.AttrSpec{Name: "legacy_gen1_boot_order", Type: cty.Bool, Required: false}, "shutdown_command": &hcldec.AttrSpec{Name: "shutdown_command", Type: cty.String, Required: false}, "shutdown_timeout": &hcldec.AttrSpec{Name: "shutdown_timeout", Type: cty.String, Required: false}, "clone_from_vmcx_path": &hcldec.AttrSpec{Name: "clone_from_vmcx_path", Type: cty.String, Required: false}, diff --git a/website/source/partials/builder/hyperv/common/_CommonConfig-not-required.html.md b/website/source/partials/builder/hyperv/common/_CommonConfig-not-required.html.md index de742a737..e1ebf434b 100644 --- a/website/source/partials/builder/hyperv/common/_CommonConfig-not-required.html.md +++ b/website/source/partials/builder/hyperv/common/_CommonConfig-not-required.html.md @@ -109,4 +109,11 @@ machines by launching a GUI that shows the console of the machine being built. When this value is set to true, the machine will start without a console. + +- `legacy_gen1_boot_order` (bool) - Over time the Hyper-V builder has been modified to change the original + boot order that is used when an ISO is mounted. Hyper-V's default is to + boot from the CD first, the original Hyper-V builder included code to + codify this setting when the primary ISO is mounted, that code was eventually + modified to place the IDE adapter before the the CD (only in generation 1). + Setting this value to true, forces the original method of operation. \ No newline at end of file