Category Archives: Computer geek stuff

Documenting what I’ve learned (for final production setup)

Passing PCI devices to domU guest OSs
On the host OS, make this into a script, and run it:

modprobe pciback
SLOT=0000:01:06.0
echo -n $SLOT > /sys/bus/pci/drivers/bttv/unbind
echo -n $SLOT > /sys/bus/pci/drivers/pciback/new_slot
echo -n $SLOT > /sys/bus/pci/drivers/pciback/bind
SLOT=0000:01:06.1
echo -n $SLOT > /sys/bus/pci/drivers/pciback/new_slot
echo -n $SLOT > /sys/bus/pci/drivers/pciback/bind
SLOT=0000:01:07.0
echo -n $SLOT > /sys/bus/pci/drivers/pciback/new_slot
echo -n $SLOT > /sys/bus/pci/drivers/pciback/bind

SLOT refers to the PCI bus of the device… see if that has changed for new setup… it shouldn’t.

And to start the domU guest, start it using this:

xm create opensuse-1 pci=01:06.0 pci=01:06.1 pci=01:07.0 extra="swiotlb=force"

MythTV will detect the cards and use them.

UPDATE:
Just installed SuSE on the new production server, and the above worked flawlessly.

UPDATE:
For the mythtv-backend server, if channel names don’t come in correctly, try this:
mythfilldatabase --do-channel-updates

Virtualization has begun

So I decided last night to turn my Athlon64X2 4000 workstation into a server.
I installed a fresh copy OpenSuSE 10.3, with minimal packages. Everything installed and running is using 55Megs or ram.
I installed XEN, and the system is now using 96megs.

I installed XP, and that runs just fine. However it seems that I cannot assign hardware to it for exclusive use just yet. Apparently that feature isn;t available in XEN 3.1
EDIT: Actually, hardware passthrough isn’t possible in a fully virtualized environment. In a Paravirtualized environment, it is, but requires a custom kernel.
Bummer. So much for the easy way out, of installing beyondtv, and being done with it…
: (

Server machine OS upgrade (cont’d 2)

How to break up all the different environments in VM land?

I think I will try to further continue the division of services as specialized VMs.

Main OS, will take care of file sharing. Experiment with installing SuSE with ALL the options unchecked. And then build up from there with services.

– First VM would be a internet server environment. Maybe a LAMP server?
– Second would be a VM to manage TV shows recordings. Initially it will probably be BeyondTV based, but eventually go to MythTV.
– Third would be an application server? (With no desktop PC except for the laptop, more power intensive applications would be ran remontly)

Where do I put SlimServer?

Server machine OS upgrade (cont’d)

More thoughts on this:
– Have been experimenting with XEN, and it turns out that the server CPU (Athlon64 3700+) doesn’t have hardware virtualization built in. However, the desktop (Athlon64 X2 4000+) does.
No Hardware virtualization means that a special kernel is required for the OS to run, which excludes Windows as being one of the OSs. Not that it’s a problem, but it would have made the initial switch, easier, since the BeyondTV software could be ran and setup easily.
– The reason XEN is attractive is because it allows for PCI devices to be dedicated to certain XEN environments, which means even under virtualization, I can use pci devices in the VM environments.

I think the simple solution is to buy Socket939 CPU with virtualization, and call it a day.
UPDATE: Or just use the Athlon64 X2 4000+ machine. I can always upgrade the socket 939 box later and probably for cheaper. Besides, the Asus M2N-E mobo with the x2 CPU has more PCI slots (3 in total)

I’ve tried to make things work on a budget, but for $60 I can get a dual core cpu that will do the trick. Much easier to spend the small amount then to spend endless hours trying to get software modified…

I think the decision is clear.

Server machine OS upgrade (to SuSE 10.3)

As part of the consolidation project, I need to be able to virtualize the current TV recording PC.
This means being able to capture video in a virtual machine, and the only way that seems to have any potential success is using a USB capture device.
So I bought one. PVR HPV 950 (or something like that?)
I spent most of last night trying to get USB devices to be seen by either Virtual Box or VMware Workstation 6, in SuSE 10.2, but to no avail.

However, the laptop running SuSE 10.3RC1 with VMware workstation 6 had no problem detecting a WiFi USB adaptor, with no fussing with the host OS.. I’ll have to try the actual capture card tonight, and see how well it performs.
All it needs to do is capture video. No TV watching.

The only change I made to the Suse 10.3 system was modified the usbfs entry in the /etc/fstab file, to ‘auto’ from ‘noauto’. That’s it. After a reboot, I installed VMware Workstation, and the USB passthrough worked. Continue reading