- 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. # Conflicts: # .vscode/launch.json
16 lines
260 B
PowerShell
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
|
|
}
|
|
} |