Asuro/virtualbox-wrapper.ps1
Kieron Morris 875e3e4765 VirtualBox 7 Compatability Changes
- Created a PowerShell script `virtualbox-wrapper.ps1` to wrap calls to vboxmanage and only exit once the virtual machine has been terminated.
- Updated launch.json to use the PowerShell launch type to launch `virtualbox-wrapper.ps1` with the machine name supplied as an argument.
- Updated `readme.md` to reflect these changes.
2025-03-08 19:29:46 +00:00

16 lines
260 B
PowerShell

param (
$MachineName
)
VBoxManage.exe startvm $MachineName
$running=$true
while($running) {
Start-Sleep -Seconds 1
$status=(VBoxManage.exe list runningvms)
if($status) {
$running=$status.contains($MachineName)
} else {
$running=$false
}
}