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

Write tutorials 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 mantisghost on Mon Apr 22, 2013 7:14 pm

Thanks for help guys indeed it was not blacklisted. Now it works. Still I need to use this little handy script http://wiki.xen.org/wiki/Bind_lib.bash (no idea why it wont pass it other way) but other than that awesome. Now I can play with this vm and who knows maybe I will somehow make sound work too.

Here is a little video. Sorry for shaking but I did record it with phone and my hands shake a lot also using only one hand to record and second to operate makes it shake even more. Maybe later I'll make better one and swap links.
http://youtu.be/-bbHpWNlIeQ
Last edited by mantisghost on Tue Apr 23, 2013 5:41 am, edited 1 time in total.
mantisghost
Level 1
Level 1
 
Posts: 8
Joined: Sat Apr 20, 2013 3:20 pm

Linux Mint is funded by ads and donations.
 

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

Postby Locuust on Mon Apr 22, 2013 7:59 pm

mantisghost wrote:Thanks for help guys indeed it was not blacklisted. Now it works. Still i need to use this little handy script http://wiki.xen.org/wiki/Bind_lib.bash (no idea why it wont pass it other way) but other than that awesome. Now i can play with this vm and who knows maybe i will somehow make sound work too.

Here is a little video. Sorry for shaking but i did record it with phone and my hands shake a lot. Using only one hand to record didnt help. Maybe later I'll make better one and swap links
http://youtu.be/-bbHpWNlIeQ


Don't let me experience deter you. Rather than follow what powerhouse did and passthrough a USB controller with a USB sound card attached I was trying to passthrough my motherboards integrated sound card. In theory it should work fine and I did get it to work but I had stability issues that may or may not have been related. To get it to work I used Opensuse 12.3 that has both a newer kernel and newer Xen (3.7 and 4.2). The irony being I could get stable VGA passthrough on Mint 14 Mate w/Xen 4.1, but my sound would not passthrough (or rather something was causing the windows driver to fail to load). When I switched to Opensuse 12.3 I had nothing but stability issues and problems getting the video driver to load in windows, but my sound worked fine. There very well may be a solution to my issues but I decided to take a break from it.

At any rate grats on getting it to work.

As far as the binding script goes there are two alternatives to using it, but at the same time this is probably a case of "if it's not broke don't fix it". Originally I compiled my own kernel to statically integrate the pciback module. This way I can pass my kernel options directly in grub without further modifications. In hindsight this is a rather heavy handed approach. Recompiling just for the sake of pciback module is unnecessary. What I did in Opensuse was load the pciback module into initrd (initramfs) and use the same kernel options I did in grub as I did with a compiled kernel. Grub passes the options to the kernel and the kernel passes these options on to the init script in the ramdisk (initrd) as far as I understand it. By now I must sound like a broken record. Anyways, the later option is advantageous in that it keeps the stock kernel intact while allowing you to reserve PCI devices before most of the kernel modules load (and reserve it for themselves per say).

That said I never actually tried it in Mint so your mileage may vary.
Locuust
Level 3
Level 3
 
Posts: 156
Joined: Thu Oct 02, 2008 4:54 pm

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

Postby mantisghost on Tue Apr 23, 2013 5:53 am

Locuust wrote:Don't let me experience deter you. Rather than follow what powerhouse did and passthrough a USB controller with a USB sound card attached I was trying to passthrough my motherboards integrated sound card. In theory it should work fine and I did get it to work but I had stability issues that may or may not have been related.


True I did read about passing throught integrated soundcard. Still it is not so handy. I want to have sound at the same time in linux host that will be used for work and in Windows that will be used for gaming. Thats why I will need PCI or usb soundcard. Also it would be quite nice if xen had a way to switch hardware between host and guest like vmware and virtualbox do. In vmware its simple as you just make it with few clicks and do not require rebooting guest os. This image shows what i mean:

http://i287.photobucket.com/albums/ll143/mafi_mok/vmware_usb_connect.jpg

