Skip to main content

how to create guest headless VMs

create VMs in guest headless mode

guest headless is a term to create virtual guest by using the linux terminal (CLI). the computer server facilitates installation through command lines, and guest installation process will be done by remote application (ssh).

here are the steps how to create fedora 18 (for example) virtual machine using image file (iso). 

1. creating guest name
$ VBoxManage createvm --name "fedora 18" --register

2. allocating amounts of RAM and networking type
$ VBoxManage modifyvm "fedora 18" --ostype fedora --memory 1024 --acpi on --pae on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0

3. create amount of hard disk capacity
$ VBoxManage createhd --filename fedora18.vdi --size 10000

4. selecting hard disk device type
$ VBoxManage storagectl "fedora18" --name "IDE Controller" --add ide

5. connecting fedora18.vdi file to hard disk device type
$ VBoxManage storageattach "fedora 18" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium fedora18.vdi

6. selecting iso file location (for example the file is located on /data/iso/fedora18.iso)
$ VBoxManage storageattach "fedora 18" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /data/iso/fedora18.iso

7. activating guest headless
$ VBoxHeadless --startvm "fedora 18"
by executing the command, virtual machine is running with VRDB (VirtualBox Remote Desktop Protocol).

on the remote desktop computer, using rdesktop application type the command :
$ rdesktop -a 16 ipaddr
(ipaddr information is filled with the server computer ip address who running VirtualBox VMs).

another VBoxManage commands :
a. to shut down virtual machine
$ VBoxManage controlvm "fedora 18" poweroff

b. to pause virtual machine
$ VBoxManage controlvm "fedora 18" pause

c. to reset virtual machine
$ VBoxManage controlvm "fedora18" reset

d. to see the list of all VMs
$ VBoxManage list vms

e. to see the list of running VMs
$ VBoxManage list running vms

f. to see information of VMs
$ VBoxManage showinfo "VMs name"

source :
http://www.virtualbox.org/manual/ch08.html

Comments

Popular posts from this blog

Installing Qualcomm Atheros AR8162 Fast Ethernet Driver on Lenovo G400

I was preparing Lenovo G400 laptop for my linux class, after I installed CentOS 6.5 on it, tada,,,, my ethernet adapter won't show up. I checked with ifconfig command but where the hell my eth0 ??. Then i type the command below : # lspci -v 01:00.0 Ethernet controller: Qualcomm Atheros AR8162 Fast Ethernet (rev 10)     Subsystem: Lenovo Device 3802     Flags: bus master, fast devsel, latency 0, IRQ 32     Memory at 90500000 (64-bit, non-prefetchable) [size=256K]     I/O ports at 2000 [size=128]     Capabilities: <access denied>     Kernel driver in use: alx It seem my wired network adapter do not have its driver. After searching on the net then I find this great article. I wrote it out on my blog to make it sure I have notes for the trouble. This is how we troubleshoot it :   First download this file : alx-linux-v2.0.0.6.rar unrar it, run make command, change directory...

All certification

Honor Code Certificate from edX - Linux Foundation