You are not logged in.
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
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
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
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
I hosed the VM and started over.
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
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
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!
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
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
I might ask arch-general since IIRC the main arch servers are run in Xen
[git] | [AURpkgs] | [arch-games]
Offline
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
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
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
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
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
add in /etc/mkinitcpio.conf
MODULES="... xen-blkfront ..."
and
mkinitcpio -p kernel26-xen
then reboot in PV
Offline
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
@lolo_p: switch your tty0 to hvc0 in /etc/inittab and add console=hvc0 to grub
raku
Offline
hvc0 in /etc/inittab
fixed my problem
thanks raku
Offline