Merge pull request #7251 from yaakov-h/7250-fix-overflow
Hyper-V: Fix integer overflows in 32-bit builds
This commit is contained in:
commit
888f4d440c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue