[WIP] XBMC VM Appliance


Recommended Posts

OK, so fun little question.  I manage to get xbmc-git installed on top of an Arch vm with pci pass-through for the sound card.  One issue, I am not doing video passthrough so there is no real screen for the output.  Is there any way to make things work without that?  My main goal with this was simply to have an audio player with a good android controller (yatse) and nothing else.  call it a poor mans sonos...

 

any advice or direction is welcome.  If I need to add a cheapo video card and pass it through for things to work, I think I have one laying around, but if it is possible to make this work without that, it would be way better.  Thanks.

Link to comment
  • 3 weeks later...

added a video card and I can see xbmc, so all that is good, however, the audio does not pass through.  I see it playing, but that is it, there is not audio out.  I went into alsa mixer to ensure nothing is muted and all that looks fine, so I do not believe the issue is there.

 

Which OS?

Link to comment
  • 3 weeks later...

I was just checking to see if anyone ever came up with a working img that had xbmcbuntu or a similar setup (openelec,xubuntu+xbmc,etc.) ready to go and working.  I was hoping to try this out myself and thought I'd see if I actually needed to recreate the wheel first...

 

Troy

Link to comment

Ah -- I tried with the Xbmcbuntu 13 (Gotham) install ISO at first and wasn't able to get it to install.  I see from some earlier posts that this may be an issue(?).  Anyways, switching back to Frodo (12.2) seems to have allowed me to at least get this installed via VNC.

 

After that, I worked on passthrough (using an AMD Radeon 5450), and after tinkering with it for a bit, it eventually seemed to just take a couple reboots of the guest and another reboot of the Unraid host to get it working properly.  Perhaps I was plugging and unplugging the hdmi cable too much here and things got wonky.

 

Anyways, it's now on my screen and I can play around with this.  Are there a set of optimal settings for XBMC video/audio playback somewhere for running this through Xen?  Just want to optimize it as much as possible.

 

Thanks, ironicbadger -- your tutorials have been invaluable to get me to this point!

Link to comment

Need some assistance. How do you go about setting up xbmcbuntu in its own DomU under unraid6. I tried botting with the downloaded iso and then it gets stuck "no medium live filesystem" or something like that.

I want to use this to play directly to my TV via my amp (I figured out the pci passthrough bit).

 

Link to comment

I still need to re-visit this issue.  I know my issue seemed linked to the pass-through of the audio card.  Still plan to install ubuntu and go that route as it was claimed to work.  Just never enough time in a day to mess...

 

OK, so I finally got back to working on this and using Ubuntu 12.04 and xbmc Gotham, I did manage to get audio to output.  This is better than I had before and I called it a success, until of course I looked at my system utilization.  I was trying to figure out why things were choppy and it turns out it was caused by the cpu being up to 98%.  As soon as I stopped xbmc, it drops to 0.8%.  So obviously the issue is with XBMC, sort of.

 

This got me looking and it brought me back to the thread in which our old pal grumpy mentioned using xbmc-xvba, but it seems that project may be dead, but couldn't determine for sure.

 

Either way, I thought it best to take a step back and try to talk about what I was doing/using.

 

Because xbmc needs a video card, I added a Matrox G450 to my system to pass it through.  I also have a Rocketfish audio card being passed through.

 

The system at this point is running on Ubuntu, on top of Xen 4.4.  I assume I want PVHVM, maybe?  This is where I am not sure, so it probably adds to the issue.

 

In my config, a few lines to note:

builder='hvm'

xen_platform_pci=1

usbdevice='tablet'

 

I do not have device_model_version defined as it seemed I do not need it, but I am not able to say for sure, simply because I do not know.

 

beyond that, things boot and seem to function OK.  The only thing that seemed to stick out to me is when I issue lspci in the domu, I see it come back with 2 vga devices.  one is "device 1234:1111" and the other is my Matrox card.  Looking in the system settings, Graphics is listed as, Driver VESA:Bochs/Plex86 VBE Adapter, but I know Ubuntu has Matrox drivers, so why is it not using them?

 

I assume, the issue is related to the one noted to be fixed when using xvba, but that is with radeon graphics, so it doesnt relate specifically, but very similar.  I figure I will leave things in this state to see if anyone has any ideas.  If not, it may become time to abandon the idea, but I cannot imagine this issue to be a show stopper since things are functional otherwise.

 

Edit:

 

Just stumbled across this post.  Might have something to do with my issue.

The drivers/hardware that no longer have mainline Mesa driver support are listed below.

