fix script mkvm.ps1
This commit is contained in:
parent
272867304a
commit
ea60c89bf1
@ -30,7 +30,7 @@ $vmCpus = @{
|
|||||||
|
|
||||||
function create_vm{ param([string]$nomvm)
|
function create_vm{ param([string]$nomvm)
|
||||||
|
|
||||||
if ($vmMem.ContainsKey($nomvm)) {
|
if ($vmMem.ContainsKey($nomvm)) -and ($vmCpus.ContainsKey($nomvm))) {
|
||||||
& "$vboxmanage" import "$ovafile" --vsys 0 --vmname "$nomvm" --memory $vmMem[$nomvm] --cpus $vmCpus[$nomvm]
|
& "$vboxmanage" import "$ovafile" --vsys 0 --vmname "$nomvm" --memory $vmMem[$nomvm] --cpus $vmCpus[$nomvm]
|
||||||
Write-Host "Machine $nomvm importée"
|
Write-Host "Machine $nomvm importée"
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user