Tag Archives: Xen

Standard agreement revisited

I just updated the license on my XenServer at home and always find the likes of the following clause entertaining:

XenServer user agreement

XenServer user agreement

Sure, when it comes to a virtualisation environment and not the app store in OS X I can actually understand the reasoning. But still, not beeing allowed to create nuclear weapons or being Cuban no matter where you live is a bit humorous I think..

Luckily though this will all be easy for me to comply with.


Starting and stopping XenServer with the xe command

XenCenter shut down server

XenCenter shut down server

I run XenCenter for managing my XenServer in a virtual Windows7 system hosted on the XenServer itself.

This gives a bit of a catch 22 when it comes to shutting the system down.

As it turns out it does not work.

So what are my options?
From the top of my head I can think of a couple..

* hook up a monitor and keyboard to the server.
– Not interested.

* shut down using xsconsole via ssh.
– No, since I use a mac and you need to press f8 to verify the shut down command.

There is however a wonderful command called xe which you can use to manage just about all aspects of your XenServer.
So I shut down my management vm (the one with XenCenter) and get busy using xe:
[root@localhost ~]# xe host-disable
[root@localhost ~]# xe host-shutdown

Done! Give it a moment and the system powers off.

If you try to run host-shutdown without disable first you will be told to think again:
[root@localhost ~]# xe host-shutdown
This operation cannot be performed because the host is not disabled. Please disable the host and then try again.

The next time I am to user the server I power up and log in via ssh and run another couple of xe commands:
[root@localhost ~]# xe host-enable
[root@localhost ~]# xe vm-start vm=Windows\ 7\ \(64-bit\)\ \(1\)

Back in business!


Installing XenServer on my T3

I finally got around to installing XenServer 5.6.fp1 on my Asus T3. (Barebone specs here)
On top of the barebone is 8GB of RAM, two Western Digital Caviar Black 2TB drives for local VM storage and an AMD Phenom II X4 945.



I installed it on a 16GB usb memory stick. It does not need to be that big, but I got it for a good price. Do a quick google for the tip on how to install to a smaller drive.

The install itself is not too much to speak about, except I chose to not use any local storage. (I installed it using Parallels on my Mac without any other drives than the usb stick..)

To have the system boot from my USB stick I looked to this guide http://community.spiceworks.com/how_to/show/1168#4 to rebuild the initrd and tell the kernel to be ok with having the root partition on USB. (I forgot to save the console output, hence just a link..)

After that it is as simple as booting up and enjoying!

At this point I did not get any network running. After double checking that both the internal nic and the Intel Pro 1000 was supported I realized that I let the virtual machine boot and setup networking.
So after editing /etc/sysconfig/network-scripts/ifcfg-eth0 to have the right mac address and in /etc/sysconfig/network-scripts/ifcfg-xenbr0 changing onboot=no to yes it was up properly.

Time to add some storage!
First I ran fdisk on the drives and deleted the existing partitions and created one new on each drive of type fd wich is a Linux RAID partition.

Create the volume, I use a raid 0 for extra speed and space.
[root@localhost ~]# mdadm --create /dev/md0 --level=0 --raid-devices=2
/dev/sdb1 /dev/sdc1

And have a look to see the result is satisfactory
[root@localhost ~]# mdadm --detail /dev/md0

To add the volume as a local Storage Repository in Xen first get the host uuid, for example by running
[root@localhost ~]# xe host-list

Create the SR
[root@localhost ~]# xe sr-create content-type=user device-
config:device=/dev/md0 host-uuid=8dd7f499-3148-4bec-a37a-b614177bbf47 name-
label="Local Storage" shared=false type=lvm

The return is the uuid of the SR, verify with
[root@localhost ~]# xe sr-list


XenCenter Storage

XenCenter Storage