I have installed virtual box 4.2 on a Ubuntu 11.10 host.
I have Windows 7 as the only guest OS.
I'm able to auto start Windows 7 virtual when Ubuntu boots by adding it in start application with the command "VBoxMange startvm Win7" in the command option.
Now when I shutdown Windows 7 , the virtualbox program is getting closed, but I go back to Ubuntu, when I want to have Ubuntu shut down as well when I click Shutdown in Windows 7 in Virtualbox.
This is an assignment for me. Can anybody please help me on this?
Also, when virtual box starts up automatically, Ubuntu's desktop should not be visible.
Best Answer
The way to do this is to write a script to start your VM, wait until it terminates, and then issue the shut-down command.
Create a folder
bin
in your home folder (if it does not exist already).Now create a file with the following contents. Let's call it
win7vmshutdown
, and save it in yourbin
folder.Make the script executable; enter the following in a Terminal.
In your Startup Applications, remove the
VBoxManage ...
command and replace it withwin7vmshutdown
.The shutdown command will prompt you for shutdown; if you don't answer, it will shut down in 60 seconds. This gives you time to interrupt the shutdown in case of unexpected problems.
Reboot your computer to test.
You said:
To do that, you want to run your VM in full-screen. Install the Guest Additions in your VM, reboot it, and run it full-screen.