How to configure an headless virtual-machine

written by Admin


Posted on 2015-10-21


Problem

I need to install and configure a virtual-machine under linux without X-windows.

Solution

* INSTALL
Install "bridge-utils" and "uml-utilities".
Install "virtualbox" (make sure it installs also "dkms").

* CREATE VM
VBoxManage createvm --name <name> --ostype <os> --register
(VBoxManage list ostypes ...for hints)

* CONFIG VM
VBoxManage modifyvm <vm_name> --memory <size_in_MB> --boot1 disk --cpus 1 --hwvirtex on --nestedpaging on --vram 12 --accelerate3d off --floppy disabled --audio none --nic1 bridged --bridgeadapter1 tap5 --nictype1 Am79C973 --cableconnected1 on --usb off

* CREATE HDD
VBoxManage createhd --filename <path/image_name.vdi> --size <size_in_MB> --register

* ADD HDD TO VM
VBoxManage modifyvm <vm_name> -hda <path/image_name.vdi>

P.S. VBoxManage modifyvm can change boot priority:
"--boot1 dvd" tells to boot from cd/dvd for installation (add also --dvd <path/filename.iso>)
"--boot1 disk" tells to boot from image for normal startup

Feedback


Comments

Leave a Comment:

Search

Welcome

We need collaboration and a real boost from our community: write us an email for every trick you find!

This website is a sysadmin swiss-knife for every-day Windows, Linux and Mac administration and troubleshooting

Our database grows if YOU send us your tips and trick as soon as you find them every day!