Tips and Tricks for OVM – 1. Choose PVM ( for now )

Typical mistake many people make when they first start out with OVM is creating VM’s as HVM. The reason is simple. We are all used to putting in a cd/dvd and start installing an OS. But in OVM that means that the VM is automatically HVM. You can’t create PVM VM’s directly from an iso because the OS needs to be modified so that it knows it’s running in an ovm environment.

So you are stuck with a HVM virtual machine and if you are unaware of the mistake, you’ll clone this into a template and create all your VM’s from this template resulting in a bunch of HVM vm’s.

So if you are setting up OVM servers and are planning on creating vm’s be aware of the differences. From the manual :

  • Hardware virtualized (HVM). An unmodified guest operating system executes in complete isolation. Instructions are trapped and emulated at the hardware level (Intel VT-x/VT-i and AMD-V), allowing excellent performance thanks to limited overhead for guest modifications.

  • Paravirtualized (PVM). A software interface similar but not identical to the underlying hardware is presented to the guest operating system. Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine, where performance is worse. Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment.

  • Hardware virtualized with paravirtualized drivers (PVHVM). Similar to HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance. This domain type is typically used to run Microsoft Windows guests with a limited performance penalty.

How then can you create a PVM vm?

  • from ISO : export the iso using nfs, ftp or http and provide it as boot option for your vm.

  • from template/assembly : just clone the template into a new VM and select PVM

If you are now checking your OVM setup and detect a lot of HVM vm’s, check http://docs.oracle.com/cd/E27300_01/E27309/html/vmusg-vm-pv.html to convert them to PVM.

Be aware that HVM will be faster then PVM once the CPU’s include net/io virtualisation. But we are years away from that, for now PVM is the faster solution.

Advertisements