Turn the VMWare SDK into Xen HOWTO
From GreenphoneWiki
[edit] Turn the VMWare SDK into Xen HOWTO
If you want to turn the vmware into xen then you need to redirect the USB device from the dom0 to the xenu. First, run lspci on dom0 to figure out what you wat to move. In my case:
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
Note you can't move "half" the device. so for one usb port, you need to move it all. Change the grub entry for xen (the hypervisor, not dom0!):
title Fedora Core (2.6.18-1.2798.fc6xen)
root (hd0,1)
kernel /xen.gz-2.6.18-1.2798.fc6 physdev_dom0_hide=(00:1d.0)(00:1d.1)(00:1d.2)(00:1d.3)(00:1d.7)
and reboot the dom0/hypervisor. When booted in dom0, make sure you don't have device drivers loaded for the device. I had to do:
rmmod uhci-usb ehci-usb ohci-usb
Now add the bus to the pci backend module:
modprobe pciback
for i in '0000:00:1d.0' '0000:00:1d.1' '0000:00:1d.2' '0000:00:1d.3' '0000:00:1d.7'
do
echo -n $i > /sys/bus/pci/drivers/pciback/new_slot
echo -n $i > /sys/bus/pci/drivers/pciback/bind
done
Now they're on the queue to be handed out to the xenu. so change the xenu xen config file and add:
pci = ['00,1d,0','00,1d,1','00,1d,2','00,1d,3','00,1d,7']
xm create your xenu and tada. your device is there and you can modprobe usbnet.
You will also need to add the xen virtual console device in /dev, especially if udev fails to start. This depends on your xenu kernel (it might be too new for the udev included with the vmware image). If it is, you need to create the various /dev /files manually. From the host (dom0) with the mounted rootfs in /mnt:
/sbin/MAKEDEV -d /mnt/dev console tty hda null zero random urandom
mknod /mnt/dev/xvc0 c 250 187
If you run an older xen kernel, you might need one of the older used major/minor's of xen. The easiest way to find out is to login to one of your other xenU images. and ls -l /dev/xvc0
Change one of the mingetty's in /etc/inittab to run on xvc0 and dont forget to add xvc0 to /etc/securetty if you want to login as root.

