Difference between revisions of "Virtualization"
(→Install DomU Debian Installer) |
(→Debian Xen) |
||
Line 11: | Line 11: | ||
*Xen Config File: /etc/xen/xend-config.sxp | *Xen Config File: /etc/xen/xend-config.sxp | ||
*http://wiki.debian.org/Xen | *http://wiki.debian.org/Xen | ||
+ | |||
+ | ==Persist Across Reboots== | ||
+ | Debian has scripts in place: | ||
+ | |||
+ | /etc/default/xendomains | ||
+ | /etc/init.d/xendomains | ||
+ | |||
+ | |||
==Install== | ==Install== |
Revision as of 11:33, 5 August 2012
- HVM is hardware and faster
- PV is Paravirtualization and usually slower
The networking scripts that come with xen are going to be phased out because they do not work all the time. You should setup bridge manually.
Contents
Xen Grow Disk
- http://enpraxis.net/blog/2008/11/05/resizing-your-file-based-xen-virtual-machine-on-centos/
- http://mike.bailey.net.au/2008/08/growing-your-xen-guest-disks-with-xen-resize-guest/
- http://27smiles.com/2008/08/08/setting-up-xen-on-debian-etch-64bit/
Debian Xen
- Xen Config File: /etc/xen/xend-config.sxp
- http://wiki.debian.org/Xen
Persist Across Reboots
Debian has scripts in place:
/etc/default/xendomains /etc/init.d/xendomains
Install
apt-get install xen-linux-system apt-get install xen-qemu-dm-4.0 dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen update-grub
May want to do this eventually to limit dom0 ram:
/etc/default/grub # Xen boot parameters for all Xen boots GRUB_CMDLINE_XEN="dom0_mem=1024M"
then
update-grub
then edit
/etc/xen/xend-config.sxp (dom0-min-mem 1024) (enable-dom0-ballooning no)
You would then need to reboot.
Install python-xml
Debian removed python-xml because it has not been updated.
You need it for the command xm new so:
wget http://sourceforge.net/projects/pyxml/files/latest/download
(You may have to go to that site and get a direct link)
cp -r PyXML-0.8.4/xml/parsers/xmlproc/ \ /usr/lib/python2.5/xml/parsers/
cp -r PyXML-0.8.4/xml/utils /usr/lib/python2.5/xml/
Notes
Network Scripts
They do not want you to use these anymore and instead setup the bridging up manually. You want to comment out anything with
(network-script
in front of it and do it right.
I did not even use the vif-script
/etc/xen/scripts/network-bridge /etc/xen/scripts/vif-bridge
Notes
Configure Networking and Install
Debian wiki states that the network control scripts that come with Xen are going to be phased out eventually. Goes on to say that you should setup networking yourself.
Something like:
ifconfig eth0 0.0.0.0
You cannot have and address assigned to eth0 and have it bridged at the same time. It will not work. I do not know if an alias would work. Like eth0:0 or whatever.
aptitude install bridge-utils brctl addbr br0
- br0 could be anything like: whatever0
ip addr show
- Just to see interfaces
You now need to add interfaces to the bridge
brctl addif br0 eth0 eth1
To make the bridge perm you need to edit /etc/network/interfaces
/etc/network/interfaces
or something using ethernet aliases:
/etc/network/interfaces
You then could edit /etc/xen/xend-config.sxp but since the networking scripts included with xen may be phased out at any moment you should just configure the domu's to use the bridge. xen-tools will do this if you configure it to. You will need a vif line in the domU config to use the bridge:
vif = ['mac=00:00:00:00:00:00,bridge=xenbr0]
/etc/xen-tools/xen-tools.conf
Notes
- http://wiki.xen.org/wiki/Host_Configuration/Networking
- Has some recommendations:
bridge_stp off # disable Spanning Tree Protocol bridge_waitport 0 # no delay before a port becomes available bridge_fd 0 # no forwarding delay
- http://william.shallum.net/random-notes/debian-squeeze-xen-bridge-configuration-using-etc-network-interfaces
- http://www.debian-administration.org/articles/360
- http://www.cyberciti.biz/tips/ubuntu-linux-creating-ethernet-alias-for-eth0-network-device.html
- http://paste.debian.net/180252/
Install DomU xen-tools
To configure xen-tools, you can edit /etc/xen-tools/xen-tools.conf which contains default values that the xen-create-image script will use. The xen-create-image(8) manual page contains information on the available options.
xen-create-image --hostname <hostname> --ip <ip> --vcpus 2 --pygrub --dist <lenny|squeeze|maverick|whatever>
Install DomU Debian Installer
uuid
VPS Serving to Customers
- cloudstack.org/
- xcp
- http://www.xvpsource.org/
- openstack
Notes
HyperVM | Free and looks like a great product. Does not work with CentOS 6 because CentOS dropped Xen? |
- Xen XCP
- OpenVZ
- Virtuzzo
- ProxMox
- SolusVM
- vePortal
Most of these can integrate with a billing platform.
- lxcenter.org
kloxo
DomU Install Lines and/or Config Files
Debian
xen-create-image --hostname ahostname --vcpus 1 --pygrub --dist squeeze