A quick note, there are actually 3 modes, not two when it comes to the drivers in use:
- HVM: unmodified kernel and drivers using software emulated devices
- PV-HVM: unmodified kernel with paravirtualized (Xen specific) disk and network drivers
- PV: modified kernel and drivers
For a Xen guest/DomU you can do a very basic
uname
andlsmod
with a grep to list the modules in use:uname -a lsmod | grep xen
If
uname -a
lists a kernel with the string "xen" in it, then you have a modified kernel and it's likely a PV guest, and you will see output from thelsmod
command to confirm it. If you have output from the grep onlsmod
but no sign of a modified kernel then you are PV-HVM. Without any sign of either, it's a straight HVM.Note: Generally you can do more with VMs that have the PV tools installed, so that can be quite an obvious pointer, however you can fake the presence of the PV tools to allow suspend/resume etc. so you cannot rely on that in general.
Introduction
Xen is Blue Light's standard virtualisation solution, decided in BLUE-1192
Introduction to Xen: http://wiki.xenproject.org/wiki/Xen_Beginners_Guide#What_is_this_Xen_Project_software_all_about.3F
Installation (host/dom0)
TODO: better/different to install xen-linux-system instead of xen-tools?
aptitude install xen-tools
Adjust grub so the default boot item is Xen (ref: https://xen-orchestra.com/cant-find-hypervisor-information-in-sysfs/)
dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
update-grub
shutdown -r now
Test
Does the xen info
command work?
Configuration
Installation (domu*)
Troubleshooting
TODO: integrate the next para.
References
Glossary
- Domain a Xen VM.
- dom0 The Xen domain/VM used a) to control the hypervisor b) as the primary interface to the hardware.
- domu* Unprivileged Xen domains/VMs
- Enlightened guest An OS designed/modified for use in a domain/VM.
- Full virtualisation A domain/VM providing full emulation of physical hardware. The OS can be the same as runs on real hardware.
- Guest domain Same as domu*.
- Hardware Virtual Machine (HVM) Same as full virtualisation.
- Hypervisor a software system that allows the execution of multiple virtual guest operating systems simultaneously on a single physical machine. Xen's hypervisor is Type 1 or “bare-metal”, meaning it runs on the physical machine as opposed to within an operating system.
- HVM Hardware Virtual Machine.
- Para-virtualization uses modified guest operating systems a.k.a. enlightened guests. They don’t require virtual hardware devices, instead they make special calls to the hypervisor that allow them to access CPUs, storage and network resources. Better performance that full virtualisation.
- PV para-virtualisation.
- Virtual Machine Monitor (VMM) Same as hypervisor.
Technical
TODO; move Xen notes from the Online.net server page to here.
References
Introductory
- Xen - Debian Wiki
- Xen Beginners Guide - Xen
- Xen On Debian Wheezy With LVM | HowtoForge - Linux Howtos and Tutorials
- Using Xen With LVM-Based VMs Instead Of Image-Based VMs (Debian Etch) | HowtoForge - Linux Howtos and Tutorials
- How To Set Up Xen 4.3 On Debian Wheezy (7.0.2) And Then Upgrade To Jessie | HowtoForge - Linux Howtos and Tutorials
- Setting up XEN on a Hetzner Dedicated Server (EX-series): https://gist.github.com/meskyanichi/3354956
- Routed XEN VM based on LVM (step-by-step for Hetzner DS3000): http://wiki.summercode.com/routed_xen_vm_based_lvm_step_by_step_guide_for_hetzner_ds3000