fix script mkvm.ps1

This commit is contained in:
a 2024-04-17 09:01:47 +02:00
parent 272867304a
commit ea60c89bf1

View File

@ -30,7 +30,7 @@ $vmCpus = @{
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]
Write-Host "Machine $nomvm importée"
} else {