
GizmoChicken wrote:@powerhouse:
You wrote the bulk of your original tutorial based on your experiences with Xen 4.1 which, if I'm not mistaken, uses xm/xend as its default toolstack. Have you tried configuring VGA/PCI passthrough with Xen 4.2, which uses xl as its default toolstack? If so, were any modifications to your original tutorial needed?
P.S. Just another "Thanks!" for such a great tutorial. And I agree with your choice not to open new threads, but rather to post updates to the same thread. Much better to keep all the info in one thread.

powerhouse wrote:I downloaded the 4.2 hypervisor and compiled it. Eventually after 2 trials it didn't complain. However, I gave up when I didn't succeed in inserting the graphics card BIOS, a procedure that is needed for Nvidia cards that don't have native passthrough capability (the majority of Nvidia cards). So, I can't really speak about the new xl toolstack.
powerhouse wrote:By the way, did you manage to make it work?
powerhouse wrote:Yeah, thanks. But I will have to abide the admins.

GizmoChicken wrote:Yes, I briefly tested my AMD 6670 using VGA-passthrough with an HVM domU, and it worked great following your tutorial. Thanks!
For now, however, my only graphical desktop is dom0, with all my guests being non-graphical servers and so without any need for VGA-passthrough. But I'm currently trying to figure out how to configure PCI-passthrough with a domU hosted on an XCP server. (XCP provides a user-friendly means for GPU-passthrough, but curiously, requires extensive tweaking to get PCI-passthrough working.)
If I can get PCI passthough working in XCP, I will passthrough nearly all of my USB controllers, along with a second PCI video card, to an HVM guest running Ubuntu desktop. That way, I'll 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 a virtual machine having a fully functional desktop (which I could shut down when not in use).
Although XCP uses the xe toolstack, which is very different from the xl/xm toolstack, your tutorial has been immensely helpful in bringing me up to speed with PCI-passthrough concepts. Thanks again!
And if I can't get PCI passthough working in XCP, I'll eventually rebuild my system using a server based (non-graphical) distribution for dom0 and then move my only desktop to a domU, in which case, I'm sure I'll be relying heavily on your tutorial again in the future.powerhouse wrote:Yeah, thanks. But I will have to abide the admins.
Have you considered submitting your tutorial to the HowTo section of the Xen wiki?

#!/bin/sh
if xm list | grep -q win7; then
espeak "windows is already running" 2> /dev/null
exit 1
else
xm create /etc/xen/win7.cfg &> /dev/null
espeak "starting windows, please wait" 2> /dev/null
exit 0
fi
Could not read keymap file: '/usr/share/qemu/keymaps/en-us
sudo ln -s /usr/share/qemu-linaro/qemu/ /usr/share/qemusudo xm pci-list-assignable-devicesError: pci: PCI Backend and pci-stub don't own device 0000:03:00.0
sudo /etc/init.d/pciback enable
Nesousx wrote:
- Code: Select all
sudo ln -s /usr/share/qemu-linaro/qemu/ /usr/share/qemu
Nesousx wrote:So my Windows 7 booted without any issue, installation and PCI passthrough worked (score of 7.1).
However, I now have a problem I can't seem to fix.
I no longer can passthrough my devices.
It seems that the 3 devices I used to passthrough are no longer available: the following command returns nothing:
- Code: Select all
sudo xm pci-list-assignable-devices
I didn't do any hardware change.
I can't find where those devices are used or attached... and I can't find anyway to release them.. Now when I want to run the HVM, I have the following error:Error: pci: PCI Backend and pci-stub don't own device 0000:03:00.0
This ID corresponds to the HD7850 card (part without audio, and the 1st entry to passhtrough listed in my /etc/xen/win7.cfg).
What I did before I broke it:
1. I shutdown Windows 7 via the Start Menu > Shutdown.
2. Tried to use my Radeon as primary card under Linux and Windows HVM. So I installed AMD Drivers. I had the baclscreen after login you were talking about.. Couldn't figure out how to get through it, so I switched back to the Intel card for Linux and AMD for Windows HVM and removed the ATI Drivers. Since then it is broke.
What I find weird is that I also "lost" the PCI device that hosts the USB port... So i might not be related to the AMD Drivers screwing up something...
Any help would be grealty appreciated.
lspci -v | grep -A 10 VGAblacklist name-of-driver-you-got-from-lspci
powerhouse wrote:Nesousx wrote:
- Code: Select all
sudo ln -s /usr/share/qemu-linaro/qemu/ /usr/share/qemu
Thanks for this input - I'll update my how-to!Nesousx wrote:So my Windows 7 booted without any issue, installation and PCI passthrough worked (score of 7.1).
However, I now have a problem I can't seem to fix.
I no longer can passthrough my devices.
It seems that the 3 devices I used to passthrough are no longer available: the following command returns nothing:
- Code: Select all
sudo xm pci-list-assignable-devices
I didn't do any hardware change.
I can't find where those devices are used or attached... and I can't find anyway to release them.. Now when I want to run the HVM, I have the following error:Error: pci: PCI Backend and pci-stub don't own device 0000:03:00.0
This ID corresponds to the HD7850 card (part without audio, and the 1st entry to passhtrough listed in my /etc/xen/win7.cfg).
What I did before I broke it:
1. I shutdown Windows 7 via the Start Menu > Shutdown.
2. Tried to use my Radeon as primary card under Linux and Windows HVM. So I installed AMD Drivers. I had the baclscreen after login you were talking about.. Couldn't figure out how to get through it, so I switched back to the Intel card for Linux and AMD for Windows HVM and removed the ATI Drivers. Since then it is broke.
What I find weird is that I also "lost" the PCI device that hosts the USB port... So i might not be related to the AMD Drivers screwing up something...
Any help would be grealty appreciated.
I had a similar problem with the nouveau (Nvidia) driver - it would insist on loading and grab my graphic card. Run as regular user:
- Code: Select all
lspci -v | grep -A 10 VGA
This should list the VGA cards you got and towards the end the "Kernel driver in use:". See what's listed for your ATI card - it most certainly is not "pciback". Copy the name of the driver that grabs the VGA card and edit as root the /etc/modprobe.d/blacklist.conf file. Add the following line to the bottom:
- Code: Select all
blacklist name-of-driver-you-got-from-lspci
In my case I created a separate file under /etc/modprobe.d called blacklist-nouveau.conf with a one-liner "blacklist nouveau" to blacklist my Nvidia card open-source driver that got in the way.
In your case it would probably be "blacklist radeon" or so.
About the other PCI devices you passed through and which aren't working now, let's solve the graphics card first.
You will also have to pass-through the audio part of the graphics card, in your case probably 0000:03:00.1 (you do have a sound device on that ATI card?).
Finally, check the pciback.conf and win7.cfg files under /etc/xen. See that the entries match.
Good luck and report back.

lspci -v | grep -A 11 -i sata
Nesousx wrote:I fixed my problem and edited previous post. Now I ll try to have the amd card working on both linux and windows.

powerhouse wrote:Nesousx wrote:I fixed my problem and edited previous post. Now I ll try to have the amd card working on both linux and windows.
I'm glad you figured out the problem - there are quite many steps and one glitch and boom goes the setup.
If you make it work, please post some instructions.

Nesousx wrote:...Edit: I fixed my problem!
I was really dumb.. After many tests I was able to release manually the PCI host, but couldn't release the graphic card... So I thought maybe the pciback script wasn't running. So i did a little:
- Code: Select all
sudo /etc/init.d/pciback enable
And it worked like a charm... because yes I previously "disabled" it when I tried to use the AMD card under Linux..
Now, I'll try to get AMD card working on both Linux and Widows HVM.
Thanks again for your great howto!
sudo /etc/init.d/pciback start

#; name resolve order = lmhosts host wins bcastname resolve order = bcast host lmhosts winssudo testparm -s smb.conf.master > smb.confvif = [ 'vifname=win7,type=ioemu,mac=00:16:3e:68:e1:01,bridge=xenbr0' ]vif = [ 'mac=00:16:3e:68:e1:01,bridge=xenbr0' ]# (network-script network-bridge)
(network-script /bin/true)net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0/sbin/sysctl -p /etc/sysctl.confdd if=/dev/zero of=testfile.img count=1024 bs=1024M



earlboy wrote:Just want to say thanks you for this guide.
Currently running Linux Mint 14 MATE (Dom0) with Win7 64 bit (DomU).
Asrock Z77 Extreme 4, i7 3770
Intel HD graphics for Linux Mint Dom0.
2xSapphire 7970 VGA passthrough for Win7 DomU. ( Catalyst Control Center working, Crossfire working according to CCC)
Played Terra online for a few minutes as a test. No problems encountered. Will stress test as soon as Terra servers finish maintenance.

powerhouse wrote:earlboy wrote:Just want to say thanks you for this guide.
Currently running Linux Mint 14 MATE (Dom0) with Win7 64 bit (DomU).
Asrock Z77 Extreme 4, i7 3770
Intel HD graphics for Linux Mint Dom0.
2xSapphire 7970 VGA passthrough for Win7 DomU. ( Catalyst Control Center working, Crossfire working according to CCC)
Played Terra online for a few minutes as a test. No problems encountered. Will stress test as soon as Terra servers finish maintenance.
Thanks for posting! It's great to hear that crossfire works as well. Wow, that must be quite some gaming rig you've got there. How is the Windows graphics performance versus bare metal? Any difference? Just curious.


Users browsing this forum: neupuceni and 11 guests