StubDom: Difference between revisions
Lars.kurth (talk | contribs) (Migrated page) |
Lars.kurth (talk | contribs) (Updated page and removed warnings) |
||
Line 1: | Line 1: | ||
<!-- MoinMoin name: StubDom --> |
|||
<!-- Comment: --> |
|||
<!-- WikiMedia name: StubDom --> |
|||
<!-- Page revision: 00000002 --> |
|||
<!-- Original date: Mon Sep 22 14:09:36 2008 (1222092576000000) --> |
|||
Stubdoms (or stub domains) are lightweight 'service' or 'driver' domain to run device models and one technique to implement [[Dom0 Disaggregation]]. The initial purpose of stub domains were to offload qemu workloads from dom0 into a seperate domain. |
|||
{{Warning|This page is likely out-of-date and applies to Xen 3.x only}} |
|||
{{TODO|Review and update for Xen 4.x}} |
|||
So with stub domains, a separate unprivileged stub domain is created per HVM guest. This boosts performance and makes your system more secure. |
|||
Stubdom boosts HVM performance by putting ioemu in its own lightweight domain. |
|||
= Xen 4.x : Device Model Stub Domains = |
|||
⚫ | |||
For XL and newer versions of Xen, please see [[Device Model Stub Domains]], which contains simple configuration examples for how to set up. |
|||
= Xen 3.x = |
|||
For older version of Xen, stub domains are harder to set up. |
|||
{{Warning|It is not clear when this example has last been tested. If you try it and find it to work, please remove the warning.}} |
|||
⚫ | |||
* /etc/xen/OVM_EL5U1_X86_HVM_4GB: |
* /etc/xen/OVM_EL5U1_X86_HVM_4GB: |
Latest revision as of 15:27, 11 December 2012
Stubdoms (or stub domains) are lightweight 'service' or 'driver' domain to run device models and one technique to implement Dom0 Disaggregation. The initial purpose of stub domains were to offload qemu workloads from dom0 into a seperate domain.
So with stub domains, a separate unprivileged stub domain is created per HVM guest. This boosts performance and makes your system more secure.
Xen 4.x : Device Model Stub Domains
For XL and newer versions of Xen, please see Device Model Stub Domains, which contains simple configuration examples for how to set up.
Xen 3.x
For older version of Xen, stub domains are harder to set up.
Configuration Example
- /etc/xen/OVM_EL5U1_X86_HVM_4GB:
name = 'OVM_EL5U1_X86_HVM_4GB' uuid = 'de0edfdc-c6f1-4d2b-a2a3-88c035208c79' builder = 'hvm' device_model = '/usr/lib/xen/bin/stubdom-dm' kernel = '/usr/lib/xen/boot/hvmloader' memory = '256' vif = [ 'mac=00:16:3e:6b:66:d7,bridge=xenbr0', ] disk = [ 'file:/share/vm/OVM_EL5U1_X86_HVM_4GB/system.img,hda,w!', ] acpi = 1 apic = 1 pae = 1 vcpus = 1 sdl = 0 vnc = 1 vnclisten = '192.168.1.199' on_crash = 'restart' on_reboot = 'restart'
Note: you can comment the disk statement here; but if you want use pvhvm drivers, you should leave it uncommented.
- /etc/xen/OVM_EL5U1_X86_HVM_4GB-dm:
disk = [ 'file:/share/vm/OVM_EL5U1_X86_HVM_4GB/system.img,hda,w!', ] kernel = "/usr/lib/xen/boot/ioemu-stubdom.gz" #vfb = [ 'type=sdl' ] #vfb = [ 'type=vnc' ] vif = [ 'ip=192.168.1.199', 'mac=00:16:3e:6b:66:d7,bridge=xenbr0', ]
- Create the VM:
# mkdir -p /exports/usr/share/xen/qemu # ln -s /usr/share/xen/qemu/keymaps /exports/usr/share/xen/qemu # mkdir -p /exports/var/lib # ln -s /var/lib/xen /exports/var/lib # /usr/sbin/fs-backend & # xm create OVM_EL5U1_X86_HVM_4GB
- Connect to the VNC:
$ vncviewer 192.168.1.199
Note: you should make sure the host running vncviewer is in the same subnet 192.168.1.0.