LinuxMCE Forums

General => Users => Topic started by: daballiemo on September 13, 2008, 05:34:49 pm

Title: Having a go at LinuxMCE on xen
Post by: daballiemo on September 13, 2008, 05:34:49 pm
My thought:

As I have a number of website running of Xen, sharing SMB to local PC's and being fed up with Vista not coming out of hibernate I was willing to give a DomU construction a go. So let me tell you about that in this thread. First of all my xen-tools script statement:

xen-create-image --hostname=mediaserver --size=25Gb --swap=4Gb --ide \
--ip=10.0.0.11 --netmask=255.255.255.0 --gateway=10.0.0.138 --force \
--dir=/virtualmachines --memory=1024Mb --arch=amd64 --kernel=/boot/vmlinuz-2.6.24-19-xen \
--initrd=/boot/initrd.img-2.6.24-19-xen --install-method=debootstrap --dist=gutsy \
--mirror=http://archive.ubuntu.com/ubuntu/ --passwd
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on September 13, 2008, 05:42:02 pm
1) Then, to make sure everything is as virgin as possible, get rid of update line in sources.list. I use vim (apt-get install vim) to edit /etc/apt/sources.list to comment out all of the update depositories.
2) Install the kubuntu desktop via apt-get install kubuntu-desktop. Btw this will take a bit of time ;-)
3) After the installation I will start a new X session on my desktop (my server is headless) with "xinit -- :1 vt12. After that switch to vt 12 and kick of a X session through ssh by "ssh -X -l root 10.0.0.11.
4) Did i tell already I exported an extra PCI network card to the DomU via PCIBack? No i didn't but that is a whole story on its self. If you have done this as well make sure that the card is inserted via the PCI statement in the xen config. Need any details, let me know.
5) So now you should have a running virgin kubuntu enviroment with 2 network cards, should be the perfect enviroment for LinuxMCE ;-)
6) using smb/nfs make sure you put the 2 linuxmce cd's and the kubuntu desktop cd on your virtual system.
7) Install cron & iptables: "apt-get install cron iptables". You will need it later on, that is LinuxMCE.

Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on September 13, 2008, 05:59:06 pm
Now comes the tricky part, for whatever reason you are able to mount the first iso and get the installation file of there but running it will not give you a go, at least that is you get no desktop item. So u can't kick of the installation. Furthermore running it will complain not being to unzip a compressed image.

So i did it the following way: because the installer consists out of a script and a compressed image I used vim to take the script part out and save it in a new file. I used one of the standard tools to unzip the compressed image. For my script and the other necessary files see the download link.

http://www.gigasize.com/get.php?d=msb28nkr1wb

unpack into mceinstaller dir in root, cd to the directory and execute han.sh "./han.sh"
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on September 13, 2008, 06:04:26 pm
Then the next problem. As i am using X over ssh i have to do something about the display variable when starting of LinuxMCE. First of all I kill the running process for lmce*

ps -ef | grep lmce

it gives you the pid number, kill that one of.

now edit /usr/pluto/bin/lmce
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on September 13, 2008, 06:04:45 pm
And that is where it all stopped. To much freakin hassle. Won't finish this, or my family life will be dead and gone for sure. But I've entered another road, so bear with me and I'll tell.... ::)
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on September 26, 2008, 07:41:21 pm
Yes, yes and yes again. Got it working after almost a year of tries and more tries...

Configuration:
server hardware: ASUS M3A Mb, AMD 64*2 5000+ 4Gb memory and a couple of HD's, an extra network card and one Hauppauge PVR150
server software: Ubuntu Hardy Heron 8.04 server with XEN 3.2 installed

xen setup according to http://docwhat.gerf.org/2008/08/xen-networking/. Make sure you name the bridges eth0, eth1 etc otherwise the setup will fail.

Dom0 has a pciback.hide statement in the kernel parameters to hide the capture card. I've installed ConVirt to make my life easy when making VM's. Dont forget to change the "file" statement into "tap:aio" otherwise starting the vm will fail. Make also sure to run the ConVirt script on the server otherwise you are not able to connect....

DomU (LinuxMCE) created as a PVM. Any other option results in the disasters I have had during the last year. Attach one virtual network card to bridge eth0 the other to bridge eth1 after setting up. When starting the install LinuxMCE will detect 2 networkcards for the normal setup.

