apt-get update && apt-get dist-upgrade
apt-get install git vim aptitude sudo htop screen curl openssh-server locales
apt-get -y install xen-linux-system xen-tools
dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
sed -i '/TOOLSTACK/s/=.*/=xl/' /etc/default/xen
echo 'GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=1024M,max:1024M \
dom0_max_vcpus=1 dom0_vcpus_pin"' > /etc/default/grub
auto eth0
iface eth0 inet manual
auto xenbr0
iface xenbr0 inet static
address <IpAddr>
broadcast <BroadcastAddr>
netmask <NetMaskAddr>
gateway <GWAddr>
bridge_ports eth0
bridge_stp off
bridge_waitport 0
bridge_fd 0 ```
###### Check this on /etc/default/xen :
`XENDOMAINS_SAVE=`
###### Let's reboot and install Ganeti :
```shell
update-grub
reboot
mkdir /root/.ssh/
apt-get install ganeti2 ganeti-instance-debootstrap
cd /boot
ln -s vmlinuz-3.16.0-4-amd64 vmlinuz-3-xenU
ln -s initrd.img-3.16.0-4-amd64 initrd-3-xenU
apt-get install drbd8-utils
echo "options drbd minor_count=128 usermode_helper=/bin/true" \
> /etc/modprobe.d/drbd.conf
echo "drbd" >> /etc/modules
depmod -a
modprobe drbd
service ganeti restart
127.0.0.1 localhost
192.168.1.5 serv1
192.168.1.50 cluster-ip
gnt-cluster init --vg-name=vgganeti --master-netdev=xenbr0 \
--vg-name vgganeti cluster-name
"xen_cmd":"xl"},
"link":"xenbr0",
"initrd_path":"/boot/initrd-3-xenU",
"kernel_args":"ro",
"kernel_path":"/boot/vmlinuz-3-xenU
service ganeti restart