Linux/macOS VM - GPU Pass-through


Recommended Posts

Question about GPU passthrough and acceleration.  My Unraid server is currently running in a rack in my basement.  I access it headlessly, where it runs plex, some windows VMs, and other assorting things.  I have a macOS Catalina VM, and a few linux VMs as well, that frankly, don't have that good of performance, vs when I run them in VMWare Workstation on my laptop.  I bought a couple of nvidia GPUs to use for the VMs, but now I'm realizing I think I made a mistake.

 

I use RealVNC Server/Viewer to access the macOS and Linux VMs today, and RDP for the Windows VMs.  

 

I'd like to use GPU acceleration for the macOS and Linux VMs, but still access them through VNC Viewer or xRDP, not directly connect a monitor to the VM, as this isn't physically possible.

 

Is it possibly to hardware accelerate the linux and macOS VMs, and still remotely access the VMs, or do you have to use a phycially connected monitor for access with GPU passthrough.

 

When I pass the GPU and sound through to the linux VM, and then try and connect to VNC viewer, i get an error saying it "Cannot currently show the desktop."

 

Thank you.

Link to comment
49 minutes ago, Mason736 said:

Is it possibly to hardware accelerate the linux and macOS VMs, and still remotely access the VMs, or do you have to use a phycially connected monitor for access with GPU passthrough.

Yes but not with the Unraid built-in VNC adapter (which has never worked for me concurrent with a GPU passed through).

 

What you need is to use an alternative (free) remote desktop software.

For example, Ubuntu has the screen-sharing feature which is actually just a VNC server so can be accessed with any VNC viewer app.

For Mac, I have found NoMachine to work really well.

 

NoMachine was my go-to cross-platform remote desktop software actually before I quit Mac VM altogether.

Edited by testdasi
Link to comment
9 minutes ago, Mason736 said:

I tried using VNC Viewer on Elementary OS.  Installed VNC Server.  I can connect just fine with VNC Viewer without passing through the GPU.  After I pass it through, VNC Viewer will no longer connect, giving the error "Cannont currently show the desktop.".

Try another software.

Link to comment
  • 5 weeks later...

@Mason736:

  1. Boot up your Catalina VM.
  2. Press 'Esc' key to get into the OVMF BIOS.
  3. Change the resolution to your liking.
  4. Make sure you have a remote desktop client installed e.g., Nomachine, Splashtop.
  5. Highly recommended that you enable auto login as Nomachine won't be able to initialize the display until logging in.

 

Edited by Zer0Nin3r
Found the solution via Reddit (of all places)
Link to comment
  • 6 months later...
On 4/18/2020 at 3:19 PM, Zer0Nin3r said:

Highly recommended that you enable auto login as Nomachine won't be able to initialize the display until logging in.

 

@Zer0Nin3r Question on this. Is there a way to remotely access the VM (i.e. via Splashtop) if I am passing a discrete graphics card into the VM and not using VNC?

 

I followed spaceinvaderone's video and set up a high sierra VM. The VM boots into the clover bootloader screen and it requires input, pressing enter at the screen to start the Mac bootup process. Not sure how to provide that input at the bootloader screen without VNC on unraid.

Link to comment
2 hours ago, bastl said:

@abhi.ko As long as the OS isn't fully loaded no tools like Splashtop or Teamviewer will work. Easiest way is to passthrough a USB keyboard (wireless won't work).

Great, that makes sense. Will pass through a keyboard and hit enter blindly on the bootloader. Will have to enable auto login as well I assume, and then onwards splash top should be able to use my main system (Win10) keyboard and mouse, right? 

 

Better solution - Is there anyway to pass an argument to the bootloader file to boot up into High Sierra automatically (there isn't another OS option) without prompting for user input? 

Edited by abhi.ko
Link to comment
2 hours ago, jonathanm said:

 

Why can't you see the output on the monitor plugged into the graphics card?

Thanks, my bad I should have made it more clear. I can connect a monitor and get to it in close proximity to the server, but the question is, whether there is a way to connect remotely from another computer (not in the server room/closet) and still use the GPU passed through. Thought Splashtop would work for this (I might be wrong). But the bootloader requiring input is a stumbling block. Hope the question makes sense. 

Link to comment
7 minutes ago, abhi.ko said:

whether there is a way to connect remotely from another computer (not in the server room/closet) and still use the GPU passed through.

Some combinations require a valid display to be connected to the graphics card in order for the card to work. If you get past the bootloader issue, you may still need a dummy monitor plug. I'd leave the monitor connected until you get to that point.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.