Add NestedHV config option for vsphere-iso builder (#79)

This commit is contained in:
Sean Malloy 2018-04-25 01:45:02 -05:00 committed by Michael Kuzmin
parent 74f89f484d
commit 6029bfe9e3
2 changed files with 7 additions and 0 deletions

View File

@ -37,6 +37,7 @@ func (c *HardwareConfig) ToDriverHardwareConfig() driver.HardwareConfig {
RAMReservation: c.RAMReservation,
RAMReserveAll: c.RAMReserveAll,
DiskSize: c.DiskSize,
NestedHV: c.NestedHV,
CpuHotAddEnabled: c.CpuHotAddEnabled,
MemoryHotAddEnabled: c.MemoryHotAddEnabled,
}

View File

@ -110,6 +110,7 @@ func hardwareConfig() string {
config["CPU_limit"] = 1500
config["RAM"] = 2048
config["RAM_reservation"] = 1024
config["NestedHV"] = true
return commonT.RenderConfig(config)
}
@ -149,6 +150,11 @@ func checkHardware(t *testing.T) builderT.TestCheckFunc {
t.Errorf("VM should have RAM reservation for 1024 MB, got %v", ramReservation)
}
nestedHV := vmInfo.Config.NestedHVEnabled
if !*nestedHV {
t.Errorf("VM should have NestedHV enabled, got %v", nestedHV)
}
return nil
}
}