Sadly in xen I need to turn off virtual machine, change cfg, add pass throught usb id, use the bind_lib.bash to free usb and run the virtual machine again. A you see when you compare this to vmware it is really annoying procedure. If you know other way to swap usb plugged hardware without all that mambo jambo I would be gratefull for the information.
mantisghost
Level 1
Level 1
 
Posts: 8
Joined: Sat Apr 20, 2013 3:20 pm

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

Postby powerhouse on Tue Apr 23, 2013 8:22 am

mantisghost wrote:Thanks for help guys indeed it was not blacklisted. Now it works. Still I need to use this little handy script http://wiki.xen.org/wiki/Bind_lib.bash (no idea why it wont pass it other way) but other than that awesome. Now I can play with this vm and who knows maybe I will somehow make sound work too.

Here is a little video. Sorry for shaking but I did record it with phone and my hands shake a lot also using only one hand to record and second to operate makes it shake even more. Maybe later I'll make better one and swap links.
http://youtu.be/-bbHpWNlIeQ


Great! I like the video. I see you use synergy - how is it?

1. The Bind_lib.bash script you mention supports 2 different methods: pciback (the one I'm using) and pci-stub. Do you use pci-stub? If not, that is if you use pciback, then there's probably somewhere a mistake along the configuration / installation of the script. Anyway, if it works, don't change anything. Just be aware that pci-stub does not support PV guests (if you plan to install for example some Linux PV guest).

2. I found a simple and inexpensive way to get sound under Windows: a USB sound stick. You pass through a USB port, plug in the USB sound stick, connect the output of it to the input of your onboard sound card. This way you got both sound under Linux and under Windows.
If your screen (for Windows) has built-in sound and a HDMI connection, you could use that instead of the USB sound stick.
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby powerhouse on Tue Apr 23, 2013 8:29 am

mantisghost wrote:... Also it would be quite nice if xen had a way to switch hardware between host and guest like vmware and virtualbox do. In vmware its simple as you just make it with few clicks and do not require rebooting guest os. This image shows what i mean:

http://i287.photobucket.com/albums/ll143/mafi_mok/vmware_usb_connect.jpg

Sadly in xen I need to turn off virtual machine, change cfg, add pass throught usb id, use the bind_lib.bash to free usb and run the virtual machine again. A you see when you compare this to vmware it is really annoying procedure. If you know other way to swap usb plugged hardware without all that mambo jambo I would be gratefull for the information.


I need to look into that. A simple option is getting a KVM USB switch, which is what I am using for my mouse and keyboard. What devices are connected to the USB ports?

EDIT: I doubt it will be that easy. VMware is providing its own drivers for the USB devices under Windows. Anyway, in VMware the devices aren't real devices, but virtual ones, like in VirtualBox. This is why both can easily add or remove these devices, using their own drivers. Under Xen you are passing through real hardware devices which are handled under Windows by the vendors' hardware drivers.

However, there are xm or virsh commands that may help, allowing you to add or remove devices. I'm using
Code: Select all
virsh nodedev-reattach pci_0000_0b_00_0

to reattach USB hosts to dom0 after I close the guest. Perhaps it works while Windows is running?
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby mantisghost on Tue Apr 23, 2013 3:08 pm

powerhouse wrote:1. The Bind_lib.bash script you mention supports 2 different methods: pciback (the one I'm using) and pci-stub. Do you use pci-stub?
2. I found a simple and inexpensive way to get sound under Windows: a USB sound stick. You pass through a USB port, plug in the USB sound stick, connect the output of it to the input of your onboard sound card. This way you got both sound under Linux and under Windows.

I see you use synergy - how is it?


I do use pciback metod still I need to figure out why it does not work with your solution or remake it somehow so that it will run when I log in into linux account.
Yes I was thinking about buying cheap soundcard and that should solve the sound issue. Still all usb port on mine motherboard are used, thats why I think an pci sound card would be better (have one pci free slot on motherboard). It should work the same as usb one (or even better) and there should be no problems in passing it throught.

Synergy is awesome works smoothly and as you can see in video it gives me nice control over guest machine. Using second screen instead of vnc is great and when you combine it with synergy you can't imagine a more comfortable way to operate host and guest at the same time. Still as the second screen is for games it would be annoying when you move the mouse over left edge or right edge. Thats why in synergy I did configure hotkey to lock mouse cursor to active screen field.
mantisghost
Level 1
Level 1
 
Posts: 8
Joined: Sat Apr 20, 2013 3:20 pm

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

Postby powerhouse on Tue Apr 23, 2013 4:00 pm

@mantisghost: Thanks for the answers. I guess I should try synergy again.

I tried removing a pci device (USB host) from my running Windows guest. Well, 1st it didn't reattach to the dom0, 2nd it caused all sorts of issues with any pci related command in Linux (lspci got stuck and wouldn't terminate, no matter what, just as an example), 3rd the Windows guest wouldn't shut down - saw the "Windows shutdown..." screen indefinitely. Couldn't stop it via xm, either, nor virt-manager. Finally tried to shut down the host and that also didn't work. Hard reset of the PC was the only way to recover. Luckily there seem to be no issues with either Xen, Linux, nor the Windows guest - all were booting just fine after that.

I run a modified version of the script you mentioned to boot Windows. That is, I don't run pciback at boot. This way I can use my USB ports under Linux when not running Windows.
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby Locuust on Tue Apr 23, 2013 4:25 pm

I was worried that synergy might produce some lag when gaming, but I'll have to consider giving it a try in the future (as my KVM switch died).

Here's something you can try (haven't tested this on Mint) if you want to permanently reserve certain hardware with pciback at startup.

