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

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
odtech

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

Post by odtech »

Me, bridge-utils and network manager had a big ol battle royal yesterday.
Mint 18.1 does not like it if you uninstall network-manager. Cinnamon would just crash back to the login screen even after all changes were reverted. As a last resort i purged cinnamon and reinstalled it to get back onto my desktop environment.

I ended following this very simple guide to set up a bridge using network-manager. I did not add anything network related in my VM script. The result was a bridged network between Mint and Windows 10.
http://ask.xmodulo.com/configure-linux- ... buntu.html
davidem

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

Post by davidem »

odtech wrote:...
Mint 18.1 does not like it if you uninstall network-manager...
I came to the same conclusion. My solution was a complete reinstall (barely started and with the new nvme-ssd it's done in an instant) and permanently disabling network-manager. I dislike the tool pretty much :wink:
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

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

Post by powerhouse »

davidem wrote:
odtech wrote:...
Mint 18.1 does not like it if you uninstall network-manager...
I came to the same conclusion. My solution was a complete reinstall (barely started and with the new nvme-ssd it's done in an instant) and permanently disabling network-manager. I dislike the tool pretty much :wink:
Thanks davidem and odtech!

I edited the tutorial and gave instructions on how to disable network manager. Although I managed to rid myself of NM, disabling it seems to be the wiser option.
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
odtech

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

Post by odtech »

Another issue i encountered was slow and stuttering sound aka "demonic sound" when i tried using my NVIDIA GPU audo via HDMI.
Found the fix in this thread, might be good to add it in the troubleshoot section. It is done on the windows side and has to do with interrupts.
http://forums.guru3d.com/showthread.php?t=378044
davidem

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

Post by davidem »

odtech wrote:Another issue i encountered was slow and stuttering sound aka "demonic sound" when i tried using my NVIDIA GPU audo via HDMI.
Found the fix in this thread, might be good to add it in the troubleshoot section. It is done on the windows side and has to do with interrupts.
http://forums.guru3d.com/showthread.php?t=378044
I actually followed this exact instruction, and it helped a bit in the beginning(sound of Ryse: son of Rome was normal, sound of Skyrim was still alien like), but after a few hours all sound was still as demonic as before. So it might help, but in my case it didn't. The new dedicated soundcard on the other hand works like a charm.
davidem

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

Post by davidem »

I have a strange situation: the past few days my system crashes/reboots when I run a heavy-duty game on the Windows VM. Linux logs show nothing, no hint as to why it decided to reboot. I installed linux-crashdump to see if a next crash might reveal something. I also started to log CPU and motherboard temperatures to see if perhaps the CPU became too hot, but yesterdays crash showed it did NOT became hotter than 65 Celcius.

I know this is not the actual place to search for the root-cause of a crash, but I was wondering if any of you experienced something similar :)

/edit: added the word "NOT", as it didn't come above 65 degrees :)
Last edited by davidem on Tue Mar 07, 2017 4:23 am, edited 1 time in total.
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

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

Post by powerhouse »

odtech wrote:Another issue i encountered was slow and stuttering sound aka "demonic sound" when i tried using my NVIDIA GPU audo via HDMI.
Found the fix in this thread, might be good to add it in the troubleshoot section. It is done on the windows side and has to do with interrupts.
http://forums.guru3d.com/showthread.php?t=378044
I also use MSI, but each one has to check if it works or not. It may cause problems.
I consider adding this to the trouble shooting section.
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

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

Post by powerhouse »

davidem wrote:I have a strange situation: the past few days my system crashes/reboots when I run a heavy-duty game on the Windows VM. Linux logs show nothing, no hint as to why it decided to reboot. I installed linux-crashdump to see if a next crash might reveal something. I also started to log CPU and motherboard temperatures to see if perhaps the CPU became too hot, but yesterdays crash showed it did became hotter than 65 Celcius.

I know this is not the actual place to search for the root-cause of a crash, but I was wondering if any of you experienced something similar :)
There are many possible reasons for the crash, one of which could be overheating. To check if your hardware and cooling is up to the task, run a stress test. I would also do that with the memory (running prolonged memory tests). After I had built my system, I had the strangest errors. It turned out the memory wasn't a good match, but it took the PC lab nearly a month of stress testing and replacing memory sticks to finally get a stable system.
Hardware problems are relatively easy to solve. Just hope it's not software.
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
davidem

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

Post by davidem »

I made a bad typo: it did NOT ran hotter than 65 degrees :P During stress tests (with stress -c 8, for example) CPU temperature almost hit 80 C, so overheating wasn't the problem. I ran extensive memory tests (with memtest86+), also no issues found. And ever since I ran updates, I'm no longer able to reproduce the crash... That's fortunate as well as worrisome :wink:
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

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

Post by powerhouse »

davidem wrote:I made a bad typo: it did NOT ran hotter than 65 degrees :P During stress tests (with stress -c 8, for example) CPU temperature almost hit 80 C, so overheating wasn't the problem. I ran extensive memory tests (with memtest86+), also no issues found. And ever since I ran updates, I'm no longer able to reproduce the crash... That's fortunate as well as worrisome :wink:
I am running stress -c 12 (for my 6-core / 12 thread CPU) right now. It's been running for the last 3 hours and individual core temperatures do NOT exceed 61C. On average they are around 57C. You can find the specs of my rig below.

