Hyper-V: Fix integer overflows in 32-bit builds
This commit is contained in:
parent
20c2524881
commit
0a08920816
|
@ -61,9 +61,9 @@ func (s *StepCreateVM) Run(_ context.Context, state multistep.StateBag) multiste
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert the MB to bytes
|
// convert the MB to bytes
|
||||||
ramSize := int64(s.RamSize * 1024 * 1024)
|
ramSize := int64(s.RamSize) * 1024 * 1024
|
||||||
diskSize := int64(s.DiskSize * 1024 * 1024)
|
diskSize := int64(s.DiskSize) * 1024 * 1024
|
||||||
diskBlockSize := int64(s.DiskBlockSize * 1024 * 1024)
|
diskBlockSize := int64(s.DiskBlockSize) * 1024 * 1024
|
||||||
|
|
||||||
err := driver.CreateVirtualMachine(s.VMName, path, harddrivePath, ramSize, diskSize, diskBlockSize,
|
err := driver.CreateVirtualMachine(s.VMName, path, harddrivePath, ramSize, diskSize, diskBlockSize,
|
||||||
s.SwitchName, s.Generation, s.DifferencingDisk, s.FixedVHD, s.Version)
|
s.SwitchName, s.Generation, s.DifferencingDisk, s.FixedVHD, s.Version)
|
||||||
|
|
Loading…
Reference in New Issue