Virtualisation

Revision 3 as of 2008-11-05 21:28:23

Clear message

Ubuntu Open Week - Virtualisation - Soren Hansen - Wed, Nov 5th, 2008

(04:00:52 PM) soren: Hi, everyone.
(04:01:09 PM) soren: Welcome to the obligatory virtualisation talk.
(04:01:17 PM) soren: It wouldn't be Ubuntu OpenWeek without it, would it?
(04:02:08 PM) soren: I have to say this session is as much for my sake as it is for yours. I'm hoping to get some good feedback from you about how you're using it and what your problems are.
(04:02:34 PM) soren: Or perhaps even better: Some input on why you're not using virtualisation. That would be interesting.
(04:02:39 PM) soren: So, to kick things off.
(04:02:41 PM) soren: ..
(04:02:54 PM) soren: New stuff in Intrepid:
(04:03:15 PM) soren: Intrepid didn't see huge, world changing updates in the basic virtualisation stack.
(04:03:24 PM) soren: The virtualisation stack in my mind consists of:
(04:03:24 PM) soren: kvm
(04:03:28 PM) soren: libvirt
(04:03:30 PM) soren: virt-manager
(04:03:35 PM) soren: virtinst
(04:04:32 PM) soren: They all got updated to more recent upstream versions, which gave us a few new features, such as fully swappable kvm guests and a few other tidbits.
(04:04:49 PM) soren: In intrepid, we also completely rewrote our vm builder.
(04:05:22 PM) soren: If you're not familiar with vmbuilder, it's basically a tool that will create a virtual machine for you in a fraction of the time it would take you to complete a regular install.
(04:06:02 PM) soren: If we have time at the end of this session, I can do a demonstration.
(04:06:51 PM) soren: Just shoot questions in #ubuntu-classroom-chat when you have them, by the way. Don't wait until the end.
(04:07:37 PM) soren: In case you're just tuning into the whole virtualisation buzz, let me explain a bit about what it's good for.
(04:08:16 PM) soren: Actually, virtualisation comes in many shapes and varieties. We've chosen to focus on what is called full virtualisation, which is what kvm provides.
(04:09:12 PM) soren: kvm is a piece of software that runs on your regular system, but looks like a completely separate computer. You can install any operating system in it you like. Windows, other Linux distros, other versions of Ubuntu.
(04:09:28 PM) soren: Anything that you can do to a regular PC, you can do to one created by kvm.
(04:09:52 PM) soren: This is by far the most versatile form of virtualisation.
(04:10:31 PM) soren: If you're a developer, you can set up other operating systems to test interoperability between different things...
(04:10:54 PM) soren: ...you can have other versions of Ubuntu running in it to see if a bug you found is a regression from an older version of Ubuntu..
(04:11:05 PM) soren: ..or even check if a bug has been fixed in a later version.
(04:11:22 PM) soren: You can use it as a "clean room" for doing various tests that might hose your system.
(04:11:38 PM) soren: Or you can use it in production environments to keep services separate.
(04:11:45 PM) soren: The sky is the limit!
(04:11:56 PM) soren: 21:08:33 < ~MadsRH> soren -> The vmbuilder is setup in the terminal? Are there any plans for a GUI?
(04:12:18 PM) soren: VMBuilder is really a library, but also comes with a command line tool to use it.
(04:12:24 PM) soren: ..this is what most people will use.
(04:12:42 PM) soren: However, it was designed to be a library so that it could be easily embedded into other Python projects.
(04:13:04 PM) soren: Perhaps virtinst could use VMBuilder as an alternative form of OS installation.
(04:13:13 PM) soren: ...or it could be exposed directly in virt-manager.
(04:13:29 PM) soren: ...or a web frontend could be used to build VM's.
(04:13:42 PM) soren: Anything is possible. All we need are ideas and code monkeys :)
(04:13:57 PM) soren: 21:11:22 < knome> QUESTION: How effienct kvm is compared to, let's say, VMWare?
(04:14:31 PM) soren: At the risk of offending people who've worked on either side optimizing particular things in each of them, I'd say they're roughly comparable.
(04:14:38 PM) soren: With a twist, though:
(04:15:16 PM) soren: kvm - as you may know - only runs on newer hardware, which has virtualisation features built into the CPU. VMWare runs on any PC.
(04:15:47 PM) soren: If you run VMWare on a PC without virtualisation extensions, I'm quite sure kvm will outperform it somewhat. This is due to the nature of that type of virtualisation.
(04:16:16 PM) soren: VMWare can take advantage of those extensions, too, though, so on the same hardware, they'll be on par.
(04:16:50 PM) soren: 21:06:36 < YokoZar> QUESTION: I'm interested in shipping a VM appliance for using an application with a graphical interface.  It's very easy to do a minimal  VM-based installation using the Ubuntu-server CD, but it's not at all clear to me how I get a minimal desktop suitable for a VM appliance.
(04:16:56 PM) soren:  Installing the Ubuntu-destop package, for instance, will install all manner of video drivers that arean't needed.
(04:17:55 PM) soren: For starters, a VM appliance (or virtual appliance) is a virtual machine that you distribute to clients or customers that performs a  single task.
(04:18:34 PM) soren: The idea is that you preconfigure it to do a few things really well, and usually wrap it all up in a fancy wrapping.
(04:19:11 PM) soren: A colleague of mine has written a HOWTO about creating such an appliance.
(04:19:35 PM) soren: ...it even ended up in Linux Mag: http://www.linux-mag.com/id/4829
(04:20:19 PM) soren: It's an area where we still have a lot of work to do. it could certainly do with a better frontend for deployment..
(04:20:44 PM) soren: ..such as setting it up in the end user's network, perhaps hooking it into whatever other services it needs to interact with, etc. etc.
(04:21:07 PM) soren: If anyone has the time to work on something like that, please do get in touch.
(04:21:25 PM) soren: 21:07:29 < alexharrington> QUESTION: What does "fully swappable" mean in relation to a kvm guest?
(04:22:24 PM) soren: Not too long ago, if you had a kvm guest running that used 2 GB of memory, those 2 GB of RAM on the host was stuck in RAM and couldn't be swapped out to disk.
(04:22:41 PM) soren: This is no longer true.
(04:22:55 PM) soren: This is actually the primary reason the /dev/kvm device wasn't open to everyone.
(04:23:37 PM) soren: Anyone with access to that device could pin all your RAM, which was rather unfortunate.
(04:24:06 PM) soren: 21:12:29 < YokoZar> QUESTION: So, is there going to be support for a "minimal desktop" sort of VM appliance sometime?  Like another package seed?
(04:24:31 PM) soren: I don't really think a graphical environment in an appliance is something we want to put a lot of effort into.
(04:25:19 PM) soren: I'm much more inclined to go the way of your garden variety router which has a web interface for configuring everything.
(04:25:21 PM) soren: Graphical environments are just a hassle :)
(04:25:54 PM) soren: 21:13:13 < Zizou> Question: which is the adventaje in kernel based virtualisation comparing to software virtualisation?
(04:26:30 PM) soren: I'm not entirely sure what you mean by software virtualisation.. If you mean full virtualisation, but done entirely in software, like qemu does it, the main advantage is speed.
(04:26:43 PM) soren: Emulation is a slow, slow process.
(04:27:23 PM) soren: If you're thinking more along the lines of jails or containers, the main advantage is versatility.
...