Author Topic: capture cards and "virtual" core  (Read 1539 times)

MarcoZan

  • Veteran
  • ***
  • Posts: 148
    • View Profile
capture cards and "virtual" core
« on: July 20, 2010, 08:39:29 am »
Hi all
I'm in the process of rethinking my LMCE rig, and I'm seriously considering to virtualize my core.
While doing this I'm also considering to extend my LMCE with some video surveillance capabilities, and this leads to the need of having an analog capture card installed on the core.

I'm definitely not a virtualization expert, but googling around I've read that PCI passtrhough isn't exactly a breeze and also basically needs ESXI, that is quite out of my reach (I was instead thinking about having a host with a 64 bit Lucid and run core with virtualbox/vmware player).

Is there anyone that can give me some suggestion on this topic?

TIA
Marco

valent

  • Guru
  • ****
  • Posts: 380
    • View Profile
    • /kernel_reloaded/
Re: capture cards and "virtual" core
« Reply #1 on: July 20, 2010, 10:14:03 am »
If you want virtualization and have no experience better stay out of it, it is pretty hard to get PCI cards to work in virtual environment, I have heard that only XEN virtualization does this properly, but you need to learn a lot about XEN before you go that route.

If you use VirtualBox it is no problem if you use ZWave usb dongle to control your ZWave devices, but I don't think that other high bandwidth devices like TV tuners would work under virtualization, but you can try and report back.

I would use virtual Core only for demonstration not for real work.
« Last Edit: July 21, 2010, 10:17:57 am by valent »
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent

Randall

  • Regular Poster
  • **
  • Posts: 32
    • View Profile
Re: capture cards and "virtual" core
« Reply #2 on: July 20, 2010, 04:03:30 pm »
I've been planning to set up a virtualized core as I have a small place and really only have space for one server.  At the same time, I want a dedicated vpn/ssh/mail/web/general-use server as well as a linuxMCE for home automation. 

PCI pass-through for video cards and capture cards is not supported in ESXi and (I gather) unlikely to ever be supported as it is not a capability needed in enterprise environments. It is the same reason that you won't find driver support for cheaper realtek nic cards.  Best to check your existing HW with the official supported list before you get too far into it.  ESXi 4.1 adds support for USB passthrough which should make it possible to keep zwave dongles and USB-serial converters attached to the core. For video, I think the solution is to go with a network device, HD HomeRun and avoid PCI passthrough entirely.

As for whether this machine is suitable for 'production' I think it will work quite well, but time will tell.  It is certainly very easy to backup and abstract virtual machines away from their hardware (which is very nice) as it means that down-time due to a core failure can be minimized.  ESXi allows me to allocate resources with a fair amount of flexibility and 4-8 core machines with 4-8GB of RAM are not particularly expensive these days (my current server is a quad-core, has 8 GB of RAM and 2 onboard NICs).  Network telephone/SIP, video, and RS232 appliances are all readily available and comparable in price to their PCI counterparts. 
« Last Edit: July 20, 2010, 04:18:13 pm by Randall »

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: capture cards and "virtual" core
« Reply #3 on: July 20, 2010, 04:53:52 pm »
If you want virtualization and have no experience better stay out of it, it is pretty hard to get PCI cards to work in virtual environment, I have heard that only ZEN virtualization does this properly, but you need to learn a lot about ZEN before you go that route.

If you use VirtualBox it is no problem if you use ZWave usb dongle to control your ZWave devices, but I don't think that other high bandwidth devices like TV tuners would work under virtualization, but you can try and report back.

I would use virtual Core only for demonstration not for real work.
I'm not sure what you mean with ZEN but e.g. XEN and KVM support passthrough and are free (as in speech and in beer).

br Hari
rock your home - http://www.agocontrol.com home automation

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
Re: capture cards and "virtual" core
« Reply #4 on: July 20, 2010, 06:36:11 pm »
FYI, I've been using ESXI for a while but not with LMCE because till now VMware didn't solve the problem with the USB ports to be utilize by the VM.
Cheers |[BEER]
Charlie,

daballiemo

  • Guru
  • ****
  • Posts: 244
  • Full Blown Addict
    • View Profile
Re: capture cards and "virtual" core
« Reply #5 on: July 20, 2010, 08:35:01 pm »
Been there, done it and still up and running happy.

see http://wiki.linuxmce.org/index.php/Installing_LinuxMCE_on_Virtual_Machine_via_KVM

current setup includes 1*PVR150, 1* PVR500 and ZWAVE via USB. Soundcard is also redirected to virt machine and is used by an active speaker system.

any questions are welcome.

I should add that when performing an update to Lucid I really got into trouble. I did rebuild the system based on 9.10 but with kernel 2.6.32 because they where the notes I had lying around. 2.6.32 does not bring you into the situation where you have to patch the kernel. Rest is more or less the same.

