HOW-TO make dual-boot obsolete using XEN VGA passthrough

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby wollymammoth on Mon Feb 24, 2014 3:36 pm

Sorry, buried this in my last post: I have managed to get low-latency high-quality audio over the network (using netjack2) working which solves the audio-in-the-VM problem (for me at least).
It will (in theory) be possible to scale to an arbitrary number of windows/linux VMs as necessary.

My 'guide' is up - http://forums.linuxmint.com/viewtopic.php?f=42&t=160527
Note: still in its infancy so there might be a little "to-ing and fro-ing" to get it working.
wollymammoth
Level 1
Level 1
 
Posts: 4
Joined: Sat Feb 22, 2014 3:24 am

Linux Mint is funded by ads and donations.
 

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Tue Feb 25, 2014 2:47 am

wollymammoth wrote:Sorry, buried this in my last post: I have managed to get low-latency high-quality audio over the network (using netjack2) working which solves the audio-in-the-VM problem (for me at least).
It will (in theory) be possible to scale to an arbitrary number of windows/linux VMs as necessary.

My 'guide' is up - http://forums.linuxmint.com/viewtopic.php?f=42&t=160527
Note: still in its infancy so there might be a little "to-ing and fro-ing" to get it working.


Awesome! Thanks, this is really great.

I will link to it in my guide.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Sun Mar 09, 2014 7:32 am

Here some news on the VGA passthrough front: http://www.phoronix.com/scan.php?page=news_item&px=MTYxMjI and http://lists.xen.org/archives/html/xen-devel/2014-02/msg01848.html.

Intel's XenGT looks like an interesting approach to GPU virtualization. Unfortunately I have a 3930K CPU on a LGA 2011 / X79 board and won't be able to test this.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby FastRealm on Mon Mar 10, 2014 3:35 pm

Hi All,

