Nethence Newdoc Olddoc Lab Your IP BBDock  


Warning: those guides are mostly obsolete, please have a look at the new documentation.

UnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigs

Managing XEN guests
 
 
Virtual disk & CDrom
Use TAP,
disk = [ 'tap:aio:/data/bsd/bsd.disk,xvda,w' ]
 
Use FILE,
disk = [ 'file:/data/bsd/bsd.disk,xvda,w' ]
 
Add a virtual CDrom,
disk = [ '..., 'file:/data/amd64cd-5.1_RC4.iso,ioemu:hdc:cdrom,r' ]
 
Pass through the real CDrom,
disk = [ '..., 'phy:/dev/cdrom,hdc,r' ]
 
 
Guest Note. for bridging,
#vif = [ 'vifname=vcentos5x64_0' ]
 
vif = [ 'vifname=vcentos5x64_0,ip=88.191.229.127' ]
 
Hot plug a disk or CDrom,
xm li
xm block-attach ID /data/guest2/guest2.disk2 /dev/xvdb w
xm block-attach guest2 /data/cdrom.iso /dev/hdc r
note. change guest identified accordingly
unplug the disk,
xm block-list 1
xm block-detach 1 5632
note. change guest and device identifiers accordingly
 
 
Virtual network interface
If using several bridges, define the one in guest's config,
vif = [ 'bridge=br0' ]
 
Force the MAC address (bridge config),
vif = [ 'mac=00:16:3e:aa:aa:aa,bridge=bridge0' ]
Note. XEN range : 00:16:3e:xx:xx:xx
 
Force IP address (NAT config),
vif = [ 'ip=IP_ADDRESS, ...vifname=veth1' ]
 
 
tap:aio vs file
Do not use tap:aio on sparse file virtual disks on top of a journaled filesystem.
 
Note. 'file:' is not flushing the data to the disk, it hangs around in memory and is flushed by the host kernel guest as needed. IT is not remotely safe for the data.
 
Note. 'tap:aio' flushes the data to the disk.
 
Recommended applications :
- 'file:' against a sparse file (file-backed storage)
- 'file:' against a non-sparse file (file-backed storage)
- 'tap:aio:' against a non-sparse file (file-backed storage)
- lvm-backed storage,
disk = [ \
'phy:vguests/guest_sda1,sda1,w', \
'phy:vguests/guest_sda2,sda2,w' ]
 

(obsolete, see the new doc)