There are a couple things to watch out with this install. When installing the system, the installer switches eth0 and eth1 and also detects the first drive as /dev/sdb not /dev/sda. This requires you to edit the grub conf at boot and switch sdb with sda. That will allow the system to boot up properly, but /etc/fstab is still incorrect and needs to fixed as well.
For this install I broke the existing virtual disks on the raid and created a 10G disk for the system and created a second virtual disk with the remaining space allocated for xen servers.
Create a 3T lvm partition:
myxenserver:~# fdisk -l /dev/sdb
Disk /dev/sdb: 3737.2 GB, 3737292636160 bytes
255 heads, 63 sectors/track, 454366 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
myxenserver:~# parted /dev/sdb mklabel gpt
Information: Don't forget to update /etc/fstab, if necessary.
myxenserver:~# parted /dev/sdb print
Disk /dev/sdb: 3737GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
Information: Don't forget to update /etc/fstab, if necessary.
myxenserver:~# parted /dev/sdb mkpart ext2 0 3737GB
myxenserver:~# parted /dev/sdb print
Disk /dev/sdb: 3737GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 3737GB 3737GB ext2
Information: Don't forget to update /etc/fstab, if necessary.
myxenserver:~# vgcreate xen /dev/sdb1
Volume group "xen" successfully created
myxenserver:~# vgdisplay
--- Volume group ---
VG Name xen
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 3.40 TB
PE Size 4.00 MB
Total PE 891039
Alloc PE / Size 0 / 0
Free PE / Size 891039 / 3.40 TB
VG UUID kZ260M-qv13-7unz-Rwd8-TfbM-qIUF-7PSHaB
Now install some packages that we will need:
myxenserver:~# apt-get install bridge-utils iproute linux-image-2.6.18-6-xen-amd64 nmap tcpdump xen-hypervisor-3.0.3-1-amd64 xen-ioemu-3.0.3-1 xen-linux-system-2.6.18-6-xen-amd64 xen-tools xen-utils-3.0.3-1 xen-utils-common
now, reboot into the new xen enabled kernel.
edit your /etc/xen-tools/xen-tools.conf to relect your local setting, the ones I use are :
#start xen-tools.conf
lvm = xen
size = 4Gb # Disk image size.
memory = 256Mb # Memory size
swap = 128Mb # Swap size
fs = ext3 # use the EXT3 filesystem for the disk image.
dist = etch # Default distribution to install.
image = sparse # Specify sparse vs. full disk images.
gateway = 10.1.2.1
netmask = 255.255.255.0
kernel = /boot/vmlinuz-2.6.18-6-xen-vserver-amd64
initrd = /boot/initrd.img-2.6.18-6-xen-vserver-amd64
mirror = http://ftp.us.debian.org/debian/
## end xen-tools.conf
now, edit /etc/xen/xend-config.sxp and uncomment:
(network-script network-bridge)
and I set:
(dom0-cpus 2)
now restart xen:
/etc/init.d/xend
now to create a xen instance
xen-create-image --hostname=xensever01 --size=300G --ip=10.1.2.100 -netmask=255.255.255.0
start the xen instance:
xm create /etc/xen/xenserver01.cfg
and you can now connect to it:
xm console xensever01
Log in with root, no password should be set at this time, so now would be a good time to set it.
Congrats! you now have a xen server up and running ready to get what ever software you want.
For this install I broke the existing virtual disks on the raid and created a 10G disk for the system and created a second virtual disk with the remaining space allocated for xen servers.
Create a 3T lvm partition:
myxenserver:~# fdisk -l /dev/sdb
Disk /dev/sdb: 3737.2 GB, 3737292636160 bytes
255 heads, 63 sectors/track, 454366 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
myxenserver:~# parted /dev/sdb mklabel gpt
Information: Don't forget to update /etc/fstab, if necessary.
myxenserver:~# parted /dev/sdb print
Disk /dev/sdb: 3737GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
Information: Don't forget to update /etc/fstab, if necessary.
myxenserver:~# parted /dev/sdb mkpart ext2 0 3737GB
myxenserver:~# parted /dev/sdb print
Disk /dev/sdb: 3737GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 3737GB 3737GB ext2
Information: Don't forget to update /etc/fstab, if necessary.
myxenserver:~# vgcreate xen /dev/sdb1
Volume group "xen" successfully created
myxenserver:~# vgdisplay
--- Volume group ---
VG Name xen
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 3.40 TB
PE Size 4.00 MB
Total PE 891039
Alloc PE / Size 0 / 0
Free PE / Size 891039 / 3.40 TB
VG UUID kZ260M-qv13-7unz-Rwd8-TfbM-qIUF-7PSHaB
Now install some packages that we will need:
myxenserver:~# apt-get install bridge-utils iproute linux-image-2.6.18-6-xen-amd64 nmap tcpdump xen-hypervisor-3.0.3-1-amd64 xen-ioemu-3.0.3-1 xen-linux-system-2.6.18-6-xen-amd64 xen-tools xen-utils-3.0.3-1 xen-utils-common
now, reboot into the new xen enabled kernel.
edit your /etc/xen-tools/xen-tools.conf to relect your local setting, the ones I use are :
#start xen-tools.conf
lvm = xen
size = 4Gb # Disk image size.
memory = 256Mb # Memory size
swap = 128Mb # Swap size
fs = ext3 # use the EXT3 filesystem for the disk image.
dist = etch # Default distribution to install.
image = sparse # Specify sparse vs. full disk images.
gateway = 10.1.2.1
netmask = 255.255.255.0
kernel = /boot/vmlinuz-2.6.18-6-xen-vserver-amd64
initrd = /boot/initrd.img-2.6.18-6-xen-vserver-amd64
mirror = http://ftp.us.debian.org/debian/
## end xen-tools.conf
now, edit /etc/xen/xend-config.sxp and uncomment:
(network-script network-bridge)
and I set:
(dom0-cpus 2)
now restart xen:
/etc/init.d/xend
now to create a xen instance
xen-create-image --hostname=xensever01 --size=300G --ip=10.1.2.100 -netmask=255.255.255.0
start the xen instance:
xm create /etc/xen/xenserver01.cfg
and you can now connect to it:
xm console xensever01
Log in with root, no password should be set at this time, so now would be a good time to set it.
Congrats! you now have a xen server up and running ready to get what ever software you want.



Random Entry



