By default a gen 1 vm get a dvd drive. Remove it on creation so that it behaves the same as gen 2.

This commit is contained in:
Taliesin Sisson 2015-11-07 16:20:55 +00:00
parent 18241e5215
commit f8e3970d87
1 changed files with 6 additions and 1 deletions

View File

@ -215,7 +215,12 @@ New-VM -Name $vmName -Path $path -MemoryStartupBytes $memoryStartupBytes -NewVHD
`
var ps powershell.PowerShellCmd
err := ps.Run(script, vmName, path, strconv.FormatInt(ram, 10), strconv.FormatInt(diskSize, 10), switchName)
return err
if err != nil {
return err
}
return DeleteDvdDrive(vmName, 1, 0)
}
}