i810: Early Intel 8xx series IGPs
Mach64: ATI Mach GPUs
MGA: Matrox GPUs
r128: ATI Rage 128 GPUs like the Rage Fury, XPERT 99, and XPERT 128
Savage: S3 Savage GPUs
SiS: Crusty SiS GPUs
Tdfx: 3dfx Voodoo graphics cards
Unichrome: VIA IGPs (Well, the ones where there was actually support available.) 

Link to comment

This is why I love VMs.  Spun up another last night to test xbmcubuntu and this time things do not even start after install.  The OS loads, but not xbmc.  Going through the teminal it barks about the video card, so at this point it is pretty obvious that it does not like my matrox card.

 

Which got me thinking.  Obviously if I have one video card and pass it through then the base system (dom0) has no video card.  I do not know what that would do to the system from a perspective of booting and stuff, but what about if I leave my matrox card for dom0 and pass the onboard intel video card to the domu?

 

I assume I would hide it in the same way as any other device, but my concern is making sure the system will still boot and flip over to using the add-on card.  My thought is that if I edit the BIOS and force that as the primary display, then it may work as needed.

 

This would then leave me with a still old, but newer intel graphics card for XBMC.

 

Otherwise I may just have to go get a cheap pcie video card...  Stay tuned.

Link to comment

I have a xbmcbuntu VM running with Gotham although I am having alot of artifacts on the screen. Its mostly when on the home screen. I notice some issues while watching videos but not nearly as bad as the home screen. Anyone else notice this?

 

Passed through a hd6450.

 

Edit: It appears to be resolved with adding this to the advancedsettings.xml.

 

<gui>   

  <algorithmdirtyregions>1</algorithmdirtyregions>

  <visualizedirtyregions>false</visualizedirtyregions>

  <nofliptimeout>0</nofliptimeout>

</gui>   

<cputempcommand>sensors|sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>

<gputempcommand>/usr/bin/aticonfig --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,," | sed 's/$/ C/'</gputempcommand>

Link to comment

I have a xbmcbuntu VM running with Gotham although I am having alot of artifacts on the screen. Its mostly when on the home screen. I notice some issues while watching videos but not nearly as bad as the home screen. Anyone else notice this?

 

Passed through a hd6450.

 

Edit: It appears to be resolved with adding this to the advancedsettings.xml.

 

<gui>   

  <algorithmdirtyregions>1</algorithmdirtyregions>

  <visualizedirtyregions>false</visualizedirtyregions>

  <nofliptimeout>0</nofliptimeout>

</gui>   

<cputempcommand>sensors|sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>

<gputempcommand>/usr/bin/aticonfig --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,," | sed 's/$/ C/'</gputempcommand>

 

99% of the people running XBMC in a VM in this forum are not running it with the PV drivers (XBMCuntu does not have these in their image) or using Video Hardware Acceleration. I suspect you are not either.

 

When you goto System Info on the XBMC and look at the Video Information what Drivers is it showing?

 

If it isn't using either the ATI Proprietary or the Radeon ATI opensource drivers.... You are decoding all your videos via the CPU and not the video card. Between that, not using the PV network / hard drive drivers is probably why you are seeing artifacts. Start a video in your XBMC VM and run "xl top" command on your Server. You will see your CPU for your VM go WAY up and max out I bet.

Link to comment

He lives!

 

Grumpy,  your back!  Maybe you can solve some things.

 

First,  is there any way to make xbmc be it xbmcubuntu or just xbmc on any Linux run without passing through a video card? I read a ton saying do this this and this with screen,  but never got it working.

 

I tried with a super old Matrox card,  but that led to high cpu issues because lack of drivers I assume.  And lastly,  if I do add a modern pcie card,  on board is disabled and I cannot pass it through.

 

Leaving the last option of either running xbmc standalone on different hardware or directly from dom0.  It is only for audio duties,  so I am not asking a lot of the system regardless of where I put it.

 

Looking forward to hearing your ideas

Link to comment

He lives!

 

Grumpy,  your back!  Maybe you can solve some things.

 

First,  is there any way to make xbmc be it xbmcubuntu or just xbmc on any Linux run without passing through a video card? I read a ton saying do this this and this with screen,  but never got it working.

 

I tried with a super old Matrox card,  but that led to high cpu issues because lack of drivers I assume.  And lastly,  if I do add a modern pcie card,  on board is disabled and I cannot pass it through.

 

Leaving the last option of either running xbmc standalone on different hardware or directly from dom0.  It is only for audio duties,  so I am not asking a lot of the system regardless of where I put it.

 

Looking forward to hearing your ideas

 

Raspbmc. It's come a LONG way.

Link to comment

