Before installing the dedicated server, please follow this layout as we'll use the left free space for LVM (once the machine is installed) :
| Mountpoint | Size | FS type | Partition type |
|---|---|---|---|
| /boot | 256M | ext4 | Primary |
| / | 2048M | ext4 | Primary |
| swap | 1024 | swap | Primary |
| n/a | all free space | n/a | Extended |
| /usr | 4096 | swap | Logical |
| /var | 4096 | swap | Logical |
apt-cache search xen-hypervisor apt-get install xen-hypervisor-4.x-amd64
grep Xen /boot/grub/grub.cfg
I prefer not to restrict memory for dom0, let's allocate only one CPU :
GRUB_CMDLINE_LINUX="apparmor=0" GRUB_CMDLINE_XEN="dom0_max_vcpus=1 dom0_vcpus_pin"
xm list
#(vif-script vif-bridge) #(vif-script vif-route) (network-script network-nat) (vif-script vif-nat)
xen-create-image --lvm=datavg --size=4G --memory=256M --swap=256M --dist=wheezy --mirror=http://ftp.fr.debian.org/debian --force --ip=192.168.1.1 --netmask=255.255.255.0 --gateway=192.168.1.254 --hostname=wheezy32bits --kernel=/boot/vmlinuz-3.2.0-4-686-pae --initrd=/boot/initrd.img-3.2.0-4-686-pae --arch=i386 --fs=ext4
kernel and initrd files can be retrieved here :
/etc/xen/wheezy32bits.cfg
#
# Configuration file for the Xen instance wheezy32bits, created
# by xen-tools 4.3.1 on Sun Feb 9 16:25:13 2014.
#
#
# Kernel + memory size
#
kernel = '/boot/vmlinuz-3.2.0-4-686-pae'
ramdisk = '/boot/initrd.img-3.2.0-4-686-pae'
vcpus = '1'
cpus = '1,2,3'
memory = '256M'
#
# Disk device(s).
#
root = '/dev/xvda2 ro'
disk = [
'phy:/dev/datavg/wheezy32bits-disk,xvda2,w',
'phy:/dev/datavg/wheezy32bits-swap,xvda1,w',
]
#
# Physical volumes
#
#
# Hostname
#
name = 'wheezy32bits'
#
# Networking
#
vif = [ 'ip=192.168.1.1 ,vifname=vif1.1' ]
#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
xm create wheezy32bits.cfg -c
xm create wheezy32bits.cfg