If I want to run a guest Operating System on Xen, then should it be a para-virtualized Operating System? How can I make an Operating System para-virtualized? Are there any tools?
migrated from stackoverflow.com Apr 18 '11 at 1:40
This question came from our site for professional and enthusiast programmers.
According to Wikipedia:
In short, consult the developers of the OS you're trying to run :)
Operating Systems that can run in a paravirtualized mode will run with lower overhead (performance degredation) than operating systems that must be run fully virtualized. To me, this means that, yes, if you can paravirtualize, you should. Whether or not you actually can run the O/S in a para-virtualized mode depends on the hypervisor and the guest O/S. If you're using Xen as the hypervisor, the options are pretty broad for paravirtualized operating systems: most Linux distributions, many BSD variants, and Solaris. Windows will not run para-virtualized on Xen, but I believe Hyper-V supports para-virtualization for Windows. VMware did para-virtualization for a while, but I think they ditched that in favor of sticking with advances in hardware virtualization (could be wrong about that - been a while since I used VMware).
As far as tools to enable paravirtualization, it really varies quite broadly. Most of the info below is realted to Xen, because that's my area of expertise. The libvirt-based tools in many of the Linux distributions (virt-manager, vm-install, virtinst) have come a very long way in being able to detect and use paravirtualized kernsl in guest O/Ss that have them present. If you're not able to get that support in one of those tools, you have to manually set up the links to the PV kernels and initrd images. A lot of that information for manually creating those config files is available on the Xen.org site, particularly under the Wiki. There are examples of how to configure different guest O/Ss, including support for PV kernels.
The final option, if you have an O/S that supports paravirtualization but are having a hard time getting it installed, is to install it in full virtualization mode, then switch over to paravirtualization. This involves installing the PV kernel in the guest, then changing the config file to point to that new kernel.
For other hypervisors, it varies based on the tool. If Hyper-V supports Windows PV, then I would guess it sets it up automatically - no user intervention required.