From ea60c89bf13c34d4a601d6331ca8f7f76c16d482 Mon Sep 17 00:00:00 2001 From: a Date: Wed, 17 Apr 2024 09:01:47 +0200 Subject: [PATCH] fix script mkvm.ps1 --- scripts/mkvm.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mkvm.ps1 b/scripts/mkvm.ps1 index ebe915f..2616280 100644 --- a/scripts/mkvm.ps1 +++ b/scripts/mkvm.ps1 @@ -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 {