First,  is there any way to make xbmc be it xbmcubuntu or just xbmc on any Linux run without passing through a video card? I read a ton saying do this this and this with screen,  but never got it working.

Do you mean having XBMC run on unRAID itself?

 

Leaving the last option of either running xbmc standalone on different hardware or directly from dom0.  It is only for audio duties,  so I am not asking a lot of the system regardless of where I put it.

If you are using XBMC in a VM utilizing Video Hardware Acceleration... XBMC will only consume about 5% - 12% (depending on your CPU) of your overall total CPU utilization.

 

If you have unRAID, a VM with all the various tools running (sabNZBD, Sickbeard, CouchPotato, Deluge, HTPC Manager, etc.)  and 2 XBMC VMs with Video Hardware Acceleration all running at the same time you are talking about 15% - 25% (depending on your CPU).

 

Right now I have to hack the crap out of the unRAID Kernel, Xen and the VM Kernel to get it XBMC working with Video Hardware Acceleration in XBMC Gotham. If the Video Card is AMD or Nvidia there are further things you might have to do.

 

Linux Kernel 3.15 should be out in the next day or two and all the various hacks needed are included in and once Lime Technology posts the latest unRAID 6 Beta with Xen 4.4 and Linux Kernel 3.14.5 or 3.15... I will be able to determine what it will take to create a unRAID XBMC VM Appliance. Since I am slammed at work I will let Ironicbager know what needs to be done and hopefully he will create a XBMC Appliance for you all.

 

Ironic is a young guy in school and maintaining VM Appliances and hosting them takes a lot of time and actually costs him money. Hopefully the unRAID Community will click on Ironic's donate link and continue to make donations. It's going to keep him engaged and will continue to make / maintain VM appliances. With unRAID moving towards KVM, we will want him to create those too.

Link to comment

I never went to unraid 6.

 

I still maintain unraid 5.x.

 

My setup otherwise sits on Arch with xen 4.4, so not sure that makes life any easier for us.

 

I understand we are in the unraid forums still, but it is where I started and the appliances can still relate...  If you think it is better to take things offline and you have a fix for where I am at, let me know, shoot me a pm or post it here.

 

Not sure if my setup also relies on the new kernel, but if this can be done, I would love to make it happen.  But before going any further we should also confirm if I need to have a dedicated video card passed through or not.  I hope not as it seems worthless and potentially no possible on my system as it sits today as the mobo disabled onboard when pci-e is detected...

 

Link to comment

 

99% of the people running XBMC in a VM in this forum are not running it with the PV drivers (XBMCuntu does not have these in their image) or using Video Hardware Acceleration. I suspect you are not either.

 

When you goto System Info on the XBMC and look at the Video Information what Drivers is it showing?

 

 

When you make this comment, do you mean this is what we need?

 

Using Xen Project PVHVM drivers with Ubuntu HVM guests

At least Ubuntu 11.10 does NOT include xen platform PCI driver as built-in to the kernel, so if you want to use Xen Project PVHVM drivers you need to add "xen-platform-pci" driver in addition to "xen-blkfront" to the initramfs image. Note that the Xen platform PCI driver is required for Xen Project PVHVM to work.

Using Xen PVHVM drivers with Ubuntu 11.10:

    Add "xen-platform-pci" to file "/etc/initramfs-tools/modules".  (in domu)
    Re-generate the kernel initramfs image with: "update-initramfs -u". (in domu)
    Make sure "/etc/fstab" is mounting partitions based on Label or UUID. Names of the disk devices will change when using PVHVM drivers (from sd* to xvd*). This doesn't affect LVM volumes. (in domu)
    Set "xen_platform_pci=1" in "/etc/xen/<ubuntu>" configfile in dom0.
    Start the Ubuntu VM and verify it's using PVHVM drivers (see above). 

 

I added (in domu) for clarification purposes.

Link to comment

When you make this comment, do you mean this is what we need?

 

Using Xen Project PVHVM drivers with Ubuntu HVM guests

At least Ubuntu 11.10 does NOT include xen platform PCI driver as built-in to the kernel, so if you want to use Xen Project PVHVM drivers you need to add "xen-platform-pci" driver in addition to "xen-blkfront" to the initramfs image. Note that the Xen platform PCI driver is required for Xen Project PVHVM to work.

Using Xen PVHVM drivers with Ubuntu 11.10:

    Add "xen-platform-pci" to file "/etc/initramfs-tools/modules".  (in domu)
    Re-generate the kernel initramfs image with: "update-initramfs -u". (in domu)
    Make sure "/etc/fstab" is mounting partitions based on Label or UUID. Names of the disk devices will change when using PVHVM drivers (from sd* to xvd*). This doesn't affect LVM volumes. (in domu)
    Set "xen_platform_pci=1" in "/etc/xen/<ubuntu>" configfile in dom0.
    Start the Ubuntu VM and verify it's using PVHVM drivers (see above). 

 

