adding a simple try/catch for cases where the VM fails to start

This commit is contained in:
iambdud
2026-01-15 14:52:45 -06:00
parent cf9c605c34
commit fafe28baf7
+7 -1
View File
@@ -3049,7 +3049,13 @@ function New-FFUVM {
& vmconnect localhost "$VMName"
#Start VM
Start-VM -Name $VMName
try{
Start-VM -Name $VMName -ErrorAction Stop
}
catch{
WriteLog "Error starting VM: $_"
throw $_
}
return $VM
}