Testing a live CD with QEMU-KVM

I read an article recently on Ars Technica about the recent design changes in Gnome. Over all it looks like Gnome is pushing forward with some interesting ideas and the article ended with a note that a live CD was available on the Gnome site that showed off the new interface. Creating a new virtual machine seems a little heavyhanded just to take a peek at the latest Gnome build so I am starting to use QEMU for that sort of thing. Here is all you need to do:

kvm -m 1024 -vga vmware -boot d -cdrom ~/Downloads/GNOME-3.4.iso

This kvm command comes from the qemu-kvm package which would obviously need to be installed. You may notice it resize a bunch of times before it settles down. This is a known bug, that is easily worked around by just giving it a few seconds to work itself out or resizing the window yourself. Anyway, that aside this a pretty useful way to test a live CD. Enjoy!

Update: 2014-06-14: Things have changed a little since I wrote this.
First, this works much better if your processor supports virtualization. You might need to turn this on in your BIOS. If your CPU supports it the following command will tell you. You can see ‘vmx’ highlighted in the output below:

mike@sleepycat:~☺ egrep '(vmx|svm)' /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms

This means we can pass -enable-kvm to the new qemu-system-x86_64 command to get it to use the Kernel-based Virtual Machine (KVM) which gets the kernel to take advantage of our hardwares virtualization capabilities:

qemu-system-x86_64 -m 6144 -vga std -enable-kvm -boot d -cdrom ~/Downloads/gnome-3.12.iso

You can see I am throwing more RAM at this thing (-m 6144) and using a different vga adapter to get more resolution (-vga std). Don’t forget that if you need to run a 32 bit OS you need to use qemu-system-i386.