Child pages
  • Xen

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Introduction to Xen: http://wiki.xenproject.org/wiki/Xen_Beginners_Guide#What_is_this_Xen_Project_software_all_about.3F

Installation (host/dom0)

TODO: is xen-docs useful (probably not; installed hoping for an xl man page)?

aptitude install xen-docs-4.1 xen-linux-system

Adjust grub so the default boot item is Xen (ref: https://xen-orchestra.com/cant-find-hypervisor-information-in-sysfs/)

...

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

References (

...

networking)

...

Unlike xm, xl does not do dom0 network configuration; standard OS tools must be used.

For help (not --help or -h):  xl help

In case there is no local xl man page: http://xenbits.xen.org/docs/unstable/man/xl.1.html and (Xen 4.2) http://manpages.ubuntu.com/manpages/raring/en/man1/xl.1.html

...

Each DomU (the VM itself, not its OS etc.) is configured by a file in /etc/xen.

 

Maintaining Debian in DomUs

...

When creating Debian systems it uses debbootsrap (described above).

Monitoring and controlling DomUs

 

Troubleshooting

TODO: integrate the next para.

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 and lsmod 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 the lsmod command to confirm it. If you have output from the grep on lsmod 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.

References

Files and directories

...

TODO: integrate the next text

So basically bootloader (grub/pygrub or xen pv bootloader) sets up the kernel and initrd in memory, and boots the kernel. Kernel then extracts the initrd from the memory, and executes the script in the initrd. The script then loads the necessary drivers for *that* particular server hardware or a virtual machine to access the actual root disk, and then the script mounts the root disk so the actual Linux distribution can be started from the real root disk. So the initrd image you use must be suitable for the Xen domU and load the required kernel modules (possibly xenblk) and set up the xen xvd-disks!

 

 

References

Files and directories

File or directoryUsageNotes
/etc/default/xen  
/etc/default/xend  
/etc/default/xendomains  
​/etc/xen/​Configuration
/etc/xen/scripts/? 
/etc/xen/scripts/vif-nat  

...

Setup logs

...