Right. Most people who load a Ubuntu VM are running it in HVM mode and not PV. (XBMCuntu has the same issue unless you hack it)

 

I am not an Ubuntu type of guy but the above should work to make it all PV. It's best to just use the Xen PV install that Ubuntu provides (which most people ae unaware of) to install it correctly out of the gate.

 

To download the Xen-Netinstaller for your Ubuntu VM

 

wget http://mirrors.liquidweb.com/ubuntu/dists/trusty/main/installer-amd64/20101020ubuntu318/images/netboot/xen/initrd.gz

 

and

 

wget http://mirrors.liquidweb.com/ubuntu/dists/trusty/main/installer-amd64/20101020ubuntu318/images/netboot/xen/vmlinuz

 

In your Ubuntu-Installer.cfg for your VM:

 

name = "ubuntu" # <---- Change to suit your needs

memory = 256 # <--- Change to suit your needs

disk = ['file:/mnt/cache/VMs/ubuntu/ubuntu.img,xvda,w'] # <---- (Change path and see other cfg files in the forum if you need help)
vif = [' '] # <--- Whatever your network is (see other cfg files in the forum if you need help)

kernel = "/mnt/cache/VMs/images/ubuntu-netboot/vmlinuz" # <--- Change to the correct path location
ramdisk = "/mnt/cache/VMs/images/ubuntu-netboot/initrd.gz" # <--- Change to the correct path location
extra = "debian-installer/exit/always_halt=true -- console=hvc0" # <--- Change to the correct path location

 

After you have installed it use a normal Ubuntu.cfg:

 

name = "ubuntu" <--- Change to suit your needs

memory = 256 <--- Change to suit your needs

disk = ['file:/mnt/cache/VMs/ubuntu/ubuntu.img,xvda,w'] # <---- (Change path and see other cfg files in the forum if you need help)
vif = [' '] # <--- Whatever your network is (see other cfg files in the forum if you need help)

bootloader = "pygrub"

# See the forum about what else to include in here.

Link to comment

Isn't raspbmc for the raspberry pi? Or can it be installed anywhere?

 

Sent from my XT1060 using Tapatalk

Yes it is. It's now my main media centre and works flawlessly.

 

How is overall performance? I was doing some reading and read some claims of lag.  Does it lag at all browsing menus or stutter during movie playback?

 

What content are you playing? Bluray rips or TV shows?  I know the source and format can also impact playback.

 

Sent from my XT1060 using Tapatalk

 

 

Link to comment
  • 3 weeks later...

Good evening all,

 

I am writing this post with a view toward winding up my active involvement in the maintenance of the Xen / KVM / repo images and projects I've been running since January. There are numerous reason for this, some of them personal which I won't bore you with but others are more publishable.

 

With the roadmap published by Limetech this week it is quite clear to me that headless Linux VMs, such my ArchVM, are not long for this world. Docker is the future for LT it seems, I'm not fully convinced yet but maybe I'll be proven wrong. Also, with the talk of potentially dropping Xen and the flip flopping over support various hypervisors I've decided to just call it quits as it takes up too much of my time to keep up with all the changes. I'm in the middle of writing a dissertation and am therefore a little pushed for time. Lately, and by that I mean the last 3-4 months, donations have all but dried up (bar the odd generous $5 here and there, thank you to those who did donate) yet my bandwidth usage is getting higher and higher, it approached 300gb last month. This is not sustainable or fair. As previously mentioned I am an MSc student and here in the UK we get no funding from the government so have to pay our own way and the few ££ a month matter.

 

I'm also just a little bored of what unRAID has to offer. It is rather behind the times, admittedly better lately, but I'm seeing much, much better performance with AUFS and SnapRAID on a proper Linux distro base OS (not this Slackware crap). I enjoy being able to type 'package-manger install package' far more than what unRAID has to offer. I've been an unRAID user for 3+ years and know so much more now than I did when I setup my unRAID system, so if you like my training wheels are coming off.

 

So in summary, I'm not going away or deleting my account or posts or anything but I will with immediate effect stop maintaining my ArchVM images (both Xen and KVM) and the ArchVMrepo. With that said, I use the archVMrepo for friends and family so you may get lucky and piggy back of that for a while but it will go away one day.

 

I wish LT all the best and all that.

 

Ciao for now.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.