Howto configure pciback module to load before most hardware modules (drivers)
Disclaimer: This is an alternative to this guides method in case you have issues getting pciback to work.
1) Add Kernel option lines to /etc/default/grub
Code: Select all
sudo gedit /etc/default/grub

If the below line heading already exists simply comment out it out (#) and replace it. Otherwise add it below the existing CMDLINE entries. Be sure to change it to match your PCI ID's -
GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="xen-pciback.hide=(<your_pci_id_1>)(<your_pci_id_2>)(<your_pci_id_3>)"

Example of how it should look:
GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="xen-pciback.hide=(02:00.0)(02:00.1)"

2) Add xen-pciback to initrd (initramfs)
Code: Select all
sudo gedit /etc/initramfs-tools/modules

Add the following to the end of the file and save it -
Code: Select all
xen-pciback

3) Update initrd
Code: Select all
sudo update-initramfs -u -k all
sudo update-grub

4) Reboot
5) Check to make sure your PCI devices are ready for passthrough as indicated in step 17 of this guide.

That should be it. With this you should not need to run the bind script but without it you won't be able to add PCI devices after you bootup. If you need to change pci devices at a latter date simply change the grub entry in step 1 and re-run update-grub. If anyone tries it let me know if it works for you.
Locuust
Level 3
Level 3
 
Posts: 156
Joined: Thu Oct 02, 2008 4:54 pm

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

Postby powerhouse on Sat Apr 27, 2013 10:23 am

@Locuust: Thanks for your howto describing the alternative initramfs method.

This method should work in those cases where xm pci-list-assignable-devices doesn't show the expected PCI devices. Sometimes during boot a graphics card driver grabs the card before it can be attached to the pciback driver (using the pciback.sh script method).

I haven't got the time now to edit my howto, but sometime in a couple of days I'll add a link to your post.
EDIT: done - added a note with link under step 17.

Again thanks.
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby powerhouse on Tue Apr 30, 2013 5:21 pm

Today I installed the latest upgrade 4.1.3-3ubuntu1.5 for the xen hypervisor and it broke something: When trying to load the guest it would not load and gave me an "Error: (22, 'Invalid argument')".

Here the log:

