tenclass / mvisor

A mini x86 hypervisor
GNU General Public License v3.0
200 stars 45 forks source link

VGPU support in Ubuntu 24.04 #36

Open zeitue opened 1 month ago

zeitue commented 1 month ago

How to enable the VGPU support in Ubuntu virtual machine? My host is also Ubuntu 24.04. My GPU is a Radeon RX 6600 I built this using:

sudo apt install -y meson gdb cmake build-essential g++ acpica-tools
sudo apt install -y protobuf-compiler libprotobuf-dev libglib2.0-dev libyaml-cpp-dev libpixman-1-dev libzstd-dev zlib1g-dev
sudo apt install -y libsdl2-dev libasound2-dev
meson setup build -Dsdl=true -Dvgpu=true
meson compile -C build

I then created a data directory and downloaded the latest Ubuntu 24.04 to it. My configuration is pretty much the sample config with some extras turned on

name: Default configuration
base: q35.yaml

machine:
  memory: 8G
  vcpu: 4
  priority: 1
  debug: No
  hypervisor: Yes

objects:
  - name: cmos
    rtc: localtime

  - class: qxl
  - class: spice-agent
  - class: usb-tablet

  - class: virtio-network
    mac: 00:50:00:11:22:33
    map: tcp:0.0.0.0:8022-:22

  - class: ata-cdrom
    image: data/ubuntu-24.04-desktop-amd64.iso
  - class: ata-cdrom
    image: data/virtio-win.iso

  - class: ata-disk
    image: data/disk.qcow2
    snapshot: No

  - class: virtio-vgpu
    memory: 1G
    staging: No
    blob: No
    node: /dev/dri/renderD128

  - class: virtio-cuda
    memory: 1G
    gpu_memory: 8G
    visible_gpus: GPU-0
nooodles2023 commented 1 month ago

Vgpu was not supported on linux guest yet, it only works on windows guest with mvisor-win-vgpu-driver. The virtio-cuda device has been tested in our test env, and it has not been published yet.

zeitue commented 1 week ago

Thanks for the information

bondlei commented 2 days ago

Vgpu was not supported on linux guest yet, it only works on windows guest with mvisor-win-vgpu-driver. The virtio-cuda device has been tested in our test env, and it has not been published yet.

when to published?