how to make Proxmox use video card for VMs (shared) instead of motherboard VGA

jaytee129

Member
Jun 16, 2022
142
10
23
How does Proxmox decide what VGA device to use for itself and VMs when there's more than one available, and how can I tell what it's using?

If I wanted to make sure Proxmox shared a PCIe video card (Nvidia) with all VMs instead of the onboard VGA from mb, do I need to blacklist the driver ("ast" according to lspci), or can I just tell proxmox to use on-board vga for itself and the Nvidia for all VMs, or even better on a per VM basis?

Ideally I'd like to be able to tell proxmox to use the nvidia card if it is available and, if that fails, use mb VGA as it would add redundancy in case the card fails one day (it's already got a few years under its belt whereas th mb is 3 months old).

i.e. here's what I would do if the only way was to blacklist the mb VGA driver. I didn't just try it for fear I might not be able to shell into Proxmox after.

Code:
nano /etc/modprobe.d/blacklist.conf
blacklist ast

update-initramfs -u

Here's the output of lspci -v for both:

Supermicro built-in VGA

44:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 41) (prog-if 00 [VGA controller])
DeviceName: ASPEED Video AST2500
Subsystem: Super Micro Computer Inc ASPEED Graphics Family
Flags: medium devsel, IRQ 270, IOMMU group 48
Memory at b0000000 (32-bit, non-prefetchable) [size=16M]
Memory at b1000000 (32-bit, non-prefetchable) [size=128K]
I/O ports at 6000
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/2 Maskable- 64bit+
Kernel driver in use: ast
Kernel modules: ast

-----------------------
NVIDIA GT 710

c2:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. [MSI] GK208B [GeForce GT 710]
Flags: bus master, fast devsel, latency 0, IRQ 274, IOMMU group 2
Memory at b6000000 (32-bit, non-prefetchable) [size=16M]
Memory at 18008000000 (64-bit, prefetchable) [size=128M]
Memory at 18010000000 (64-bit, prefetchable) [size=32M]
I/O ports at e000
Expansion ROM at b7000000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Legacy Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [128] Power Budgeting <?>
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
Kernel driver in use: nouveau
Kernel modules: nvidiafb, nouveau

 
This sounds an unusual use of Proxmox ! it doesn't really use the console except for installing - it uses the web interface for management. If your hardware supports it, I guess it might be possible to use PCI-Passthrough to connect a video card directly to a VM. You could access graphical VMs remotely using VNC or RDP or the VM console in the Proxmox management interface using a web browser.

Phil.
 
You can only 'pass-through' a physical video card to a single active VM at a time (in general, there are some very expensive cards that can be shared) If you're not using hardware pass-through, the VM uses emulated video hardware - it doesn't matter what video cards are physically present in the system.
 
Last edited:
Sometimes you find an option in the BIOS/UEFI where you can tell if the onboard GPU or PCIe GPU should be used as your primary GPU that is used when booting.
 
Sorry, looks like I didn't explain things very well. Unless I'm misunderstanding something, and all my VMs need some kind of GPU if I want to use the GUI and GUI programs they come with, e.g. Windows, Gnome, Office s/w, etc. Some may also use the GPU for some processing behind the scenes. For those I'm thinking I want to use the nvidia graphics card since it has more processing power than the on-board GPU, which I assume is what proxmox uses and shares with all my VMs for these purposes (but I don't know how to tell)

Also, doesn't proxmox need a GPU so I can shell into it, i.e. to display the characters on the screen? Sure I mostly use webgui but I also open a shell all the time to do some command line stuff.

Finally, I'm not trying to passthrough this video card to any single VM because then it would only be usable by that one VM. I have 2 other graphics card I passthrough to VMs. This one is for general/shared use with everything else.
 
By default, all hardware, including the GPU is emulated in the VM. So you could have two hosts with same spec except that one has a basic GPU and the other has some kind of mega-performance GPU but a VM running on either host will have the same GPU performance, ok for general use but not good for video or gaming. This is why it's so common to do GPU pass-through, to get decent GPU performance in a VM. You can pass-through to multiple VM's but you can't have more than one of them powered on at any one time. There are some cards around that provide multiple virtual GPU's for what you seem to be after but they're far too expensive for most people.
 
oh, I see now. so I could have no GPU anywhere in my system and still have full video functionality, albeit pretty vanilla, for all my Windows VMs. If that's the case, then I will assign the card to one of my VMs.
Thanks.
 
[implied] multiple copies of Windoze on one box ? You need to be very careful to stay legal with your Windows licensing !
:-)
 
oh, I see now. so I could have no GPU anywhere in my system and still have full video functionality, albeit pretty vanilla, for all my Windows VMs. If that's the case, then I will assign the card to one of my VMs.
Thanks.
In case you don't passthrough a GPU all graphics will be rendered in software by your CPU. So yes, you don't need a GPU to have a GUI for your VMs but even the easiest tasks like visiting a website without a ad-blocker might be problematic, as all those advertisement videos will be decoded by your CPU leaving no CPU power left for all the stuff you actually want your CPU for.
 
where can i find the latest guide on pass a physical GPU to a VM and/or CT ?
 
thanks for sharing the above resource @Dunuin

reviewed the wiki and stalled where i am unable to figure out if the same instructions work, when i want to passthrough / use the GPUs in my Container LXC CT ubuntu 22.04 -- please help
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!