owh, and using this system as a hybrid is impossible. Mine is located under my hallway floor and acts solely as a core, webserver, fileserver, etc ;-)

rgds

Han
« Last Edit: July 20, 2010, 08:55:31 pm by daballiemo »
HP N40L12.04 KVM with virt LCME8.10/10.04
MD: FoxConn NetBox 330I - Samsung LE 26 (1360* 768)
MD: M2NPV-VM dual core AMD 64/3800/2Gb/NV6150 - Samsung UE 55 C8700 (full hd, 3d)
MD: FoxConn NetBox 330I - LG 32ld350

valent

  • Guru
  • ****
  • Posts: 380
    • View Profile
    • /kernel_reloaded/
Re: capture cards and "virtual" core
« Reply #6 on: July 21, 2010, 10:18:34 am »
If you want virtualization and have no experience better stay out of it, it is pretty hard to get PCI cards to work in virtual environment, I have heard that only ZEN virtualization does this properly, but you need to learn a lot about ZEN before you go that route.

If you use VirtualBox it is no problem if you use ZWave usb dongle to control your ZWave devices, but I don't think that other high bandwidth devices like TV tuners would work under virtualization, but you can try and report back.

I would use virtual Core only for demonstration not for real work.
I'm not sure what you mean with ZEN but e.g. XEN and KVM support passthrough and are free (as in speech and in beer).

br Hari

Sorry I ment XEN not ZEN.
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent

valent

  • Guru
  • ****
  • Posts: 380
    • View Profile
    • /kernel_reloaded/
Re: capture cards and "virtual" core
« Reply #7 on: July 21, 2010, 10:20:58 am »
Been there, done it and still up and running happy.

see http://wiki.linuxmce.org/index.php/Installing_LinuxMCE_on_Virtual_Machine_via_KVM

current setup includes 1*PVR150, 1* PVR500 and ZWAVE via USB. Soundcard is also redirected to virt machine and is used by an active speaker system.

any questions are welcome.

I should add that when performing an update to Lucid I really got into trouble. I did rebuild the system based on 9.10 but with kernel 2.6.32 because they where the notes I had lying around. 2.6.32 does not bring you into the situation where you have to patch the kernel. Rest is more or less the same.

owh, and using this system as a hybrid is impossible. Mine is located under my hallway floor and acts solely as a core, webserver, fileserver, etc ;-)

rgds

Han

I have mine running in VirtualBox but now KVM is next to do on my list, thanks for your feedback.
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent

MarcoZan

  • Veteran
  • ***
  • Posts: 148
    • View Profile
Re: capture cards and "virtual" core
« Reply #8 on: July 22, 2010, 08:30:34 am »
Thanks guys very much for your replies.
You gave me some useful pointers to start to dig from.

I already read about daballiemo experience about KVM, but the problem is that my core is equipped with an Athlon 64 X2 dual core (939 socket) that don't support AMD-V.
So unless I'm missing some important bits KVM is not an option, because as budget is pretty tight I'd prefer to avoid any major expenses for core, and rather destinate money for extending my LinuxMCE actual capabilities.

I started to read about XEN, that seems to support PCI-passthru without AMD-V or any special hw requirement. If anyone can give me some hint on this, I'd really appreciate.

As I'm writing I'm downloading XEN LiveCd, so I will give it a real try and maybe report back here.

@daballiemo: just out of curiosity: why are you saying that your core is impossible to use as hybrid? Is it just because it is lying on a inaccessible site, or is it because KVM installation does not allow it?

Thanks again to all
Regards
Marco

« Last Edit: July 22, 2010, 08:49:49 am by MarcoZan »

daballiemo

  • Guru
  • ****
  • Posts: 244
  • Full Blown Addict
    • View Profile
Re: capture cards and "virtual" core
« Reply #9 on: July 22, 2010, 04:13:21 pm »
Marcozan,

because KVM does not allow for extensive video capabilities. Virtualizing a graphics cards is "still"  not possible. I've tried and ended up with breaking my setup completely.
For KVM to be able to virtualize hardware you will need to use a special motherboard that supports VT-D (and this is not the same as VT-X).
Have been down the Xen way but never got it to work with anything else besides a NIC. For this and the uncertainty about Xen's future and being part of the Linux kernel decided to go for KVM.
HP N40L12.04 KVM with virt LCME8.10/10.04
MD: FoxConn NetBox 330I - Samsung LE 26 (1360* 768)
MD: M2NPV-VM dual core AMD 64/3800/2Gb/NV6150 - Samsung UE 55 C8700 (full hd, 3d)
MD: FoxConn NetBox 330I - LG 32ld350

valent

  • Guru
  • ****
  • Posts: 380
    • View Profile
    • /kernel_reloaded/
Re: capture cards and "virtual" core
« Reply #10 on: July 23, 2010, 08:39:07 am »
MarcoZan please keep us posted on your progress with XEN, and also if you need help I can help you start writing XEN + lmce Wiki page.
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent