[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-API] Fwd: Attach CD or Removable Devices
2012/12/9 Gizmo Chicken <gizmochicken@xxxxxxxxx>: > Paul, > > I'm not sure about the PCI passthrough tutorial, but I hope that what I > provide below will be of some help. > > First, if I recall correctly, you'll need to add "iommu=1" into the Xen > commandline. If using grub, you can edit your /etc/default/grub file as > root and to include at least the following or similar: > > GRUB_CMDLINE_XEN="iommu=1" > > > As for xe commands, the PCI passthrough command in xe takes the following > form: > > xe vm-param-set other-config:pci=0/<pci-id#> uuid=<uuid> > > > Or if you want to passthrough multiple PCI devices (or a multifunction > device), the PCI passthrough command in xe takes the following form: > > xe vm-param-set > other-config:pci=0/<pci-id#>,1/<pci-id#>,2/<pci-id#>,3/<pci-id#>,4/<pci-id#> > uuid=<uuid> > > > You'll need to replace <pci-id#> and <uuid> with appropriate values. > > Here's an example showing the xe command for the passthrough of 2 PCI > devices: > > xe vm-param-set other-config:pci=0/0000:00:1d.0,1/0000:00:1d.1 > uuid=d6eb559e-af70-6f8e-d10f-62fc9f73db89 > > > Of course, the your values for <pci-id#> and <uuid> will differ from the > above example. > > DISCLAIMER: Although I hope to set up PCI passthrough on an XCP system in > the near future, as of now, I have only configured PCI passthrough on a > system that runs vanilla Xen. So the above is based mostly on what I have > gleaned from forum posts and replies, not on my own personal experience. > > I invite others who know more about PCI passthrough to correct/clarify any > of the above. > > Best regards, > GizmoChicken > > > > > On Sat, Dec 8, 2012 at 9:20 AM, Paul Pridt <p.pridt@xxxxxxxxx> wrote: >> >> Hi, >> first let me thank for your replies. >> Further to your notes I did some investigation and tests, but was not >> successful. >> I am fairly familiar on pci-passthrough in xm or xl toolstack. >> I assigned the adapter in question to pciback, entered the other-config >> parameters and started the vm, but the vm did not see the drive. >> Looking at the tutorial on XCP_Ubuntu_PCIPassthrough I found that the >> author references the xl command which is not available when you install the >> cp-xapi in Ubuntu and set the toolstack to xapi. Both xe and xl commands are >> available in XCP-Server, but there the udev SRs work anyway. >> >> I also tried to create the udev SR: >> xe sr-create content-type=disk name-label=”Removable storage” type=udev >> device-config:location=/dev/xapi/block >> The answer was: >> The SR could not be connected because the driver was not recognised. >> driver: udev >> It seems that there is some task needed that creates /dev/xapi/block .. >> I think if I were successful on the latter task I could create the vdi >> manually and attach it to the vm. >> I will furter investigate ... >> >> Regards >> Paul >> >> Am 07.12.2012 16:45, schrieb Gizmo Chicken: >> >> Grant, >> >> >> I had nearly finished drafting my reply to Paul when I noticed your reply. >> >> As mentioned in my reply to Paul, I suspect that what Paul wants to do >> (passthrough a USB device) could be accomplished via PCI passthrough (of an >> entire USB controller) to an HVM guest. Does that sound right? >> >> As I also mentioned in my reply to Paul, another poster (Donald van der >> Wurf) attempted to adapt a tutorial found at >> http://wiki.xen.org/wiki/XCP_Ubuntu_PCIPassthrough to his goal of >> configuring PCI passthrough to an HVM guest in XCP. However, the original >> poster wasn't successful, and so sought help from the group. >> >> Your technical knowledge is clearly way beyond mine. If you feel that it >> would be possible to configure PCI passthrough to an HVM guest in XCP, would >> you consider creating a brief tutorial, or possibly extending the above >> mentioned tutorial, to describe the procedure? >> >> Any help from you (or others) would be greatly appreciated. >> >> Best regards, >> GizmoChicken >> >> >> >> ---------- Forwarded message ---------- >> From: Gizmo Chicken <gizmochicken@xxxxxxxxx> >> Date: Fri, Dec 7, 2012 at 10:00 AM >> Subject: Re: [Xen-API] Attach CD or Removable Devices >> To: Paul Pridt <p.pridt@xxxxxxxxx> >> Cc: xen-api@xxxxxxxxxxxxx >> >> >> 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=="add", PROGRAM!="/opt/xensource/libexec/check-device-sharing %k", >>> GOTO="end_xapi" >>> >>> ACTION=="add", SYMLINK+="xapi/block/%k" >>> >>> ACTION=="add", RUN+="/bin/sh -c >>> '/opt/xensource/libexec/local-device-change %k 2>&1 >/dev/null&'" >>> ACTION=="remove", 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. >>> Hello everyone I eh followed this tutorial http://www.leandrocaetano.info/site/making-a-tape-drive-available-to-a-guest-via-scsi-on-xen/ http://support.citrix.com/article/CTX128426 When restarting the computer nothing happens Best regards Ricardo _______________________________________________ Xen-api mailing list Xen-api@xxxxxxxxxxxxx http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |