In order to start you have to login to the vmserver to create your vm
Once logged in go to /etc/xen
Run the following command (changing $HOSTNAME to whatever you want to call it)
# xen-create-image --hostname $HOSTNAME --pygrub --dist wheezy
It takes a while (even longer if you forgot to set up the mirror)
If you want to see what xen does while creating your image
Go to /var/log/xen-tools and run
tail -f $HOSTNAME.log
102 IN PTR vm02.projects.lan.
102 IN PTR vm-102.projects.lan.
vm02 IN A 10.80.3.102
vm-102 IN A 10.80.3.102
host vm102.projects.lan {
hardware ethernet $ETHERNET;
fixed-address vm-102.projects.lan;
}
If your to lazy (like me) to boot up your VM just to type ifconfig
On the vmserver open up the file /etc/xen/$HOSTNAME.cfg and look for the networking subgroup
After you type everything correctly run
# confupdate dns
# confupdate dhcp
ssh-keygen
You can run this as root or not, just remember where you did it
At the starting point, after you run ssh-keygen, in .ssh folder under your user
cp the .pub file to a different name named $FILE
scp $FILE to both vms
now append this file to authorized_keys on both vms
root@vm-###:~/.ssh# cat $FILE >> authorized_keys
#!/bin/bash
VM1='vm-102.projects.lan'
VM2='vm-103.projects.lan'
echo "VM-102"
echo "Uptime"
ssh root@$VM1 "uptime"
echo -e "\n"
echo "Free Space"
ssh root@$VM1 "df -h | grep rootfs"
echo -e "\n"
echo "VM-103"
echo "Uptime"
ssh root@$VM2 "uptime"
echo -e "\n"
echo "Free Space"
ssh root@$VM2 "df -h | grep rootfs"