Headless VM Server Using Ubuntu 11.10
In this tutorial I’ll be guiding you through setting up a headless Ubuntu 11.10 box that you’ll manage using virt-manager, accessed via X11. My main machine is a Mac running OSX Lion. You’ll need the Ubuntu CD, and for the first part of the tutorial, physical access to the box with a keyboard and monitor.
Install Ubuntu on your server.
I installed Ubuntu Desktop so I could mess with virt-manager before I disconnected everything. You won’t be using much of the deskop feature so it might not matter to you. Just make sure you install openssh-server so you can connect later on.
Check BIOS
I had purchased an HP desktop that shipped with virtualization disabled in the BIOS. You can check here to see if it’s enabled. You’ll need to look this up for your vendor.
egrep ‘(vmx|svm)’ /proc/cpuinfo
At this point you shouldn’t need to work directly on the box and everything else can be done over SSH.
Install KVM
They’ve done a fine job of documenting this in the Ubuntu guides. I won’t rehash what they’ve already done.
In addition to what they’ve provided, I suggest installing virt-manager. It’s life changing if you don’t want to spend a lot of time working on the command line with vmbuilder.
Set up bridged networking
I wrote a post on how to set up bridged networking in 10.10, the same instructions still apply.
Install virt-manager (or vmbuilder)
I’ve worked with both vmbuilder and virt-manager. Both are excellent tools. Virt-manager has an easier learning curve since it’s a GUI. Vmbuilder is great since it can do an automated build for you.
apt-get install virt-manager
Access virt-manager over X11
If you’re on a Mac, you’ll need to fix your X11 Preferences. I’ve done this under Lion – I think you might need to download XQuartz on older versions.Control – Alt won’t work to let you pop out of your virt-manager VNC sessions. Make sure “Option keys send Alt_L and Alt_R” is checked.
In X11, you should SSH to your VM box. Open a new window (Applications -> Terminal) and do the following:
bash-3.2$ ssh -X haddad-vmserver
Once you’re in there, fire up virt-manager
jhaddad@haddad-vmserver:~$ virt-manager
Create your new VM
You should now put your install ISO on your VM host, if you haven’t already. Create your new VM, picking RAM, hard disk, etc. I changed my network to use br0, my network bridge, instead of NAT.
It seems there’s a bug with VNC (at least with the version I’m using and my US keyboard). For some reason when connecting with VNC it couldn’t detect the ‘a’ key. Very strange. To fix, make sure to edit configuration before starting up.
You should now be looking at the install screen for whatever OS you’ve decided to boot up. Install as normal.
4 Responses to Headless VM Server Using Ubuntu 11.10
Leave a Reply Cancel reply
Recent Comments
- pratibha on MySQL Triggers Tutorial
- pratibha on MySQL Triggers Tutorial
- MySQL Tutorials on MySQL Triggers Tutorial
- jon on The Lack of Flexibility of Stored Procedures in MySQL
- Nithya on The Lack of Flexibility of Stored Procedures in MySQL
- vietnam travel guide on MySQL Triggers Tutorial
- Phil Freo on Making Better Use of your .ackrc file
- PHP Examples on MySQL Triggers Tutorial
- jon on Drizzle Differences from MySQL
- Will on Drizzle Differences from MySQL
Recent Posts
- Vim: Use !make: to avoid auto jumping to files
- Weird Disutils Error When Running Python Scripts within MacVim
- Installing vim-ipython with MacVim
- Applescripting A Remote X-Windows Session for Virt-Manager
- Drizzle Differences from MySQL
- Great Article by the Varnish Architect
- Making Better Use of your .ackrc file
- Nginx pub/sub module
- Coffeescript, Bootstrap, and Less are amazing
- Splitmytab ready for the public!
Categories
- ack (1)
- amazon (1)
- answerbag (6)
- apache (9)
- apple (9)
- awk (2)
- bbedit (2)
- bootstrap (1)
- c++ (3)
- chrome (2)
- cluster (1)
- cocoa (1)
- coffeescript (2)
- collective intelligence (1)
- css (1)
- curl (3)
- db2 (1)
- demand media (1)
- drizzle (1)
- ebay (1)
- eclipse (4)
- erlang (13)
- facebook (1)
- fortran (1)
- gen_server (1)
- git (5)
- google (4)
- haddad (1)
- hdf5 (1)
- html (1)
- innodb (1)
- itunes (1)
- java (2)
- jester (2)
- kvm (2)
- launchbar (1)
- leex (1)
- less (1)
- letsgetnuts.com (1)
- libvirt (1)
- links (6)
- linux (28)
- lucene (1)
- mac (16)
- memcached (1)
- misconception (1)
- mobile (1)
- mono (1)
- mssql (1)
- munin (1)
- mysql (34)
- nginx (1)
- numpy (1)
- oracle (1)
- php (23)
- puppet (4)
- pyparsing (1)
- pytables (1)
- python (13)
- q&a (1)
- quicksilver (1)
- rant (6)
- readynas (1)
- redis (2)
- regex (1)
- replication (1)
- search (1)
- shitty code (1)
- solr (3)
- spaces (1)
- splitmytab (2)
- sshfs (1)
- stored procedure (1)
- svn (5)
- textmate (2)
- tips (25)
- tornado (1)
- trac (1)
- tutorial (4)
- ubuntu (3)
- Uncategorized (5)
- unix (1)
- vim (6)
- virtual box (6)
- vmware (1)
- weird (3)
- wikipedia (1)
- windows (1)
- xcode (1)











I’ve been pulling out what little hair I have left trying to solve this problem. For some reason I never thought to check the keymap for VNC. Grrrr!
Thanks for ending my suffering =)
-Ian
Awesome. Glad to hear the post helped you.
Thank you! Thank you! Thank you! The clearest VM howto on the net… got me running in no time. Forgive the noob question but I want to go on and experiment with different VMs. Should a separate bridge be created for each separate VM?
Hey Neil, no need to create a separate bridge.