DomU (Ubuntu Gutsy Gibbon with Myth backend installed). Use ConVirt to bootstrap a Gutsy commandline system. Make sure you add the hauppauge card to the config file through the pci statement. Also do not forget to add "extra="swiotbl=force"" otherwise your Domu will crash on DMA errors. Add Mythbacked to the DomU as described in https://help.ubuntu.com/community/MythTV/Install/Feisty/Backend, make sure you do not make a master but a slave. Via the setup connect to the master. And you are up and running ;-) Make sure you do not use any version newer than Gutsy or otherwise you probably have to rebuild the core because of a corrupted Mythconverge database.

If you want to know all the info I gathered during the process just PM me and I'll send you my details for delicious.com. I am happy to answer any question or send any config file ;-)

Next topic: how to get my ISDN card into place, netbooting XEN MD ????
Title: Re: Having a go at LinuxMCE on xen
Post by: tschak909 on September 26, 2008, 09:41:16 pm
Could you please document that on the wiki, once we've brought it back up?

-Thom
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on September 28, 2008, 07:37:30 pm
Thom,

Will do, but will take a bit of time. I'm currently on holiday, back the 8th of October. Its in my own interest to document it as well :-)

rgds

Han
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on October 25, 2008, 06:27:55 pm
We'll gents, all failed. The problem lies in the fact that XEN virtual network interfaces will not pass enough traffic to have the system run smooth. Maybe VT_D will help but for that I'll first have to buy a new MB.

rgds
Title: Re: Having a go at LinuxMCE on xen
Post by: totallymaxed on October 26, 2008, 01:44:24 pm
We'll gents, all failed. The problem lies in the fact that XEN virtual network interfaces will not pass enough traffic to have the system run smooth. Maybe VT_D will help but for that I'll first have to buy a new MB.

rgds

Try Virtualbox (http://www.virtualbox.org) ... that works fine with the LinuxMCE-0710 DVD ISO. Cant see why the CD iso would not work too... but I have not tried those.

Andrew
Title: Re: Having a go at LinuxMCE on xen
Post by: grantmasterflash on October 28, 2008, 09:31:02 pm
We'll gents, all failed. The problem lies in the fact that XEN virtual network interfaces will not pass enough traffic to have the system run smooth. Maybe VT_D will help but for that I'll first have to buy a new MB.

rgds

I hate to say this but if VirtualBox can do this then Xen can. I get over double the network bandwidth out of Xen as I do VirtualBox and I use both for various projects. There's obviously something misconfigured with Xen. I'll see if I can duplicate this as I've been wanting to do it.

Grant McWilliams
Title: Re: Having a go at LinuxMCE on xen
Post by: hari on October 28, 2008, 09:36:13 pm
don't use hvm.

best regards,
Hari
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on October 29, 2008, 05:14:45 pm
Hari,

I had to use HVM as the other way, ie use PV, would not let me start the installer. Only after extracting the gz part of the installer and modifying the script in front of the gz container I was able to run the installer. But, when the system was running I got all kind of errors crashes etc. That is why I went for the core to be HVM and a mythbuntu slavebackend to do my TV recordings.

At this moment it will only be possible to build a HVM and have the access to PCI(e) directly using VT-d which is only available on the P5E VM DO mb which I do not have. Beside that its running out as well but I am still trying to find one. (http://wiki.xensource.com/xenwiki/VTdHowTo (http://wiki.xensource.com/xenwiki/VTdHowTo))

The whole XEN setup will give me the ability to be able to run my websites on the external side of the server without interfering with LCME.

I would love to have a way to set it up as a PV which takes a way the need for a new motherboard as I can pciback the necessary cards into the VM.

rgds

Han
Title: Re: Having a go at LinuxMCE on xen
Post by: hari on October 29, 2008, 07:34:55 pm
run the installer on hvm/kvm/real hardware/wherever, then convert/extract the root partition out of the (virtual) disk (image).

br hari
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on October 29, 2008, 09:54:29 pm
Hari,

thanks for your thoughts, although the latter part I really have no clue how to go about. Can you give me a hint, I am very interested ;-)
Title: Re: Having a go at LinuxMCE on xen
Post by: Enigmus on October 30, 2008, 02:46:02 pm
We'll gents, all failed. The problem lies in the fact that XEN virtual network interfaces will not pass enough traffic to have the system run smooth. Maybe VT_D will help but for that I'll first have to buy a new MB.

rgds

I recommend not using the virtual networking then.  Pass one or more Network card directly to the VE without having the Xen Host in the way.

http://www.wlug.org.nz/XenPciPassthrough
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on October 30, 2008, 08:55:29 pm
Okay, let me explain again  ;)