Code: Select all
[2013-04-30 23:31:19 2457] DEBUG (pciif:334) pci: enabling iomem 0xfa000000/0x80000 pfn 0xfa000/0x80
[2013-04-30 23:31:19 2457] DEBUG (pciif:351) pci: enabling irq 40
[2013-04-30 23:31:19 2457] ERROR (XendDomainInfo:2927) XendDomainInfo.initDomain: exception occurred
Traceback (most recent call last):
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2914, in _initDomain
    self._createDevices()
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2395, in _createDevices
    self.pci_device_configure_boot()
  File "/usr/lib/xen-4.1/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.1/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.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2326, in _createDevice
    return self.getDeviceController(deviceClass).createDevice(devConfig)
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/server/DevController.py", line 67, in createDevice
    self.setupDevice(config)
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/server/pciif.py", line 453, in setupDevice
    self.setupOneDevice(d)
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/server/pciif.py", line 353, in setupOneDevice
    allow_access = True)
Error: (22, 'Invalid argument')
[2013-04-30 23:31:19 2457] ERROR (XendDomainInfo:488) VM start failed
Traceback (most recent call last):
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 474, in start
    XendTask.log_progress(31, 60, self._initDomain)
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendTask.py", line 209, in log_progress
    retval = func(*args, **kwds)
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2930, in _initDomain
    raise VmError(str(exn))
VmError: (22, 'Invalid argument')
[2013-04-30 23:31:19 2457] DEBUG (XendDomainInfo:3071) XendDomainInfo.destroy: domid=2
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2401) Destroying device model
[2013-04-30 23:31:23 2457] INFO (image:615) win7 device model terminated
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2408) Releasing devices
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2414) Removing vif/0
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vif, device = vif/0
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2414) Removing vbd/768
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/768
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2414) Removing vbd/832
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/832
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2414) Removing vbd/5632
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/5632
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2414) Removing vfb/0
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vfb, device = vfb/0
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2406) No device model
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2408) Releasing devices
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2414) Removing vif/0
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vif, device = vif/0
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2414) Removing vbd/768
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/768
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2414) Removing vbd/832
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/832
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:2414) Removing vbd/5632
[2013-04-30 23:31:23 2457] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/5632
[2013-04-30 23:31:23 2457] ERROR (XendDomainInfo:108) Domain construction failed
Traceback (most recent call last):
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 106, in create
    vm.start()
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 474, in start
    XendTask.log_progress(31, 60, self._initDomain)
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendTask.py", line 209, in log_progress
    retval = func(*args, **kwds)
  File "/usr/lib/xen-4.1/bin/../lib/python/xen/xend/XendDomainInfo.py", line 2930, in _initDomain
    raise VmError(str(exn))
VmError: (22, 'Invalid argument')


I don't have the time now to investigate.

So, I downgraded the packages that were upgraded and all is well now. I've put up a warning and list of affected packages in the beginning of the how-to.

This is the first time a Xen upgrade broke something.

If someone has the time to look at the log and come up with a suggestion, I'll appreciate.
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby Locuust on Tue Apr 30, 2013 7:12 pm

In the last line of the first trace the error is from "pciif.py" and the function names suggest it's trying to create a emulated device. My guess is that it's complaining about your network line in the DomU config file ("vif="). Do you perhaps have a model name specified that has been deprecated? Just a wild guess. I haven't looked at this stuff for a while.
Locuust
Level 3
Level 3
 
Posts: 156
Joined: Thu Oct 02, 2008 4:54 pm

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

Postby powerhouse on Tue Apr 30, 2013 10:56 pm

Locuust wrote:In the last line of the first trace the error is from "pciif.py" and the function names suggest it's trying to create a emulated device. My guess is that it's complaining about your network line in the DomU config file ("vif="). Do you perhaps have a model name specified that has been deprecated? Just a wild guess. I haven't looked at this stuff for a while.


It doesn't seem to be related to vif.

pciif.py handles the PCI devices. In fact, my qemu-dm-win7.log file stops right here:
Code: Select all
...
register_real_device: Real physical device 02:00.0 registered successfuly!
IRQ type = MSI-INTx


