[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] Attach CD or Removable Devices



Paul,

I suspect that what you want to do could be accomplished via PCI passthrough to an HVM guest, which is the subject of a thread having the subject "[Xen-API] XCP PCI Passthrough on HVM how to?" that was started a few weeks ago.  So you might want to follow (and perhaps join in) that thread.

Without repeating the entirety of the above mentioned thread, I'll note that the original poster referenced a tutorial found at http://wiki.xen.org/wiki/XCP_Ubuntu_PCIPassthrough addressing PCI passthrough to a PV guest in XCP.  However, the original poster wasn't able to adapt that tutorial to his goal of configuring PCI passthrough to an HVM guest in XCP, and so sought help from the group.

Unlike the situation with the XAPI toolstack, the procedure for configuring PCI passthrough to an HVM guest is relatively straightforward with Xen when using the default toolstack.  For a discussion of both VGA and PCI passthrough in Xen when using the default toolstack, see http://forums.linuxmint.com/viewtopic.php?f=42&t=112013

So if you don't mind leaving behind the comforts of XenCenter for something like Virtual Machine Manager (virt-manager), maybe Xen and its default toolstack is a better option for you.

I wish that I could be of more help.

Best regards,
GizmoChicken

P.S. I'm currently using Xen (and Virtual Machine Manager), but I would switch to XCP (and XenCenter) if I could get PCI passthough working in XCP.  In such a case, I would passthrough nearly all of my USB controllers, along with a second PCI video card, to an HVM guest running Ubuntu desktop.  That way I could have, on a single machine, both a stable XCP server (which I could leave up 24/7 to host my virtual servers) and also local access to virtual machine having fully functional desktop (which I could shut down when not in use).  I imagine that many would apprciate such functionality in XCP, so let's hope that the developers consider adding such a feature to future releases of XCP if not already possible via xe command line.


On Fri, Dec 7, 2012 at 9:50 AM, Grant McWilliams <grantmasterflash@xxxxxxxxx> wrote:

On Fri, Dec 7, 2012 at 3:18 AM, Paul Pridt <p.pridt@xxxxxxxxx> wrote:
Hi,
I am looking for a way to attach a physical CD drive or a USB-attached hard drive to a VM.
I know that Citrix Xenserver does that through special udev-SRs. There you even can attach an internal hard drive with the help of an udev rule that creates the vdi.
Has anybody a running solution?
My system is Ubuntu 12.04 with xcp-xapi.

--
Regards,
Paul

What is it exactly you're trying to accomplish? I'd start by checking /etc/udev/rules.d/58-xapi.rules for events and check the scripts that it runs. 

58-xapi.rules
# Skip devices which fail the local sharing check (to filter out root/mounted devices)
ACTION="" PROGRAM!="/opt/xensource/libexec/check-device-sharing %k", GOTO="end_xapi"

ACTION="" SYMLINK+="xapi/block/%k"

ACTION="" RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1 >/dev/null&'"
ACTION="" RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1 >/dev/null&'"


Part of /opt/xensource/libexec/local-device-change

 for SR in `xe sr-list type=udev sm-config:type=block uuid=${LOCAL_SR} params=uuid --minimal`
      do
        xe vdi-introduce uuid=`uuidgen` sr-uuid=${SR} type=user location=/dev/xapi/block/${DEVICE}
 done


Read the whole scripts of course but this might get you started.

_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.