I finally went and install LM16 with XEN 4.3 using XL toolstack instead of XM toolstack.
And the results, Windows 8.1 can work on XL without having any error or bootloop.
Performance in XL is much faster than XM, (based on my user experience. i didn't do any benchmark to confirm this)
As for the XEN XL shutdown bug, i use a script to disconnect the graphic card before VM shutdown and reconnect when VM bootup. So far it work flawlessly but will monitor for a while to confirm no issue.
The only thing i couldn't get it work is the share audio from Achelous. I can't figure out how to install ALSA sound driver.
If anyone knows how to do it please send me a step by step guide or point me to the right direction where i can get the ALSA driver install.

@Powerhouse as for Advantages of XL vs XM,
other than being able to run Windows 8.1 everything works the same but i feel XL works more efficiently compare to XM.
I will source for some benchmark tools and see if XL is any better compare to XM.
FastRealm
Level 1
Level 1
 
Posts: 22
Joined: Fri May 24, 2013 2:22 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Mon Mar 10, 2014 6:18 pm

FastRealm wrote:Hi All,

I finally went and install LM16 with XEN 4.3 using XL toolstack instead of XM toolstack.
And the results, Windows 8.1 can work on XL without having any error or bootloop.
Performance in XL is much faster than XM, (based on my user experience. i didn't do any benchmark to confirm this)
As for the XEN XL shutdown bug, i use a script to disconnect the graphic card before VM shutdown and reconnect when VM bootup. So far it work flawlessly but will monitor for a while to confirm no issue.
The only thing i couldn't get it work is the share audio from Achelous. I can't figure out how to install ALSA sound driver.
If anyone knows how to do it please send me a step by step guide or point me to the right direction where i can get the ALSA driver install.

@Powerhouse as for Advantages of XL vs XM,
other than being able to run Windows 8.1 everything works the same but i feel XL works more efficiently compare to XM.
I will source for some benchmark tools and see if XL is any better compare to XM.


That's great!

You can download and install Passmark in your Windows guest (30 days free evaluation) and then post your benchmarks here: http://forums.linuxmint.com/viewtopic.php?f=225&t=153482. See my first post to get an idea of the results to post.

You are welcome to post additional benchmarks, but Passmark allows you to compare your results with thousands of other users - see here: http://www.cpubenchmark.net. Assuming that most other users have placed results obtained on bare metal, this allows some comparison of virtual versus bare metal.

Thanks for the update on xl and Windows 8.1. I will link to your post. Just a pity that the graphics card still needs to be reset in Windows. Oh well...

Regarding sound, check this how-to: http://forums.linuxmint.com/viewtopic.php?f=42&t=160527. ALSA should be in the repos, though it can be a bit tricky.

P.S.: When you say xl works more efficient than xm, can you explain? Faster boot? Better CPU/disk/network/etc. performance? Just to get an idea.

EDIT: I added a link to your post with a short explanation, as well as a link to http://blog.ktz.me/?p=219 where readers can find further instructions on how to use the xl toolstack and what to install and configure in the Windows guest to have it reset the graphics card upon shutdown. I haven't tried it yet, still weighing in the pros and cons (remember: never touch a running system, and I really can't complain about how my system runs).
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Tue Mar 11, 2014 1:42 pm

I switched to xl toolstack. Here the results:

1. Using the scripts from the link in my previous post don't work - well, the logon script works when within Windows and ejects/injects the graphics card, but I can't boot with the scripts enabled.
2. BUT - it turns out I don't need those scripts at all. It looks like the xl shutdown issue may relate to AMD cards only (I have a Nvidia Quadro 2000).
3. I tested several guest shutdowns and reboots, followed by a Unigine GPU benchmark - no issue whatsoever. Everything looks just fine and there is no performance degradation as mentioned by others. I'll need to check up on that.
4. Windows guest startup time went down from ~28 seconds (with xm) to ~20 seconds (xl). That's quite noticeable.
5. Performance inside the Windows VM feels exactly the same as before (with xm), but I haven't done any additional benchmarks.

In summary, it looks like I will be using the xl toolstack from now on.

Before I update my how-to, I'd like some more feedback from AMD graphics card users. Unfortunately it seems I can't use/test the startup/shutdown scripts that were mentioned (unless I made some mistake, but I triple checked everything). FastRealm, any comments/instructions on ejecting the graphics card?
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby FastRealm on Tue Mar 11, 2014 10:38 pm

@Powerhouse

The script works for the 1st few times after that it stop working because the VM cannot destroy itself after Windows shutdown.
I'm not sure what or where went wrong but if i don't use the script and i start windows again without restarting the PC my linux mint will crash/hang.
If i use the script everything works fine except XEN cannot inject the GPU to windows. According to the maker of this script he say i can manually run the script to test the eject and inject. The eject works but inject doesn't run.

I will need to do more testing to confirm if this script work for LM or just archlinux. Until then stick with XM, less headache unless you're desprate to update to Windows 8.1 or if you have a Nvidia Card like Powerhouse or crazy like me to mess with my perfectly working XEN just for the sake of finding out and giving myself sleepless nights when it doesn't work
FastRealm
Level 1
Level 1
 
Posts: 22
Joined: Fri May 24, 2013 2:22 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Wed Mar 12, 2014 5:03 am

FastRealm wrote:@Powerhouse

The script works for the 1st few times after that it stop working because the VM cannot destroy itself after Windows shutdown.
I'm not sure what or where went wrong but if i don't use the script and i start windows again without restarting the PC my linux mint will crash/hang.
If i use the script everything works fine except XEN cannot inject the GPU to windows. According to the maker of this script he say i can manually run the script to test the eject and inject. The eject works but inject doesn't run.

I will need to do more testing to confirm if this script work for LM or just archlinux. Until then stick with XM, less headache unless you're desprate to update to Windows 8.1 or if you have a Nvidia Card like Powerhouse or crazy like me to mess with my perfectly working XEN just for the sake of finding out and giving myself sleepless nights when it doesn't work


Thanks for your help FastRealm!

1. The logon script seemed to work when running it manually from within Windows it did eject and inject the graphics card in my case (I got the black screen when it ejected the card).
2. For some reason, the logon script doesn't work when booting Windows. The only way I can access Windows is via VNC. After login via VNC, Windows boots up but doesn't switch to the passed through graphics card. All I get is Windows in a VNC window.
3. I too found that shutting down the Windows domU when using the scripts was problematic. Sometimes I had to destroy the domU, and one time when it did shut down, it also shut down the PC.

I turned to the Xen users mailing list and just received a very helpful reply:
Reboot issues are an ATI-only problem. Nvidia cards don't suffer from it because the driver in domU does a much better job than ATI's.

This is the main reason why there has recently been a lot of noise about modifying GeForce cards into Quadros for virtualized gaming. I run a pair of modified 780Ti cards (faux Quadro K6000). Up to and including GTX480 you can soft mod it by editing half a byte in the BIOS straps.

There were patches posted a while back that implement re-initializing passed through devices via a PCI bus reset but I don't know what release those will land in off the top of my head.


Now that explains a lot! Somewhere on the world wide web I saw a post that updating/replacing the Catalyst driver in Windows may solve the issue (I might be mistaken and I wish I had bookmarked that post).

EDIT 17.03.2014: I'm now not so sure it's a AMD driver issue. I've tested VGA passthrough using AMD cards for both dom0 and domU. The result is that Linux Mint 13 with Xen 4.1.2 and xm toolstack works without a problem, using the latest stable AMD driver under Windows domU. There seems to be no correlation between the domU AMD driver and VGA passthrough, at least not with the xm toolstack. There also isn't any problem with rebooting the Windows VM.

So, the way I see things now is:

1. For AMD graphics cards - use "xm"
2. For Nvidia (Quadro or "Quadrofied") graphics cards - use "xl" or "xm"
3. For Windows 8.1, use "xl" - if using an AMD graphics card, reset (eject/inject) it, or try different/newer AMD graphics driver under Windows.


What do you think?

Anyone else who can share some experience on that?
Last edited by powerhouse on Mon Mar 17, 2014 9:28 am, edited 2 times in total.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Fri Mar 14, 2014 2:56 pm

I did some testing with my AMD / ATI cards, the results of which I shared on the xenuser mailing list:

I spent the last 8 hours testing VGA passthrough with a AMD Radeon 7770 card. Here the setup:

Hardware: Asus Sabertooth X79 with latest BIOS and VT-d enabled; i7 3930K CPU; Sapphire Radeon 6450 for dom0, Sapphire Radeon 7770 for domU.

1st trial - Linux Mint 16 64 bit with kernel 3.11.0-18 and Xen 4.3.0; Windows 7 Pro 64 bit; both installed on external USB3 disk:

In short, a disaster. I first tried the xl toolstack I was using with my regular configuration (same m/b and CPU, but AMD Radeon 7770 for dom0 and Nvidia Quadro 2000 for domU).
I tried to make a new Windows installation in domU. After each shutdown of the domU I had to reboot the whole machine, else I would get libxl... errors and nothing. dom0 wouldn't even shut down, had to hard reset. I somehow managed to install Windows, but once I tried to install the graphics driver for the AMD card Windows sooner or later gave me a blue screen.

Next I tried with xm. I started from scratch, setting up a new Windows LVM volume. xm create ... failed with "error 22". That sounds familiar. I had the same issue with my regular Nvidia setup some time ago with Xen 4.1.3. But I thought that by Xen 4.3 this was fixed?!

In the bug report someone suggests to pass through only the first function of the graphics card, in my case PCI ID 02:00.0, and not specify the second (HDMI audio) function 02:00.1. I tried but no luck. Just to make sure, I removed the graphics card from the PCI passthrough devices and only left a USB controller to pass through, which worked!

Summary: Xen 4.3.0 still has some of the old bugs that I thought had gone long ago. Or is that a kernel issue?


2nd trial - Linux Mint 13 64 bit with kernel 3.2 and Xen 4.1.2; Windows 7 Pro 64 bit; both installed on external USB3 disk:

I installed the long term release Linux Mint 13 that worked well when I started out with Xen VGA passthrough. After installation and upgrading all packages and the kernel, I installed Xen and then downgraded using "Force version" in Synaptic to the earliest Xen release available in the repos, which was 4.1.2 if I remember correctly.
This time I only used xm. Installation went smooth, no hickups no nothing after multiple reboots of Windows. Passthrough works just fine with the AMD Radeon 7770. I ran the WEI, both prior and after installing the GPLPV drivers in Windows - it made no difference - 5.9 lowest score for disk (a 2.5" HDD attached via USB3), 2D and 3D graphics are 7.5, memory 7.9 (with 8GB for Windows), and CPU 7.8 (I gave it 8 of 12 VCPUS). I even installed the Unigine demo and benchmark - it ran fine though the 7770 is really not up for it with 21fps.

Summary: Xen 4.1.2 with an old 3.2 kernel works perfect with xm and VGA passthrough.


To me this looks like some ancient bugs are still not fixed (with regard to xm), and probably never will since it's been deprecated. The sad story, however, is that xl has its own serious problems with VGA passthrough.

Whatever it is, it's not an AMD driver issue. The problems start long before I even managed to install the AMD driver.

Hope someone from Xen development has a look at this. Although this means reconfiguring my hardware, I'd be happy to help in debugging if anyone is willing to try and fix it.


I hope some of you will be able to shed more light on this - is this an isolated incident (with Xen 4.3 and xl or xm), or did you run into the same issue?
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby FastRealm on Sat Mar 15, 2014 9:30 am

After testing for the whole day i found out that if i install the GPLPV drivers, the reboot script won't work. I suspect it is the shutdown app that the GPLPV drivers install causes the XL fail to properly shutdown the windows and this causes the script fail to eject the PCI. Therefore you have to reboot the PC to get the PCI ejected and ready for injection.
As off writing this i have just reinstall my windows again to confirm that without GPLPV drivers the script can work in XL mode and it did.
I will update more if i come across anything else.

And 1 more thing, i didn't use this line [device_model_version = 'qemu-xen-traditional'], i use the standard [device_model = '/usr/lib/xen-default/bin/qemu-dm'] and it work just fine.
Below is my windows.cfg file. Feel free to copy if you need.
----------------------------------------------------------------------------------------------------------------------------------
kernel = '/usr/lib/xen-default/boot/hvmloader'
builder = 'hvm'
vcpus = '4'
cpus = ['4','5','6','7']
memory = '8192'
device_model = '/usr/lib/xen-default/bin/qemu-dm'
disk = [
'phy:/dev/mapper/virtual--Windows02-Windows02,hda,w',
]
name = 'Windows'
vif = ['mac=00:16:3E:51:20:01,bridge=xenbr0,model=e1000']
on_xend_stop = 'shutdown' #not sure if it is needed for XL or not i just put it in incase
on_xend_start = 'start' #not sure if it is needed for XL or not i just put it in incase
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
#nx = '0' #saw it somewhere where the person claims this function give better CPU and Memory performance but i can't anything related to it in XEN. If you find anything pls do let us know what it actually does.
serial = 'pty'
tsc_mode = 'default'
boot = 'c'
acpi = '1'
apic = '1'
viridian = '1'
xen_platform_pci = '1'
sdl = '0'
vnc = '1'
vnclisten = '0.0.0.0'
vncpasswd = ''
stdvga = '0'
usb = '1'
usbdevice = 'tablet'
localtime = '1'
pci_power_mgmt = '1'
pci = ['01:00.0','01:00.1','00:1a.0','00:1b.0']
----------------------------------------------------------------------------------------------------------------------------------
That's all for today. My brain needs to pawn someone in DOTA 2 else it will be restless for the night.
FastRealm
Level 1
Level 1
 
Posts: 22
Joined: Fri May 24, 2013 2:22 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Mon Mar 17, 2014 9:04 am

@FastRealm: Thanks for the information!

1. GPLPV drivers have 2 installation options - automatic (all drivers) and manual (or whatever it's called) where you select the individual drivers to install. Perhaps it would make a difference if you installed only some of the drivers, for example network and disk? I haven't tried it, so I can't comment.
What I can say is that I'm running xl with the GPLPV drivers and don't need the script at all, but that is probably related to my using a Nvidia Quadro card.

2. windows.cfg file and xl:
Generally xl is backwards compatible with xm and honors the configurations in your windows.cfg file. According to http://xenbits.xen.org/docs/4.3-testing/man/xl.cfg.5.html there have been some changes in the syntax.
If you use GPLPV drivers then "model=e1000" in your vif configuration is not necessary, and will probably not be used (the e1000 defines a emulated network interface, but your Windows driver should use be able to access the bridge without using the emulated interface - not sure this really matters).

About qemu-dm versus qemu-xen-traditional, could be that device_model_description=qemu-xen-traditional is actually selecting qemu-dm which is the very same executable used by xm, which uses the traditional qemu.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby bonzi on Wed Mar 19, 2014 2:30 am

Hi,

Great how to! I've been following this thread for awhile and finally decided to give it a try. I am trying to run win7 in DomU. My hardware is kind of ancient but should work:
MB: DX58SO
CPU: Core i7 920
Dom0: AMD R7 250
DomU: AMD 6450 pci 03:00.0
Dom0: 6 GB RAM
DomU: 2 GB RAM

The problem is that when I do xm create /etc/xen/win7.cfg I get 'Error: (22, 'Invalid argument')' Does anybody know what this means and how I can fix it? I figure it must be somehow relate to the graphics passthrough. If I remove graphics passthrough from my win7.conf then I can start the vm, in this case, my USB ports are still being passed through, so that at least is working. I tried to provide lots of information to help debug, but I have to admit, I understand very little of it. If there is anything else that would help, please let me know.

uname -a
Linux Jonathan-PC 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

/var/log/xen/qemu-dm-win7.log:

Code: Select all
domid: 6
Using file /dev/mapper/guest-win7 in read-write mode
Using file /media/install/Win7.iso in read-only mode
Watching /local/domain/0/device-model/6/logdirty/cmd
Watching /local/domain/0/device-model/6/command
Watching /local/domain/6/cpu
char device redirected to /dev/pts/4
qemu_map_cache_init nr_buckets = 10000 size 4194304
shared page at pfn feffd
buffered io page at pfn feffb
Guest uuid = b32d9198-e999-bb12-4411-57b0d735ba00
Time offset set 0
populating video RAM at ff000000
mapping video RAM from ff000000
Register xen platform.
Done register platform.
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.
xs_read(/local/domain/0/device-model/6/xen_extended_power_mgmt): read error
xs_read(): vncpasswd get error. /vm/b32d9198-e999-bb12-4411-57b0d735ba00/vncpas$
medium change watch on `hdc' (index: 1): /media/install/Win7.iso
I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0
Log-dirty: no command yet.
I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0
vcpu-set: watch node error.
[xenstore_process_vcpu_set_event]: /local/domain/6/cpu has no CPU!
xs_read(/local/domain/6/log-throttling): read error
qemu: ignoring not-understood drive `/local/domain/6/log-throttling'
medium change watch on `/local/domain/6/log-throttling' - unknown device, ignor$
dm-command: hot insert pass-through pci dev
register_real_device: Assigning real physical device 03:00.0 ...
register_real_device: Enable MSI translation via per device option
register_real_device: Enable power management
pt_iomul_init: Error: pt_iomul_init can't open file /dev/xen/pci_iomul: No such$
pt_register_regions: IO region registered (size=0x10000000 base_addr=0xe000000c)
pt_register_regions: IO region registered (size=0x00020000 base_addr=0xc0200004)
pt_register_regions: IO region registered (size=0x00000100 base_addr=0x00004001)
pt_register_regions: Expansion ROM registered (size=0x00020000 base_addr=0xc024$
register_real_device: Error: Mapping irq failed, rc = -1
pt_msi_setup: msi mapped with pirq 37
pci_intx: intx=1
register_real_device: Real physical device 03:00.0 registered successfuly!
IRQ type = MSI-INTx


/etc/default/grub apparently iommu=force,no-intremap is necessary for the x58 chipset.

Code: Select all
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="Xen 4.3-amd64"
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_XEN="iommu=force,no-intremap dom0_mem=6144M"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"


/var/log/xen/xend.log

Code: Select all
[2014-03-18 23:11:52 2148] DEBUG (XendDomainInfo:103) XendDomainInfo.create(['vm', ['name', 'win7'], ['memory', 2048], ['on_xend_start', 'ignore'], ['on_xend_stop', 'shutdown'], ['vcpus', 2], ['localtime', 1], ['oos', 1], ['image', ['hvm', ['kernel', '/usr/lib/xen-default/boot/hvmloader'], ['videoram', 4], ['serial', 'pty'], ['acpi', 1], ['apic', 1], ['boot', 'dc'], ['cpuid', []], ['cpuid_check', []], ['display', ':0'], ['fda', ''], ['fdb', ''], ['gfx_passthru', 0], ['guest_os_type', 'default'], ['hap', 1], ['hpet', 0], ['isa', 0], ['keymap', ''], ['localtime', 1], ['nestedhvm', 0], ['nographic', 0], ['oos', 1], ['pae', 1], ['pci', [['0x0000', '0x03', '0x00', '0x0', '0x100', [], '03:00.0'], ['0x0000', '0x03', '0x00', '0x1', '0x100', [], '03:00.1'], ['0x0000', '0x00', '0x1a', '0x2', '0x100', [], '00:1a.2']]], ['pci_msitranslate', 1], ['pci_power_mgmt', 1], ['rtc_timeoffset', 0], ['sdl', 0], ['soundhw', ''], ['stdvga', 0], ['timer_mode', 1], ['usb', 0], ['usbdevice', 'tablet'], ['vcpus', 2], ['vnc', 1], ['vncunused', 1], ['viridian', 1], ['vpt_align', 1], ['xauthority', '/home/jonathan/.Xauthority'], ['xen_platform_pci', 1], ['memory_sharing', 0], ['device_model', '/usr/lib/xen-default/bin/qemu-dm'], ['vncpasswd', 'XXXXXXXX'], ['tsc_mode', 0], ['nomigrate', 0]]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:/dev/mapper/guest-win7'], ['dev', 'hda'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'file:/media/install/Win7.iso'], ['dev', 'hdc:cdrom'], ['mode', 'r']]], ['device', ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0']], ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.1'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x1']], ['dev', ['slot', '0x1a'], ['domain', '0x0000'], ['key', '00:1a.2'], ['bus', '0x00'], ['vdevfn', '0x100'], ['func', '0x2']]]], ['device', ['vif', ['bridge', 'xenbr0'], ['mac', '00:16:3e:68:e1:01']]]])
[2014-03-18 23:11:52 2148] DEBUG (XendDomainInfo:2499) XendDomainInfo.constructDomain
[2014-03-18 23:11:52 2148] DEBUG (balloon:187) Balloon: 2129844 KiB free; need 16384; done.
[2014-03-18 23:11:52 2148] DEBUG (XendDomain:476) Adding Domain: 6
[2014-03-18 23:11:52 2148] DEBUG (XendDomainInfo:2842) XendDomainInfo.initDomain: 6 256
[2014-03-18 23:11:52 2148] DEBUG (image:339) No VNC passwd configured for vfb access
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: boot, val: dc
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: fda, val: None
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: fdb, val: None
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: soundhw, val: None
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: localtime, val: 1
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: serial, val: ['pty']
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: std-vga, val: 0
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: isa, val: 0
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: acpi, val: 1
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: usb, val: 0
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: usbdevice, val: tablet
[2014-03-18 23:11:52 2148] DEBUG (image:891) args: gfx_passthru, val: 0
[2014-03-18 23:11:52 2148] INFO (image:822) Need to create platform device.[domid:6]
[2014-03-18 23:11:52 2148] DEBUG (XendDomainInfo:2869) _initDomain:shadow_memory=0x0, memory_static_max=0x80000000, memory_static_min=0x0.
[2014-03-18 23:11:52 2148] INFO (image:182) buildDomain os=hvm dom=6 vcpus=2
[2014-03-18 23:11:52 2148] DEBUG (image:950) domid          = 6
[2014-03-18 23:11:52 2148] DEBUG (image:951) image          = /usr/lib/xen-default/boot/hvmloader
[2014-03-18 23:11:52 2148] DEBUG (image:952) store_evtchn   = 4
[2014-03-18 23:11:52 2148] DEBUG (image:953) memsize        = 2048
[2014-03-18 23:11:52 2148] DEBUG (image:954) target         = 2048
[2014-03-18 23:11:52 2148] DEBUG (image:955) vcpus          = 2
[2014-03-18 23:11:52 2148] DEBUG (image:956) vcpu_avail     = 3
[2014-03-18 23:11:52 2148] DEBUG (image:957) acpi           = 1
[2014-03-18 23:11:52 2148] DEBUG (image:958) apic           = 1
[2014-03-18 23:11:52 2148] INFO (XendDomainInfo:2358) createDevice: vfb : {'vncunused': 1, 'other_config': {'vncunused': 1, 'vnc': '1'}, 'vnc': '1', 'uuid': 'c515916e-db6e-1aae-ab9c-7f0d3b6c2081'}
[2014-03-18 23:11:52 2148] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/vfb/6/0'} to /local/domain/6/device/vfb/0.
[2014-03-18 23:11:52 2148] DEBUG (DevController:97) DevController: writing {'vncunused': '1', 'domain': 'win7', 'frontend': '/local/domain/6/device/vfb/0', 'uuid': 'c515916e-db6e-1aae-ab9c-7f0d3b6c2081', 'frontend-id': '6', 'state': '1', 'online': '1', 'vnc': '1'} to /local/domain/0/backend/vfb/6/0.
[2014-03-18 23:11:52 2148] INFO (XendDomainInfo:2358) createDevice: vbd : {'uuid': 'ebe2457b-4a40-b832-00b8-d145d710d665', 'bootable': 1, 'driver': 'paravirtualised', 'dev': 'hda', 'uname': 'phy:/dev/mapper/guest-win7', 'mode': 'w'}
[2014-03-18 23:11:52 2148] DEBUG (DevController:95) DevController: writing {'backend-id': '0', 'virtual-device': '768', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/6/768'} to /local/domain/6/device/vbd/768.
[2014-03-18 23:11:52 2148] DEBUG (DevController:97) DevController: writing {'domain': 'win7', 'frontend': '/local/domain/6/device/vbd/768', 'uuid': 'ebe2457b-4a40-b832-00b8-d145d710d665', 'bootable': '1', 'dev': 'hda', 'state': '1', 'params': '/dev/mapper/guest-win7', 'mode': 'w', 'online': '1', 'frontend-id': '6', 'type': 'phy'} to /local/domain/0/backend/vbd/6/768.
[2014-03-18 23:11:52 2148] INFO (XendDomainInfo:2358) createDevice: vbd : {'uuid': '0be201e9-d371-7ff3-714c-ede78c8d3855', 'bootable': 0, 'driver': 'paravirtualised', 'dev': 'hdc:cdrom', 'uname': 'file:/media/install/Win7.iso', 'mode': 'r'}
[2014-03-18 23:11:52 2148] DEBUG (DevController:95) DevController: writing {'backend-id': '0', 'virtual-device': '5632', 'device-type': 'cdrom', 'state': '1', 'backend': '/local/domain/0/backend/vbd/6/5632'} to /local/domain/6/device/vbd/5632.
[2014-03-18 23:11:52 2148] DEBUG (DevController:97) DevController: writing {'domain': 'win7', 'frontend': '/local/domain/6/device/vbd/5632', 'uuid': '0be201e9-d371-7ff3-714c-ede78c8d3855', 'bootable': '0', 'dev': 'hdc', 'state': '1', 'params': '/media/install/Win7.iso', 'mode': 'r', 'online': '1', 'frontend-id': '6', 'type': 'file'} to /local/domain/0/backend/vbd/6/5632.
[2014-03-18 23:11:52 2148] INFO (XendDomainInfo:2358) createDevice: vif : {'bridge': 'xenbr0', 'mac': '00:16:3e:68:e1:01', 'uuid': '1f3fe513-7a80-5bed-4e25-43a3477281a7'}
[2014-03-18 23:11:52 2148] DEBUG (DevController:95) DevController: writing {'backend-id': '0', 'mac': '00:16:3e:68:e1:01', 'handle': '0', 'state': '1', 'backend': '/local/domain/0/backend/vif/6/0'} to /local/domain/6/device/vif/0.
[2014-03-18 23:11:52 2148] DEBUG (DevController:97) DevController: writing {'bridge': 'xenbr0', 'domain': 'win7', 'handle': '0', 'uuid': '1f3fe513-7a80-5bed-4e25-43a3477281a7', 'script': '/etc/xen/scripts/vif-bridge', 'mac': '00:16:3e:68:e1:01', 'frontend-id': '6', 'state': '1', 'online': '1', 'frontend': '/local/domain/6/device/vif/0'} to /local/domain/0/backend/vif/6/0.
[2014-03-18 23:11:52 2148] INFO (XendDomainInfo:2358) createDevice: pci : {'devs': [{'slot': '0x00', 'domain': '0x0000', 'key': '03:00.0', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x0', 'uuid': '9a7e4752-9d71-d686-c87c-3b491774f3dc'}, {'slot': '0x00', 'domain': '0x0000', 'key': '03:00.1', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x1', 'uuid': '2fdad698-e278-47d2-9208-3ca2d347d66e'}, {'slot': '0x1a', 'domain': '0x0000', 'key': '00:1a.2', 'bus': '0x00', 'vdevfn': '0x100', 'func': '0x2', 'uuid': '13ad95df-a814-ff01-bc10-a5274570ba63'}], 'uuid': '11692c9f-76e7-9f95-c064-7cd18849ea8d'}
[2014-03-18 23:11:56 2148] INFO (image:418) spawning device models: /usr/lib/xen-default/bin/qemu-dm ['/usr/lib/xen-default/bin/qemu-dm', '-d', '6', '-domain-name', 'win7', '-videoram', '4', '-vnc', '127.0.0.1:0', '-vncunused', '-vcpus', '2', '-vcpu_avail', '0x3', '-boot', 'dc', '-localtime', '-serial', 'pty', '-acpi', '-usbdevice', 'tablet', '-net', 'nic,vlan=1,macaddr=00:16:3e:68:e1:01,model=rtl8139', '-net', 'tap,vlan=1,ifname=vif6.0-emu,bridge=xenbr0,script=no,downscript=no', '-M', 'xenfv']
[2014-03-18 23:11:56 2148] INFO (image:467) device model pid: 15546
[2014-03-18 23:11:56 2148] INFO (image:590) waiting for sentinel_fifo
[2014-03-18 23:11:56 2148] DEBUG (XendDomainInfo:893) XendDomainInfo.pci_device_configure: ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0'], ['uuid', '9a7e4752-9d71-d686-c87c-3b491774f3dc']], ['state', 'Initialising'], ['sub_state', 'Booting']]
[2014-03-18 23:11:56 2148] DEBUG (XendDomainInfo:779) XendDomainInfo.hvm_pci_device_insert: {'devs': [{'slot': '0x00', 'domain': '0x0000', 'key': '03:00.0', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x0', 'uuid': '9a7e4752-9d71-d686-c87c-3b491774f3dc'}], 'states': ['Initialising']}
[2014-03-18 23:11:56 2148] DEBUG (XendDomainInfo:790) XendDomainInfo.hvm_pci_device_insert_dev: {'slot': '0x00', 'domain': '0x0000', 'key': '03:00.0', 'bus': '0x03', 'vdevfn': '0x100', 'func': '0x0', 'uuid': '9a7e4752-9d71-d686-c87c-3b491774f3dc'}
[2014-03-18 23:11:56 2148] DEBUG (XendDomainInfo:811) XendDomainInfo.hvm_pci_device_insert_dev: 0000:03:00.0@100,msitranslate=1,power_mgmt=1
[2014-03-18 23:11:56 2148] DEBUG (XendDomainInfo:815) pci: assign device 0000:03:00.0@100,msitranslate=1,power_mgmt=1
[2014-03-18 23:11:56 2148] DEBUG (image:508) signalDeviceModel: orig_state is None, retrying
[2014-03-18 23:11:56 2148] INFO (image:538) signalDeviceModel:restore dm state to running
[2014-03-18 23:11:56 2148] INFO (pciquirk:92) NO quirks found for PCI device [1002:6779:1092:6450]
[2014-03-18 23:11:56 2148] DEBUG (pciquirk:135) Permissive mode NOT enabled for PCI device [1002:6779:1092:6450]
[2014-03-18 23:11:56 2148] DEBUG (pciif:320) pci: enabling ioport 0x4000/0x100
[2014-03-18 23:11:56 2148] DEBUG (pciif:334) pci: enabling iomem 0xe0000000/0x10000000 pfn 0xe0000/0x10000
[2014-03-18 23:11:56 2148] DEBUG (pciif:334) pci: enabling iomem 0xc0200000/0x20000 pfn 0xc0200/0x20
[2014-03-18 23:11:56 2148] DEBUG (pciif:334) pci: enabling iomem 0xc0240000/0x20000 pfn 0xc0240/0x20
[2014-03-18 23:11:56 2148] ERROR (XendDomainInfo:2933) XendDomainInfo.initDomain: exception occurred
Traceback (most recent call last):
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2920, in _initDomain
    self._createDevices()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2396, in _createDevices
    self.pci_device_configure_boot()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 627, in pci_device_configure_boot
    self.pci_device_configure(dev_sxp, first_dev = first)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 970, in pci_device_configure
    devid = self._createDevice('pci', existing_pci_conf)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2327, in _createDevice
    return self.getDeviceController(deviceClass).createDevice(devConfig)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/server/DevController.py", line 67, in createDevice
    self.setupDevice(config)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/server/pciif.py", line 453, in setupDevice
    self.setupOneDevice(d)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/server/pciif.py", line 346, in setupOneDevice
    pirq  = dev.irq)
Error: (22, 'Invalid argument')
[2014-03-18 23:11:56 2148] ERROR (XendDomainInfo:488) VM start failed
Traceback (most recent call last):
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 474, in start
    XendTask.log_progress(31, 60, self._initDomain)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendTask.py", line 209, in log_progress
    retval = func(*args, **kwds)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2936, in _initDomain
    raise VmError(str(exn))
VmError: (22, 'Invalid argument')
[2014-03-18 23:11:56 2148] DEBUG (XendDomainInfo:3077) XendDomainInfo.destroy: domid=6
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2402) Destroying device model
[2014-03-18 23:11:57 2148] INFO (image:615) win7 device model terminated
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2409) Releasing devices
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2415) Removing vif/0
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vif, device = vif/0
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2415) Removing vbd/768
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/768
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2415) Removing vbd/5632
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/5632
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2415) Removing vfb/0
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vfb, device = vfb/0
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2407) No device model
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2409) Releasing devices
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2415) Removing vif/0
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vif, device = vif/0
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2415) Removing vbd/768
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/768
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:2415) Removing vbd/5632
[2014-03-18 23:11:57 2148] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/5632
[2014-03-18 23:11:57 2148] ERROR (XendDomainInfo:108) Domain construction failed
Traceback (most recent call last):
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 106, in create
    vm.start()
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 474, in start
    XendTask.log_progress(31, 60, self._initDomain)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendTask.py", line 209, in log_progress
    retval = func(*args, **kwds)
  File "/usr/lib/xen-4.3/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2936, in _initDomain
    raise VmError(str(exn))
VmError: (22, 'Invalid argument')
bonzi
Level 1
Level 1
 
Posts: 18
Joined: Wed Mar 19, 2014 1:49 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Wed Mar 19, 2014 3:40 pm

@bonzi:

I ran into the same error 22 issue recently when I tested my AMD 7770 for VGA passthrough.

I think the best solution - for now- is to install Linux Mint 13 (it's a long term release that is supported until 2017 :) ), and the downgrade Xen to version 4.1.2 (I believe).

See my old Linux Mint 13 / 14 how-to here: http://forums.linuxmint.com/viewtopic.php?f=42&t=112013&start=360#p818716. Just follow that how-to and after you installed the Xen hypervisor, go to Synaptic and use the "Force" option to select the older Xen version. Together with the xm toolstack this should solve the VGA passthrough issue.

Please report back on how it went.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby bonzi on Sun Mar 23, 2014 10:43 pm

powerhouse wrote:@bonzi:

I ran into the same error 22 issue recently when I tested my AMD 7770 for VGA passthrough.

I think the best solution - for now- is to install Linux Mint 13 (it's a long term release that is supported until 2017 :) ), and the downgrade Xen to version 4.1.2 (I believe).

See my old Linux Mint 13 / 14 how-to here: http://forums.linuxmint.com/viewtopic.php?f=42&t=112013&start=360#p818716. Just follow that how-to and after you installed the Xen hypervisor, go to Synaptic and use the "Force" option to select the older Xen version. Together with the xm toolstack this should solve the VGA passthrough issue.

Please report back on how it went.


Thanks for the reply, I have now done this but I still see the error 22 message. Maybe 4.1.2 still has the same problem? Really wish I could get this to work...
bonzi
Level 1
Level 1
 
Posts: 18
Joined: Wed Mar 19, 2014 1:49 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Tue Mar 25, 2014 12:44 am

bonzi wrote:
powerhouse wrote:@bonzi:

I ran into the same error 22 issue recently when I tested my AMD 7770 for VGA passthrough.

I think the best solution - for now- is to install Linux Mint 13 (it's a long term release that is supported until 2017 :) ), and the downgrade Xen to version 4.1.2 (I believe).

See my old Linux Mint 13 / 14 how-to here: http://forums.linuxmint.com/viewtopic.php?f=42&t=112013&start=360#p818716. Just follow that how-to and after you installed the Xen hypervisor, go to Synaptic and use the "Force" option to select the older Xen version. Together with the xm toolstack this should solve the VGA passthrough issue.

Please report back on how it went.


Thanks for the reply, I have now done this but I still see the error 22 message. Maybe 4.1.2 still has the same problem? Really wish I could get this to work...


Sorry to hear you still get error 22. Just to be sure, please check the following:

1. After installation of LM13 and Xen, make sure you have downgraded Xen and all Xen-related packages to the earliest version offered. You can go into Synaptic, search for Xen, then select Xen-4.1.3... and select "Force" from the menu. You will be offered version 4.1.2 (IIRC). Select that version. Now do the same for all Xen-related packages that appear and carry the version 4.1.3... (see list of packages in the LM13/LM14 how-to). All those packages must be downgraded to the earlier version using Force...

2. I noticed that Force... alone does not "lock" the version. If you updated your system following the above procedure, those packages will probably have been updated too. There is a "Lock..." option in Synaptic that prevents the update.

3. Make sure you are using the "xm" toolstack. Also check to see that your /etc/xen/win.cfg file carries the following line:
device_model = '/usr/lib/xen-default/bin/qemu-dm'


4. Check to make sure you installed all packages mentioned in the how-to

If all the steps above have been followed and you still get error 22, please open a new thread and post a link here below. In the new thread please post the following information:
Code: Select all
inxi -F

Code: Select all
sudo xm dmesg

The output of:
Code: Select all
sudo xm create /etc/xen/win.cfg

The contents of /etc/xen/win.cfg (or whatever your domU configuration file is called).
Also, please specify which version of Windows you have/are trying to install, and the exact model of the graphics card you are trying to pass through.

Good luck!
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby bonzi on Wed Mar 26, 2014 2:34 am

Thanks powerhouse for the reply!

1 and 2. I definitely downgraded all the Xen packages to 4.1.2. I also locked the version like you suggested.

3. I am using xm toolstack and my win.cfg contains device_model = '/usr/lib/xen-default/bin/qemu-dm'

I made a post in the software section, viewtopic.php?f=47&t=163317&p=839868#p839868 I hope that is the right place for it.
bonzi
Level 1
Level 1
 
Posts: 18
Joined: Wed Mar 19, 2014 1:49 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Thu Mar 27, 2014 10:55 pm

bonzi wrote:Thanks powerhouse for the reply!

1 and 2. I definitely downgraded all the Xen packages to 4.1.2. I also locked the version like you suggested.

3. I am using xm toolstack and my win.cfg contains device_model = '/usr/lib/xen-default/bin/qemu-dm'

I made a post in the software section, viewtopic.php?f=47&t=163317&p=839868#p839868 I hope that is the right place for it.


I replied to your new thread. Unfortunately I don't have good news so far - just that I can confirm that the AMD 6450 with LM 16 and Xen 4.3 gives me the error 22 message, too.

I had the same issue when trying to pass through my AMD 7770 earlier this month, but back then I was able to solve it by installing LM 13 and downgrading Xen. Since you have tried that already, it seems pointless for me to try too.

I will hopefully find some time on Sunday to tinker around with this. If you have any news, please share.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby sivel27 on Fri Mar 28, 2014 11:51 am

is this guide usable with lmde ?

great work as always.

sivel27
sivel27
Level 1
Level 1
 
Posts: 10
Joined: Sat May 23, 2009 12:54 pm

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse on Fri Mar 28, 2014 11:51 pm

sivel27 wrote:is this guide usable with lmde ?

great work as always.

sivel27


I haven't tried LMDE yet, but it should work similarly. The only place in the how-to that might differ is where you enter the links (ln ....). You should check which folders are used by LMDE before copying the links I posted.

Please share your results here.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby wolfiegr on Wed Apr 02, 2014 5:47 pm

Well I think it's time to add my experience with trying to make Xen PCI Passthrough to work. First some hardware info: I got the i7-3930K c2 cpu as powerhouse does and the ASUS p9x79 deluxe mobo (which has vt-d support on my current bios and is enabled) 16GB of ram and two GPUs an Nvidia GTX660Ti and one AMD hd6450 (which i bought only to test if I could make this work). I'm trying to pass the amd card to win. (TBH I'm using debian testing but I guess it'll be like LMDE).
I startted following the guide and I encountered the first problem on the network bridge configuration. When I restarted my networking service I got an error about RTNETLINK or something. Which was easy to bypass by not having eth0 auto configured from network-manager. About the missing links I skipped the first one altogether since I don't have a lib64 under /usr/ (there is a /lib64 folder but I didn't try linking to it). I skipped passing USB devices in order to see how it was working with Synergy.
Next thing was to update the initramfs.
Code: Select all
update-initramfs -k all -c
Using this command I got an error about an already existing file so I changed -c to -u. Everything worked fine as I could tell. I created the win7.cfg and then the lvm partition.
After that it was time to create the VM.
Code: Select all
sudo xm create win7.cfg
returned an error about line 14. I deleted all comments from the cfg file and left only what was necessary and I got an error about: Error: 'NoneType' object has no attribute 'rfind'. (As a sidenote I don't have a qemu-dm on my system and I didn't try to use another qemu binary)
After Googling I decided to try xl since it was the most common solution. I changed my win7.cfg to this:
Code: Select all
builder = 'hvm'
memory = 4096
vcpus = 8
name = 'win7'
vif = [ 'mac=00:16:3e:68:e1:01,bridge=xenbr0' ]
disk = [ '/dev/mapper/guest-win7,,hda,rw','/home/whoami/win7.iso,,hdc,cdrom,r' ]

# Try to boot from CD-ROM first (‘d”), then try hard disk (“c”).
boot = 'dc'

vnc = 1
vncpasswd = 'pass'
pci=[ '02:00.0', '02:00.1' ]
# Necessary for booting as of 12-06-2013
device_model_version = 'qemu-xen'
device_model_override = '/usr/bin/qemu'
bios = 'seabios'


and the VM was created I installed windows 7 with a lot of hassle since my actual dot/mouse wasn't truly in sync and had to use the keyboard mostly. (I had trouble finding the LVM drive to install windows so I destroyed and recreated it under the partition, dunno what changed). After a couple of restarts I was admiring my win 7 pro 64bit installation. I was seeing 2x Standard VGA Graphics Adapter (one with the triangle) and under other devices a PCI Device with a triangle. Downloaded AMD drivers installed them and I rebooted the machine. Nothing happens still the triangle is there and the Standard VGA Graphics Adapter has changed name to AMD Radeon HD6450. The PCI device is still with a triangle. On the hardware properties I get:
"This device cannot find enough free resources it can use (Code 12). If you want to use this device, you will need to disable one of the other devices on this system", And on the PCI Device: "The drivers for this device are not installed (Code 28)".
Any clues about this?

P.S. When I tried to give 8192MB I got an error about not having enough memory. While on grub I have given dom0 8192MB and I should be able to give the rest 8gigs to the domU.
wolfiegr
Level 1
Level 1
 
Posts: 7
Joined: Wed Mar 26, 2014 5:50 pm

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 6 guests