Posts tagged VirtaulBox How to attach a DVD / CD to a running vm

VirtualBox Commands

If you are new to  VirtaulBox then the below commands will  help you to gather information and control your VM’s :

How to show the VirtualBox VM info
[email protected][#] VBoxManage showvminfo <vmname>

for example

[email protected][#] VBoxManage showvminfo vm1
How to show the VM Harddrive info
[email protected][#] VBoxManage showhdinfo <filename>

for example

[email protected][#] VBoxManage showhdinfo vm1.vdi
How to list running VM
[email protected][#] VBoxManage list runningvms
How to list available VM
[email protected][#] VBoxManage list vms
How to list available VM Harddrives
[email protected][#] VBoxManage list hdds
How to list available ISO’s
[email protected][#] VBoxManage list dvds

How to Control VM

How to Start VM

 use nohup command and & to run process in background,
 so VM continues to run after exiting console.
[email protected][#] nohup VBoxHeadless --startvm <vmname> &

for example

[email protected][#] nohup VBoxHeadless --startvm vm1 &
How to pause VM
[email protected][#] VBoxManage controlvm <vmname> pause

for example

[email protected][#] VBoxManage controlvm vm1 pause

How to resume VM

[email protected][#] VBoxManage controlvm <vmname> resume

for example

[email protected][#] VBoxManage controlvm vm1 resume

How to reset VM

[email protected][#] VBoxManage controlvm <vmname> reset

for example

[email protected][#] VBoxManage controlvm vm1 reset

How to poweroff VM (hard poweroff eg. pull the plug)

[email protected][#] VBoxManage controlvm <vmname> poweroff

for example

[email protected][#] VBoxManage controlvm vm1

How to send poweroff single to VM (tells VM OS to shutdown)

[email protected][#] VBoxManage controlvm <vmname> acpipowerbutton

for example

[email protected][#] VBoxManage controlvm vm1 acpipowerbutton

How to attach a DVD / CD to a running vm

[email protected][#] VBoxManage controlvm <vmname> dvdattach <filename>

for example

[email protected][#] VBoxManage controlvm vm1 dvdattach CentOS-5.7-i386-bin-DVD-1of2.iso

How to de-attach a DVD / CD from a running vm

[email protected][#] VBoxManage controlvm <vmname> dvdattach none

for exampe

[email protected][#] VBoxManage controlvm vm1 dvdattach none

How to find out the VM IP

[email protected][#] VBoxManage guestproperty get <vmid>"/VirtualBox/GuestInfo/Net/0/V4/IP"

for example

[email protected][#] VBoxManage guestproperty get vm1  "/VirtualBox/GuestInfo/Net/0/V4/IP"