With the working xen release (the previous one), this continues like here:
Code: Select all
...
register_real_device: Real physical device 02:00.0 registered successfuly!
IRQ type = MSI-INTx
dm-command: hot insert pass-through pci dev
register_real_device: Assigning real physical device 02:00.1 ...
register_real_device: Enable MSI translation via per device option
register_real_device: Enable power management
...


I've located the pciif.py script under /usr/lib/xen-4.1/lib/python/xen/xend/server but since I rolled back the line numbers in the log file are meaningless. I need to download the newer pciif.py file to see exactly where it hangs.
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby Dez on Wed May 01, 2013 4:17 am

There might be somthing in this:

http://www.novell.com/support/kb/doc.php?id=7012337

Add "iommu=no-intremap" into the grub file?

Unfortunately I can't try it until the weekend.
Dez
Level 1
Level 1
 
Posts: 5
Joined: Wed May 01, 2013 4:09 am

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

Postby powerhouse on Thu May 02, 2013 4:14 pm

Dez wrote:There might be somthing in this:

http://www.novell.com/support/kb/doc.php?id=7012337

Add "iommu=no-intremap" into the grub file?

Unfortunately I can't try it until the weekend.


Thanks for the link and the suggestion. I tried it and it didn't work for me. In the meantime I also upgraded the kernel to 3.5.0-28-generic. Still, the iommu=no-intremap option didn't help.

Note that the Novell / Suse Linux suggestion (your link) refers to an old 3.0.58 Linux kernel.

Fortunately it's relatively easy to downgrade to the previous (working) Xen version.

EDIT: I had brief look at the python source code of both pciif.py as well as XendDomainInfo.py, both of which are mentioned in the log, but I can't make anything of it. Need to check if a bug is filed, or perhaps look at the changes.
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby Dez on Fri May 03, 2013 1:31 am

powerhouse wrote: Still, the iommu=no-intremap option didn't help.


I'm sorry it didn't work.

I had brief look at the python source code of both pciif.py


I think you might be on the right track. It seems others have got it working
by editing their pciif.py and ordering their passthrough list:

http://www.gossamer-threads.com/lists/xen/users/280819
Dez
Level 1
Level 1
 
Posts: 5
Joined: Wed May 01, 2013 4:09 am

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

Postby powerhouse on Fri May 03, 2013 5:52 am

Dez wrote:
powerhouse wrote: Still, the iommu=no-intremap option didn't help.


I'm sorry it didn't work.

I had brief look at the python source code of both pciif.py


I think you might be on the right track. It seems others have got it working
by editing their pciif.py and ordering their passthrough list:

http://www.gossamer-threads.com/lists/xen/users/280819


Thanks, this is it. I also had a look at the xen-dev mailing list and the bug is filed under both Xen 4.2.1 and 4.1.3, that is if it's really the same bug. It looks like they are working on it.

Right now I suggest to everyone trying this how-to to just downgrade (or not upgrade) the Xen hypervisor and some related packages, which are listed on page one near the top of the first post.
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby powerhouse on Mon May 06, 2013 1:56 pm

I've written backup and restore scripts to backup/restore the Windows guest (or any other guest). You'll find them here: http://forums.linuxmint.com/viewtopic.php?f=42&t=133089.

Hope that they are useful.
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby mantisghost on Sat May 18, 2013 8:04 pm

Ok so here I am again. Sadly I had to switch to ubuntu as linux Mint had issues with pci soundcards (in ubuntu they work ok). Of course I did try to make them work with no suceed, other guys did help and nothing. Soundblaster pci 128 and cmedia was recgonized but no sound in Mint. Also something did happen with X server as it started to panic by itself. That was second issue in Mint and it seems to be something with UEFI. Now I would switch to Fedora but sadly Fedora is so pesky linux distro that UEFI is its main enemy. No matter what I did I could not force fedora to work with grub and people using it are not friendly at all so they did not help thats why I gave up. In the end I'm on ubuntu still trying to make passthrough work.

