Project

General

Profile

VMware - TVHeadend - Freeze and server crash

Added by Thomas Francis over 11 years ago

Hi

I am relatively inexperienced when it comes to Linux but can normally get by for basic stuff. I used to run TVHeadend on my old Synology box which worked fine. I recently bought an HP micro server and put ESXI on it to run some VM’s. One of these VM’s is Ubuntu Server.

OS/Kernal: Ubuntu Server 13.04 x64/ 3.8.0-27-generic
TVHeadend Version: Tvheadend 3.4
Hardware: HP Microserver N54L
ESXI Version: 5.1
USB DVB-T: PCTV Systems DVB-T2 290e nanoStick
XBMC: Frodo 12.2 (install on OSX Mountain Lion - 10.8.4 - mac mini)

My process:

Setup VM in ESXI:
---------------------------
2 GB RAM
20 GB HD
1 Processor
Added a USB Controller
Added USB device - 3.8.0-27-generic

Install Ubuntu
--------------------
Set IP address and DNS: sudo nano /etc/network/interfaces
Install Open ssh: sudo apt-get install openssh-server openssh-client
Install VMware tools

Install TVHeadend
-----------------
Used this guide: https://tvheadend.org/projects/tvheadend/wiki/AptRepository,
Installs Fine

Log into TVheadend with browser
Select adapter
Add muxes using location - UK Crystal Palace
Services found
Map to channels.
Add allowed clients to stream to

XBMC
-----
Enable TVHeadend client and configure
Enable live TV

I then select a channel. Initially a picture/audio is displayed but then the picture freezes. If I then click stop and chose another channel, nothing displays and I get an error in XBMC that there is no connection to TVHeadend. If I check the syslogs in Ubuntu I eventually see the following:

Task TVHeadend Blocked for more than 120 seconds
Echo 0 > /proc/sys/kernel/hung_task_timeout_secs

I then try and reboot Ubuntu gracefully but end up having to turn off /on using ESXI. Im pretty sure its Ubuntu/USB related but wondering if anyone with a similar setup can comment on success/failures or advice.

I will grab some proper event logs when I get home tonight as I am currently in the office

Thanks for reading this :)


Replies (6)

RE: VMware - TVHeadend - Freeze and server crash - Added by Greg Moeller over 11 years ago

First thing I'd suggest is watching the console messages from an esx console. (if your linux does X, I think console 5 or 6 might be the console messages, you'll have to experiment with that)
If you can see what causes the linux to go boom, might have a chance at sorting out the next level down.

RE: VMware - TVHeadend - Freeze and server crash - Added by Anonymous over 11 years ago

Can you post (via pastebin or similar) the content of dmesg and /var/log/syslog? What exact version of ESXi are you running (inc. build number)?

I spent a great deal of time trying to get a VM on ESXi (5.0 & 5.1) to run TVH using a variety of Ubuntu setups (never with a GUI). The short version of my experience is that I now run Ubuntu natively on a HP MicroServer.

TVH does not deal well with an input device disappearing. I would suspect that the USB device becomes disconnected from the VM and TVH stops working.

Different people have different experiences of USB passthrough with ESXi. I was able to get it to work using a fairly high spec server with VT-d support, fast processor, etc. What I was not able to do was get TVH to work reliably (by which I mean for more than a few days without requiring a restart).

I tried using a variety of add in PCI & PCIe USB cards both by USB and VT-d passthrough to the VM. This proved very unreliable.

The PCTV Systems DVB-T2 290e generally worked well if it worked at all after the VM booted. I did ensure that the TVH VM had high priority for all resources and ring fenced things like memory. Beyond that there was nothing I did beyond using ESXi to passthough the device to the VM. I did find that I had to cold boot devices (power off VM / disconnect & reconnect USB device physically / power on VM) quite often. dmesg should show messages about the card being setup. If you can see the card in TVH then that part has probably worked OK. The next bit comes down to whether you get lucky with the hardware and the specific version of ESXi you're running. There are no supported configurations!

I would honestly suggest giving up and moving to a physical setup. I think I spent well over six months trying with ESXi and now I run a physical backend media server with a very large ZFS backed storage system with a reliable TVH installation using a mix of DVB-T / DVB-T2 / DVB-S2 USB inputs. It just works...

You could always then try Zen / KVM to run some VMs.

RE: VMware - TVHeadend - Freeze and server crash - Added by Greg Moeller over 11 years ago

While not tvheadend, I've had good luck with ESXi and mythTV.
I'm using an HDhomerun for OTA and a Hauppauge HD PVR for Sat TV and have had no issues
since May of this year. Hasn't had huge load (2 programs at once every day.)
The 'server' isn't much of anything, just a generic PC with intel CPU. (so I can run Mac OS VMs)
Never had an issue with the HDPVR vanishing from the USB bus, just seems to work.

RE: VMware - TVHeadend - Freeze and server crash - Added by Anonymous over 11 years ago

I've not used either of those devices but neither of them is a USB DVB tuner is it?

Using a HDHomeRun with a VM avoids any USB connectivity and might be a good option for some; not sure how TVH plays with one though.

Does HDPVR present as a tuner in Ubuntu which TVH could use?

RE: VMware - TVHeadend - Freeze and server crash - Added by Greg Moeller over 11 years ago

The HDPVR is a USB video capture card(box?)
It captures from component, up to 1080i so throws a fair bit of bandwidth down the USB bus.
No, not a tuner to mythTV, just capture with an external script to change channels on the Sat receiver (IR blaster using lircd)
The HDhomerun works nice with tvheadend, I've got that working now, have been looking at tvheadend as a simpler solution over mythTV. (but haven't gotten word yet that the HDPVR works with TVheadend, it doesn't see it though)

RE: VMware - TVHeadend - Freeze and server crash - Added by Thomas Francis over 11 years ago

Thanks Jon Boy

I think I have been slowly coming to this conclusion also and think its sound advice. The reason I want to stay with ESXI is that I work in IT and its good to have a home 'lab' for messing around with stuff. But as this is in 'production' for my home set-up I need something that is going to work reliably.

I will install Ubuntu Server and install Virtual Box Headless for my VM's that I need. That way like you said, TVHeadend and the DVB-T USB stick can run on the physical hardware instead of through a VM. Hopefully this will sort everything out. I'm hoping to do this, this weekend but will have to plan it around the Mrs being out of the house ;)

I will let you know how I get on - Appreciate you sharing your experiencing and saving me allot of time

    (1-6/6)