Monday, 5 November 2012

How to use VBoxManage ?

Here is some examples (assuming the GuestAdditions has already been installed):
---------------------------------------
VBoxManage import Win7Ent32.ova
VBoxManage list vms
VBoxManage showvminfo "Win7Ent32"
VBoxManage startvm "Win7Ent32" --type headless
VBoxManage controlvm "Win7Ent32" poweroff

VBoxManage modifyvm Win7Ent32 --vrde on
VBoxManage modifyvm Win7Ent32 --vrdeport 3389

VBoxManage sharedfolder add "Win7Ent32" --name vboxshared --hostpath /tmp --transient
VBoxManage sharedfolder remove "Win7Ent32" --name vboxshared --transient
VBoxManage export "Win7Ent32" -o Win7Ent32.ova
VBoxManage unregistervm "Win7Ent32" --delete


How to use screen command?


screen is a useful command that allows a process keeping running after you exit/detach from ssh prompt, e.g.
-------------------------
create/enter a new screen: screen
start a process in the screen: lftp -u 'username,password' -e 'set ftp:ssl-force true;set ftp:ssl-protect-data true;get filename;bye' server_ip
detach from the screen: Ctrl-A, d
list current screens: screen -ls
attach to screen 8584.pts-2.dmzsrv: screen -r 8584.pts-2.dmzsrv