* I am able to install LMCE in a HVM, but that has no access to any pci(e) hardware. At least not without VT-d which is only available on a small amount of MB's and using a Intel procc. So the only way I can hook the system to the network is via virtual network interfaces and that causes congestion. Not to mention not having access to ISDN cards and so on.

* Installing in an unpriviledged domain (PV) will give you access to PCI(e) through pciback.hide but when building the domain the installer of LMCE fails. When I did overcome the latter (tearing the installer down into bits and pieces) I was able to install the lot, but the system was everything but stable...

So if there is a way to install LMCE as a PV I would certainly give it a go and if able to build would provide the VM as a appliance to everybody interested.

rgds

Han

Title: Re: Having a go at LinuxMCE on xen
Post by: skeptic on October 31, 2008, 04:42:38 am
Just out of curiosity, why is it you think the issue is with nic bandwidth?  You say XEN gets double the bandwidth virtualbox does, yet someone else mentioned virtualbox works fine.  I also run a virtualbox MD, and as long as my host OS isn't bogged down and I keep the VB resolution to 800x600 (IIRC) it runs fine.  I'm pretty confident the limitations are CPU/memory resources not bandwidth.  Is it possible the same is true for your XEN setup?

disclaimer:  I've never touched XEN.
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on October 31, 2008, 10:53:01 am
I've noticed that with a Gb link and using iptraf to check I was able to push not more than 20Mb/sec
Title: Re: Having a go at LinuxMCE on xen
Post by: Enigmus on October 31, 2008, 02:01:10 pm
Okay, let me explain again  ;)

* I am able to install LMCE in a HVM, but that has no access to any pci(e) hardware. At least not without VT-d which is only available on a small amount of MB's and using a Intel procc. So the only way I can hook the system to the network is via virtual network interfaces and that causes congestion. Not to mention not having access to ISDN cards and so on.

* Installing in an unpriviledged domain (PV) will give you access to PCI(e) through pciback.hide but when building the domain the installer of LMCE fails. When I did overcome the latter (tearing the installer down into bits and pieces) I was able to install the lot, but the system was everything but stable...

So if there is a way to install LMCE as a PV I would certainly give it a go and if able to build would provide the VM as a appliance to everybody interested.

rgds

Han

I see where your going now.  On an semi-unrelated note.  XEN supports AMD-V so the range of Hardware supported VEs is larger then you think.  Any newer AM2 socket board will support it, but yes that does limit the availability of the solution.  Also as of 3.3 Xen has some support for PCI pass through for hardware visualized environments.  I have been meaning to give it a try to see if they have reach the level of support for video cards but I have not found the time or the hardware.

However Xen does networking (in V3.0 or lower) it does it strangely.  In the past I had tried with out success to use IPtables rules on the Xen Host to filter traffic to VEs.  Rules that should have worked failed to allow appropriate traffic.  Now that Hardware virtual environments have access to PCI pass through (v3.3) I was going to fiddle around with having a PFsense (FreeBSD) hardware virtualized environment route all my Xen traffic for me by giving it direct access to the NIC.  However, I haven't put together the cash  to get the hardware.

What version of XEN are you using? Is it just the through put or are there other Network issues?  What's the through put when the Xen host pushes traffic?  What type of hard drive is the Xen hosts using (IDE, SATA, SAS, SCSI)?  What is the Available RAM in the system and how much are you dedicating to the LinuxMCE VE?
Title: Re: Having a go at LinuxMCE on xen
Post by: Enigmus on October 31, 2008, 02:11:26 pm
Sorry, I see you gave it 1gb from you config.
Title: Re: Having a go at LinuxMCE on xen
Post by: skeptic on October 31, 2008, 03:58:07 pm
I've noticed that with a Gb link and using iptraf to check I was able to push not more than 20Mb/sec
Is that 20 MBytes per second or is it really 20Mbits per second? 

Either way, what exactly is the problem?  20Mb/s throughput should be plenty for streaming media unless you are trying to push HD.  The fact that it does not run smooth (the only reference I've seen to the issues) could easily be something other than nic speed. 
Title: Re: Having a go at LinuxMCE on xen
Post by: daballiemo on October 31, 2008, 06:15:11 pm
We'll its not the only vm using the interface, so when you take it all together its not fast enough. Btw I guess its 20Mbit/s