diff --git a/builder/hyperv/common/step_create_vm.go b/builder/hyperv/common/step_create_vm.go index 252a2664b..d33ece72e 100644 --- a/builder/hyperv/common/step_create_vm.go +++ b/builder/hyperv/common/step_create_vm.go @@ -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)