80C is a little high, but within the recommended max limit. For more on CPU temperatures and recommendations, have a look here: http://www.tomshardware.com/forum/id-18 ... guide.html.

Have you applied the following?:

Code: Select all

echo "options kvm ignore_msrs=1" >> /etc/modprobe.d/kvm.conf
That is needed to prevent Passmark from crashing the VM, but it may be relevant for other applications too.

If your PC passed the stress tests and memory tests, the temperatures are not too high, and you can't reproduce the crash, chances are it's OK. In case it happens again, you may have to check the configuration and command options for qemu, or your Windows configuration.
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
odtech

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

Post by odtech »

davidem wrote:I made a bad typo: it did NOT ran hotter than 65 degrees :P During stress tests (with stress -c 8, for example) CPU temperature almost hit 80 C, so overheating wasn't the problem. I ran extensive memory tests (with memtest86+), also no issues found. And ever since I ran updates, I'm no longer able to reproduce the crash... That's fortunate as well as worrisome :wink:
The only comment i can add is the instability i had when i tried to pass through network adapters.
davidem

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

Post by davidem »

I cheered too soon :roll: , but I think I've found the problem: the fan of the PSU wasn't running, causing the PSU to overheat and force a reset. So, I'll have to return it and wait... :shock:
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

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

Post by powerhouse »

davidem wrote:I cheered too soon :roll: , but I think I've found the problem: the fan of the PSU wasn't running, causing the PSU to overheat and force a reset. So, I'll have to return it and wait... :shock:
That's good news! Better a simple hardware failure than some software or configuration issue. Too bad you need to wait for repair or replacement.
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
JagR35

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

Post by JagR35 »

Hello all,

I've been following the guide for a little while now as I'm, obviously, trying to setup a Windows 10 VM in Mint for Windows gaming purposes :D. It's a little project that I'm hoping will get my hands a bit dirty with the OS as currently I am a noobie with advanced Linux concepts.

All was well until I got to the second half of Part 4. I've copy/pasted the configuration in the guide and transferred my ip and other info over. Added the bridge. Restarted the network service....and got an error produced the following error reports:

Image
( ^ excuse my general derpyness here ^ )
Image
Image

And I don't get a connection after that.

I honestly don't know what I'm looking at here. Please help.
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

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

Post by powerhouse »

@Jagr...:

Please post your /etc/network/interfaces file. I'm currently "on the road" but hope to be able to answer later today.

Edit: Have you tried to reboot and see if this works?

Also post the output of

Code: Select all

brctl show
and

Code: Select all

ifconfig
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
JagR35

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

Post by JagR35 »

Yes I've tried restarting the machine and unfortunately it hasn't worked yet.

Here is what is in the /etc/network/interfaces file looks like
Image

What ifconfig outputs
Image
and what brctl show outputs
Image
davidem

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

Post by davidem »

Hi JagR35,

I'm a bit confused about your screenshots:
- In the first ones, you try to bring up 'br0`, in the latter ones the name of the bridge is 'xenbr0'
- Your interfaces file shows you're behind a router (your gateway address in your interfaces file: 192.168.0.1), but the IP address of the systems is a non-local one (163.118.156.172). With local I mean 10.x.x.x, 172.16/31.x.x or 192.168.x.x). In order to achieve this, I'd expect special routing settings to reach your routerfrom this address. This might explain why you're not able to contact the ubuntu ntp addresses (your last screenshot). Please show "netstat -rn" or "route" if this is done on purpose and show your routing setup. If not, please choose a local IP address and adjust the interfaces file.

If you erroneously added br0 instead of xenbr0, please remove it first, then add xenbr0. And if you double-checked the ip-addresses in the interfaces file is correct; here are the commands to redo all steps:

Code: Select all

systemctl stop NetworkManager.service
brctl delbr br0
brctl addbr xenbr0
service networking restart
ifconfig
sudo systemctl disable NetworkManager.service
Cheers,

David

ps. the new PSU works well and I'm back in business :)
bash64
Level 3
Level 3
Posts: 116
Joined: Mon Mar 23, 2015 12:19 am

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

Post by bash64 »

Hello,

My qemu system is running good thanks to your article.
I was wondering if you have tried windows 7 using uefi yet.
I'd like to know if there is any performance improvement.
And do you have any instructions for that?
:D
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

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

Post by powerhouse »

@JagR: I think David is on the right track. Can you let us know if and how you solved the issue?
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

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

Post by powerhouse »

bash64 wrote:Hello,

My qemu system is running good thanks to your article.
I was wondering if you have tried windows 7 using uefi yet.
I'd like to know if there is any performance improvement.
And do you have any instructions for that?
:D
I actually wanted to run Windows 7 using UEFI, but this turned out to be not so easy. Windows 7 doesn't (didn't ?) have an UEFI bootable image file (ISO), as UEFI was added to Win7 in an update.

I haven't managed to create a Windows 7 image that would boot in UEFI mode and install as well in UEFI, which is why I switched to Windows 10. The latter was really easy to install.

You could try to find a Win7 UEFI ISO, I simply don't know if that exists (now).
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
Locked

Return to “Virtual Machines”