now for the first time I'm perhaps able to give st. to the community instead of always asking
"mini-howto" for a LMCE-core in a VM: (please read it fully before beginning as its "golden thread" is not straight )
Tyan n6650w, currently one Quad-Opteron 2352, 8GB RAM, 8x1TB HDDs at an Adaptec 2820SA, ATI 2600XT. The server has uses a Technisat Skystar HD2.
Very Important: The Host-CPU(s) needs to support VT-d (Intel) or AMD-V (AMD). The Barcelona-Opterons are quite fine for this. I did not look up for other CPUs, but newer AMD should all have this feature.
My "Host", as the physical server ist to be called in this text, runs at Kubuntu 9.04 x64, patched with latest updates. You can choose the "type" (x32/x64) for each virtual machine individually, so it does not hinder LMCE-x32.
1) Set up your Host/Server with any Linux that supports hardware-KVM. Kubuntu 9.04 is nice as it features the latest KVM-packages. Install all KVM packages, if not already. Install and use "virt-manager" on KDE for an easy installation of a Kubuntu 8.10 guest, but install the VM in the "System" section, as it gives a necessary NIC-option: Bridged-Mode for the NIC! If there's no "System" available, start virt-manager from the console "virt-manager -c qemu://meinserver/system"
1a) In the install options, when assigning the NIC, take "bridged mode -> share physical network (eth0)". You can assign it later an IP in the "normal" network-range, LMCE will detect and configure quite fine a kind of double-bridge which runs smoothly.
1b) Install the guest-Kubuntu as usual now. I recommend saving the "pure" Kubuntu guest for faster recovery if st. does not work later.
1c) After installation, start the VM and look if everything is ok. I recommend to assign the 192.168.80.x IP-range to every PC in the house or change the LMCE-install-files...
My Host uses 192.168.80.254. Assign the virtual Kubuntu e.g. the IP 192.168.80.252, netmask 255.255.255.0, gateway [Host-IP, in this example 192.168.80.254] and do all the updates. I strongly recommend to shut down every DHCP-server as the LMCE-core, installed in the next step, should be the only one in the LAN.
1d) Install LMCE in the VM as usual. I recommend to edit the installer-files before starting the installation with the current usage: "vim mce_wizard_data-single_nic.sh", set device-type to Core, Ext-DHCP no, run dhcp-server yes and put in the IP-values for your "external" network, see above.
When the installer has finished and restarts the VM, it should run quite fine. The pluto-admin page should be available from every PC in the house with the standard address (192.168.80.1 or .252 in this example). As it happens, the VM will use two IPs, the one assigned in 1c) and the .1-default IP. Not necessary, but it does no damage.
It's now time to put the TV-card(s) into the VM.
2) Grab the 2.6.30-rc7 (the latest available) source, unpack it on the Host to e.g. /usr/src/linux-2.6.30-rc7 and do a "make menuconfig"
3) Follow the instructions in: http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM to assign the card to the virtual machine. I tried those instructions for many times without success because they miss to state that a 2.6.30.x-kernel is needed!!
- I tried the 188.8.131.52, but it misses the pci-reset-ability or anything else. 2.6.29. is bad, 2.6.30 is your friend.
3a) After compiling and installing the new kernel, enter /etc/libvirt/qemu and search for your VMs' .xml file. Edit it (e.g. "vim lmce810.xml") and add the following lines:
<hostdev mode='subsystem' type='pci'>
<address bus='0x01' slot='0x04' function='0'/>
Of course, you need your own values. My card is located at 01:04.0, so simply adapt it to your needs.
Save the file and do the reboot with the new kernel.
(you can do this step any time, but you need a restart of the libvirt to load the edited .xml; simply restarting virsh/virt-manager isn't enough)
4) After you now did the remaining steps of the KVM-link above (3-6), test if everything is ok:
- kernel 2.6.30.x is running on the Host?
- do a "lspci -v" on the Host. The DVB-card should now list the driver "pci-stub"
5) start up the VM-LMCE. Login on the ususal ways, e.g. via putty from any Windows-PC. On the VM, do a "lspci". The dvb-card should be present.
Install the drivers for the dvb-card on the VM and have fun.
It's a crude howto, but those of you with some linux knowledge should get the points. When setting up the whole system again, I'll take some screenshots to give a "nice" Howto. Please excuse the bad englisch, I lack the practise...
This should be possible with multiple PCI-cards. It may even possible *only* with all PCI-cards, as the KVM-Howto mentions that all PCI-devices behind a bridge need to be assigned in whole.
I did shutdown the firewire-port in BIOS to have the DVB-card as the only device behind a bridge on my mainboard.
If you experience problems which sound like this, try "lspci -t" on the Host and have a look for your DVB-cards.
On my Host it looks (now, after disabling firewire) like:
+-06.0-[0000:01]----04.0 (<- DVB-card)
I used many, many days to get this working, so don't give up! I got it working and so can you.
And if someone asks "why the hell....": I use another VM with Windows Server+Exchange Server and the Host hosts as internal file server... other applications may come in future.
- and the weekly LMCE-experiments "8.10" do not interfere with the normal server services
Pehaps a Wiki-Page would be nice? I'd do the first text