HVM vs PV (Xen Full virtualization (HVM) Xen Paravirtualization (PV))
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is HVM or PV better for performance and overall stability in xen?
I have a Slackware PV domU, a Windows XP HVM domU, and several NetBSD domUs on NetBSD dom0. All very stable and fast. If you can go with PV for domU then go with it. Your only choice with Windows (at least XP and 2003) is HVM.
So the general rules if if you can do linux pv then do it? right? ... no reason to just use hvm ?
That's the way I understand it. I haven't even tried Slackware (I use only Slackware and Slackware-based Linux) on HVM. Why bother, when my Slackware PV domU runs as fast and as stable as the same Slackware dual-booted on bare metal? I can't speak for any other Linux domU. It's easy for me to compile a kernel in Slackware with Xen PV domU support. All I need to look after then is /etc/fstab, to make sure the mount points are correct. To do this I mount using UUIDs, so that Slackware will boot into bare metal and also under Xen.
That's the way I understand it. I haven't even tried Slackware (I use only Slackware and Slackware-based Linux) on HVM. Why bother, when my Slackware PV domU runs as fast and as stable as the same Slackware dual-booted on bare metal? I can't speak for any other Linux domU. It's easy for me to compile a kernel in Slackware with Xen PV domU support. All I need to look after then is /etc/fstab, to make sure the mount points are correct. To do this I mount using UUIDs, so that Slackware will boot into bare metal and also under Xen.
I am using a Slackware domU in a xen pv. But the provider use a host-side kernel, and this gave me problems from the very start. I've read that to you be able to use your kernel they need to use pygrub or pv-grub. Am I right?
According to the words of the guy of the company, Slackware is the only distribution that give he problems. The rest of their domUs are Gentoo, Ubuntu, Debian, etc. With this argument he "invite" me to search for another provider (yes, like it sounds ).
Any advice or clue you give me I will be eternally grateful with you. Even if you advice me about some really serious provider where to run Slackware. I've tried several and my experience was even worst than the above.
HVM vs PV (Xen Full virtualization (HVM) Xen Paravirtualization (PV))
Paravirtualisation is always better.
In PV, VM will aware of that IO should be handled by host and VM will generate a direct call to the Hypervisor. But the Guest OS should be modified and installed with the drivers (block and network) through which VM kernel will directly call hypervisor.
In FV, there is no need for the guest to be modified but the Guest should be given the emulated devices (BIOS, block,network) which VM Kernel will generate the normal system call with emulated devices which call further the hypervisor. Emulation consumes lot of CPU time therefore VM will slow in handling the IO.
In PV, VM will aware of that IO should be handled by host and VM will generate a direct call to the Hypervisor. But the Guest OS should be modified and installed with the drivers (block and network) through which VM kernel will directly call hypervisor.
In FV, there is no need for the guest to be modified but the Guest should be given the emulated devices (BIOS, block,network) which VM Kernel will generate the normal system call with emulated devices which call further the hypervisor. Emulation consumes lot of CPU time therefore VM will slow in handling the IO.
It is faster, but what about reliability?
I ignore all about virtualization, but I understand (and knew) what you say and I've experienced this slower responsiveness in HVM compared Xen PV (or OpenVZ, that is just a patched kernel).
But taking in care your same argument, which is more problematic when a bug or a regression appear?
What I posted above and what I will say now are a bit offtopic, because you are discussing just the tech aspect of the issue. But I will say it anyway because it is what happens in practice.
I know that most companies out there have not interest in lead with a real tech solution; when things get too complicated, it is more 'profitable' for them to kick customer ass than pay to a tech. And taking in care that customers who really have money can afford a real dedicated server, all VPS customers are "ass kickables" :-).
Now the question to those who know the theory: does PV setup and maintenance require more knowledge/work than FV? When "money" parameter appears, this question is important at time of judge which solution is better in terms of reliability.
Xen PV will always be faster and more reliable than Xen HVM, as you have an additional component (Qemu) on HVM which runs as a process per VM on the host machine. Xen has been around a long time through and both are very stable at this point. HVM used to be a bit iffy before Xen 3.4 (Now were on 4.6)
Almost every version of Windows, Linux and BSD will run under HVM. It's also possible to run FreeBSD under Xen PV but requires a fair bit of work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.