Nice thing is that ubuntu installer have easy way to make lvm. You just mark a birdie in installer. Other than that the steps are the same as in this how to for linux mint 14 with some exceptions:
1. xen tools:

Code: Select all
ln -s /usr/lib/xen-4.2 /usr/lib/xen-default

As it uses 4.2 instead of 4.1

2. Ubuntu have xen 4.2 in distros (yay!) but xm does not work in it giving an error 22

Solution in my case:
edit file /etc/default/xen and change TOOLSTACK= to TOOLSTACK=xl
This makes xen use xl instead of xm after this vm works nice

3. Second thing to do with xen 4.2 are some changes in .cfg files. In mine its:

Code: Select all
disk = [ '/dev/mapper/guest-win7,raw,hda,rw']

xen 4.2 seems to no more use phy: and have different sets at the end etc: rw, raw

After this machine with vga passthrought runs fine when using: xl create .../conf_file_name.cfg

I know its a bit offtopic but maybe someone will find it helpfull

Also in Mint as in Ubuntu I have strange issues:
Windows 8 have vga passthrought correct way it shows at the screen plugged to radeon vga card
Windows 7 works only with VNC no idea why (the one I did show on movie was test system that was not activated and in english. Now I try use original (legit) one in my native language)
mantisghost
Level 1
Level 1
 
Posts: 8
Joined: Sat Apr 20, 2013 3:20 pm

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

Postby powerhouse on Sun May 19, 2013 4:03 am

@mantisghost: Thanks for posting your feedback - I don't think it's off-topic at all. Some comments:

1. I gather you installed Ubuntu 13.04 ?
2. They just released Linux Mint 15 (an RC version, but a final release should be available by the end of the month) which is based on Ubuntu 13.04.
3. LM 15 includes LVM in the installer !!! This is good news as it makes the "How-to install Linux Mint on LVM" obsolete and significantly shortens the installation process. I haven't tested it though. (I'm running LM 15 as a domU now.)
4. LM 15 comes with Xen 4.2 too.
5. Once the final LM15 release becomes available, I hope to find the time to try it out and (re-)write a how-to. It should be shorter than this one.

Sound card problems: There may be minor differences between Linux Mint and Ubuntu when comparing the same releases (i.e. LM 14 with Ubuntu 12.10), but with regard to your sound card issue I believe that your success with Ubuntu can be attributed to the newer kernel, Xen hypervisor, etc., or perhaps to the different DE. If Ubuntu works for you and you don't have a pressing reason to change to LM, I wouldn't touch a running system. And if you miss the look&feel of Linux Mint, I suppose you can install Mate or Cinnamon as DE.

With regard to Fedora, it was one of the first distros I tried with Xen since I found this excellent guide here: http://www.overclock.net/t/1205216/guide-create-a-gaming-virtual-machine. But my unfamiliarity with Redhat/Fedora and the need for manual tweaking to get some basic features (like video codecs) made me soon give up on it. What can I say, I like Linux Mint, which is why I was persistent to get it working :D (not that it was that difficult) and wrote the how-to in the hope others would find it useful.

About Windows 7 versus Windows 8: Some xm (xend) based guides mention that the two have slightly different settings in the guest config file. Perhaps you find some clues in the guide I mentioned above (see link), or when you search the Internet.
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: 649
Joined: Thu May 03, 2012 3:54 am

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

Postby mantisghost on Sun May 19, 2013 5:06 am

Yes I do use Ubuntu 13.04 now. Sadly still did not made it work. Today after restating my pc the vm's no longer work as they shoul. I can start them fine but they wont appear on screen connected to radeon and connecting via VNC leaves me with white window. Nasty stuff so still workning for solution. Who knows maybe its xen 4.2 issue and I will need to go back to xen 4.1. By the way did you try to use KVM? I did heard its faster than xen. I presonally did try to make it work with KVM but it did fail (probably insufficent knowelge ^^ ).
mantisghost
Level 1
Level 1
 
Posts: 8
Joined: Sat Apr 20, 2013 3:20 pm

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 10 guests