ubuntu virtualization options when no HW virt support?
lproven at gmail.com
Sun Jun 27 12:12:23 UTC 2010
On 27 June 2010 12:51, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
> On Sun, 27 Jun 2010, Liam Proven wrote:
> ... snip ...
>> Bear in mind we are replying to a thread started by an OP who does
>> not know the difference between QEMU and KVM.
> since i was the OP, i'd like to defend myself to the extent that
> it's not that i don't know the difference between QEMU and KVM, i was
> just trying to clarify the current ubuntu packaging scheme such that
> there is no simple QEMU package anymore -- it's now qemu-kvm,
> suggesting that ubuntu now sees the two as inseparable(?).
> and i also wanted to clarify what one could do in terms of
> virtualization with, say, stock QEMU, and no HW virt support, that
> kind of thing. it's slowly starting to make sense.
Sorry. No offence meant.
QEMU is not a virtualisation program. It is an emulator; it emulates
ARM and many other platforms on various platforms. Software running
under QEMU is running on a simulated processor and will be much slower
than on native hardware. However, QEMU's emulation of x86 is pretty
quick on x86 as there is a good match between emulated and native
instruction sets, obviously!
There used to be a proprietary kernel module called KQEMU which used
VMware-style trapping of unsafe instructions, combined with native
execution of "safe" code, for near-native performance. In the end I
think this was open-sourced but it's probably still out there
But QEMU has all the code for setting up a VM, managing its resources and so on.
KVM just uses hardware virtualisation to run VMs on x86-64 CPUs with
Intel VT or AMD-V. This is relatively easy, but the programmers needed
a whole set of code to create & manage VMs. They took this code from
QEMU since it was right there & FOSS.
KVM thus needs part of QEMU to work, but it is not related to QEMU.
KVM will only work on CPUs with VT/AMD-V.
Xen works on any x86 but in software alone does not deliver full
virtualisation so OSs need to be modified so as not to use unsafe code
in order to run under it. Such OSs are rare and mainly only FOSS OSs.
However, later, when h/w virt'n appeared, Xen was modified to use
this. With h/w virt'n available, Xen can run any OS in a VM, even
closed-source ones such as Windows.
VMware does pure software virt'n, meaning it can run on any x86. It
scans the code stream for "unsafe" instructions; safe code is run
natively, unsafe code through a s/w interpreter, like QEMU. This was
the product that showed that x86 could be virtualised in defiance of
Popek & Goldberg's rules (q.v.)
It does not use h/w virt'n at all, AFAIK. VMware is closed-source
commercial s/w but there are 2 free versions: VMware Player, for
running VMs from other editions, and VMware Server, which runs on top
of other OSs but is aimed at providing virtual servers. There is also
VMware ESX, ESXi - "bare metal" servers, the latter embeddable into
firmware - and VMware Fusion for the Mac and VMware Workstation for
Windows & Linux.
VirtualBox also uses software virt'n, a different version that coerces
ring 0 code (q.v.) to run in the generally-unused ring 1. User code
runs in ring 2 on x86, I think (q.v.). This does not work on all OSs -
it doesn't work with OS/2, for instance. However, VirtualBox *can* use
h/w virt'n if it finds it. If it can do so it can run OS/2.
VirtualBox was written by a German company called Innovision. Sun
bought it and made it freeware for personal use. There is also a more
limited FOSS version.
Oracle has now bought Sun. So far V'box remains free.
There is also Parallels, a Russian company, but it focuses on Windows
and Mac and does not support Linux hosts, AFAIK.
There. Happy now? I didn't really want to write so much but it's a
Summary: if you want to run arbitrary PC OSs under desktop Linux, your
- FOSS VirtualBox (free, in Ubuntu repos, limited)
- full Virtualbox (freeware, Ubuntu packages available on website)
- VMware Player (freeware, Ubuntu packages available on website, limited)
Or pay for VMware Workstation.
If you want to virtualise servers, or on a server, and thus don't
really care too much about friendly GUIs, your options are:
- Xen (FOSS - needs h/w virt'n to run arbitrary OS)
- KVM (FOSS - needs h/w virt'n to run at all)
- VMware Server (closed source freeware, needs no h/w virt'n)
Liam Proven • Profile: http://www.linkedin.com/in/liamproven
Email: lproven at cix.co.uk • GMail/GoogleTalk/Orkut: lproven at gmail.com
Tel: +44 20-8685-0498 • Cell: +44 7939-087884 • Fax: + 44 870-9151419
AOL/AIM/iChat/Yahoo/Skype: liamproven • LiveJournal/Twitter: lproven
MSN: lproven at hotmail.com • ICQ: 73187508
More information about the ubuntu-users