You are not logged in.

#1 2010-03-02 20:01:45

mellofone
Member
Registered: 2009-03-13
Posts: 37

Arch as Xenserver guest OS

I've been playing around with Citrix's Xenserver as a possible option to virtualize some machines. I see that they have pre-rolled debian, centos, and some RHEL templates to get things working, but I would prefer Arch. I've been able to install Arch as a VM without any ussues, but have been struggling getting the XenServer tools running on the guest (which I was told are essential for performance).

I've tried installing a Xen kernel from AUR (http://aur.archlinux.org/packages.php?ID=16087), along with the xe-guest-utilities (http://aur.archlinux.org/packages.php?ID=28591). I can get the Xen kernel booting properly, but the guest utilities never seem to start. Any suggestions?

Offline

#2 2010-03-02 21:58:09

raku
Member
Registered: 2006-08-23
Posts: 48

Re: Arch as Xenserver guest OS

have you got any errors during xe-guest-utilities startup?
Have you switched your VM to PV mode?

both kernel and utilities works OK with my Arch guest working in PV mode.


raku

Offline

#3 2010-03-03 00:12:51

mellofone
Member
Registered: 2009-03-13
Posts: 37

Re: Arch as Xenserver guest OS

I run the xe-guest-utilities from rc.d with xe-guest-utilities start and it just continues, no errors. It doesn't really look like it actually does anything.

Last edited by mellofone (2010-03-03 00:13:06)

Offline

#4 2010-03-03 09:51:49

raku
Member
Registered: 2006-08-23
Posts: 48

Re: Arch as Xenserver guest OS

mellofone wrote:

I run the xe-guest-utilities from rc.d with xe-guest-utilities start and it just continues, no errors. It doesn't really look like it actually does anything.

Can you show me the output from 'ps aux |grep xe-daemon' command?

You should see something like that:

root       760  0.0  0.1  13664  1580 ?        S    Feb12   1:03 /bin/bash /usr/sbin/xe-daemon -p /var/run/xe-daemon.pid

And commenting your first post:

but have been struggling getting the XenServer tools running on the guest (which I was told are essential for performance).

XenTools are essential for performance only in Windows guests.

In any of Linux VM you only need to install kernel with xen support AND switch VM into paravirtualized (PV) mode.

XenTools for Linux guests let you monitor your VM from Citrix XenCenter console and give you the opportunity to use live migration mechanism if you use more than one XenServer host in a pool.


Quick "How to enable PV mode":
1. You need to rename all /dev/sd* to /dev/xvd* in /etc/fstab and /boot/grub/menu.lst

2. Find UUID of your VM:

[root@sun-bl-xe ~]# xe vm-list name-label=<VM name>

3. Switch HVM mode off:

[root@sun-bl-xe ~]# xe vm-param-set uuid=<vm uuid> HVM-boot-policy=""

4. Switch VM's bootloader to PV mode::

[root@sun-bl-xe ~]# xe vm-param-set uuid=<vm uuid> PV-bootloader="pygrub"

5. Find VM's virtual hard drive:

[root@sun-bl-xe ~]# xe vm-disk-list vm=<VM name>

6. Read UUID of virtual drive (VBD) from the code above:

7. Set boot flag for virtual disk of your VM:

[root@sun-bl8-xe iso]# xe vbd-param-set uuid=<VBD uuid> bootable=true

8. Reboot your VM and pray ;-)


raku

Offline

#5 2010-03-03 18:33:39

mellofone
Member
Registered: 2009-03-13
Posts: 37

Re: Arch as Xenserver guest OS

I hosed the VM and started over. smile

Before I give it another whirl, does this support ext4? I think I remember that it doesn't, so I'll stick with ext3 for now. I'll get back after the kernel build. Thanks!

Offline

#6 2010-03-03 20:17:18

mellofone
Member
Registered: 2009-03-13
Posts: 37

Re: Arch as Xenserver guest OS

Drat, almost there. I must have forgot to change the device names to  /dev/xvd* because it is still looking for the by-uuid device in grub. I also can't seem to get it to boot the arch install ISO anymore, it always boots the virtual drive first...

Offline

#7 2010-03-04 15:09:58

mellofone
Member
Registered: 2009-03-13
Posts: 37

Re: Arch as Xenserver guest OS

No good. I created another temp VM and attached the Arch disk to it. Booted and mounted, changed everything to /dev/xvda1 and 2 (swap and /), and changed grub as well. At boot of the arch VM I get:

Root device '/dev/xvda2' doesn't exist. Attempting to create it. Unable to determine major/minor number of root device '/dev/xvda2'. You are being dropped to a recovery shell.

And that's where it stops. Please don't make me use Debian! smile

If I look at the Storage tab of the VM, it shows the VD with a path of /dev/xvda, so that appears to be correct...

Offline

#8 2010-03-05 22:17:00

raku
Member
Registered: 2006-08-23
Posts: 48

