Hyper-V: Fix integer overflows in 32-bit builds

This commit is contained in:
Yaakov 2019-01-31 13:53:01 +11:00
parent 20c2524881
commit 0a08920816
1 changed files with 3 additions and 3 deletions

View File

@ -61,9 +61,9 @@ func (s *StepCreateVM) Run(_ context.Context, state multistep.StateBag) multiste
}
// convert the MB to bytes
ramSize := int64(s.RamSize * 1024 * 1024)
diskSize := int64(s.DiskSize * 1024 * 1024)
diskBlockSize := int64(s.DiskBlockSize * 1024 * 1024)
ramSize := int64(s.RamSize) * 1024 * 1024
diskSize := int64(s.DiskSize) * 1024 * 1024
diskBlockSize := int64(s.DiskBlockSize) * 1024 * 1024
err := driver.CreateVirtualMachine(s.VMName, path, harddrivePath, ramSize, diskSize, diskBlockSize,
s.SwitchName, s.Generation, s.DifferencingDisk, s.FixedVHD, s.Version)