Re: Arch as Xenserver guest OS

try to type 'echo *' or 'cat *' (one of these should work) in recovery shell. It should write down all devices from /dev. Check if there are any devices from /dev/xvda disk.


raku

Offline

#9 2010-03-06 00:46:19

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Arch as Xenserver guest OS

I might ask arch-general since IIRC the main arch servers are run in Xen

Offline

#10 2010-03-08 17:27:17

steve___
Member
Registered: 2008-02-24
Posts: 452

Re: Arch as Xenserver guest OS

For anyone following this thread, mellofone posted this again here http://bbs.archlinux.org/viewtopic.php?id=92742

I suggest this thread be closed.

Offline

#11 2010-03-18 22:26:24

estyles
Member
Registered: 2008-09-02
Posts: 6

Re: Arch as Xenserver guest OS

It doesn't look like there was ever a resolution to this.  I have pretty much the same problem that the OP had.  No matter what I do, I cannot get the VM to start up in PV mode.  The best case I got to was that pygrub was executing correctly, and was definitely reading from the proper location (because it would try to mount whatever drive I had set as "root=" in my menu.lst on the target drive).  However, the VM could not find /dev/xvda1 (or /dev/sda1, but I'm assuming that's expected operation), and would crash on boot.  I had /dev/xvda1 in both the menu.lst and in fstab.  When it dropped to a recovery shell, I was unable to use the console, so couldn't do any further troubleshooting on the machine.  (Changing a PV-args parameter, as suggested elsewhere would fix the console, ended up just throwing a kernel panic and was still unusable.) 

I also tried using the kernel26-lts as the OP mentioned in the linked post, with no luck.  The three kernels images I tried were kernel26, kernel26-xen, and kernel26-lts, with the corresponding vmlinuz files.  Nothing seems to help.  Does anyone know what would cause the /dev/xvda1 partition to not show up at all on the VM?  Running xe-edit-bootloader shows the partition names as expected (/dev/xvda1 is an ext4 drive, so I tried using /dev/xvda2 as a boot partition set up as ext2 (which is where the menu.lst resided on that pygrub was eventually able to read).  Is it just not being exposed to the guest OS by the host?

Argh...  it seems like it's so close...

Offline

#12 2010-03-19 00:32:13

mellofone
Member
Registered: 2009-03-13
Posts: 37

Re: Arch as Xenserver guest OS

After installing the LTS kernel, did you ssh into the Xenserver and change it to PV mode? Follow the commands here:

http://forums.citrix.com/thread.jspa?th … &tstart=15

After doing that stuff, it's been working perfectly for me with the LTS kernel. From what I read ext4 is not supported, so I have a / disk with ext3, and another disk mounted at / that is ext4 and it's working great.

Offline

#13 2010-03-22 16:55:29

estyles
Member
Registered: 2008-09-02
Posts: 6

Re: Arch as Xenserver guest OS

Well, I followed the directions given by raku in this thread.  The directions you link to are slightly different, but it looks like it only fixes the terminal issue I had, and probably won't fix the errors in booting.  I'll give it a try though.  However as of now, I've spent a lot of time on putting this machine together and want to roll it out as a prototype, so I'll do that without the xen tools.  If I have time before we're ready to rollout, I might make a snapshot and try again, or more likely wait until we build the second machine and mess with that one.

Offline

#14 2010-03-22 17:11:08

mellofone
Member
Registered: 2009-03-13
Posts: 37

Re: Arch as Xenserver guest OS

I have really had no luck installing the tools themselves, only a Xen aware kernel from the LTS. I believe the tools still require the AUR Xen kernel, which I could not get working. Plus, the tools in AUR are out of date...

Offline

#15 2010-10-12 08:43:10

x0x01
Member
Registered: 2010-10-12
Posts: 1

Re: Arch as Xenserver guest OS

add in /etc/mkinitcpio.conf
MODULES="... xen-blkfront ..."
and
mkinitcpio -p kernel26-xen
then reboot in PV

Offline

#16 2010-10-20 12:41:44

lolo_p
Member
Registered: 2010-10-19
Posts: 2

Re: Arch as Xenserver guest OS

I have archlinux on xenserver, work ok, xentools work ok to, but ...
console on xencenter work olmost ...
when vm start i see starting archLinux, starting daemon, but when start the last daemon, console freeze
and i can`t do nothing

any ideas?

Offline

#17 2010-10-20 12:56:25

raku
Member
Registered: 2006-08-23
Posts: 48

Re: Arch as Xenserver guest OS

@lolo_p: switch your tty0 to hvc0 in /etc/inittab and add console=hvc0 to grub


raku

Offline

#18 2010-10-20 13:26:35

lolo_p
Member
Registered: 2010-10-19
Posts: 2

Re: Arch as Xenserver guest OS

hvc0 in /etc/inittab

fixed my problem

thanks raku

Offline

Board footer

Powered by FluxBB