ROCM-QEMU-RUN(1)

πŸ“¦
version 0.9.8ubuntu2 Β· 3 versions
, in ubuntu stonking

πŸ’– ROCM-QEMU-RUN πŸ’–

okay so bestie, we're looking at rocm-qemu-run β€” she's a User Commands girlie, and she's here to boot you a whole amd64 QEMU VM. yep. a real one. periodt. πŸ‘‘


✨ NAME ✨

rocm-qemu-run β€” literally just rocm-qemu-run, that's the name, she said what she said πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Boot an amd64 QEMU VM straight to a console, passing through GPUs. iconic behaviour, honestly.

By default, all GPUs assigned to vfio-pci are passed through. wanna override that? use -g, and you can slap it on multiple times. [NOTE: multi-GPU is untested, and therefore disabled for now.] β€” yeah bestie, that's a whole thing, don't come for me πŸ™ˆ

The VM will boot an amd64 image in EFI mode. The EFIVARS file will be a clean copy at every boot. (so fresh, so clean ✨) The image will be writeable, so use qemu-img(1) to create a snapshot first if you'd like to be able to revert your changes. lowkey important, don't skip that part.

All [qemu options] are passed on to the QEMU command line, in case you want to add more configuration to the VM. she's flexible like that πŸ’β€β™€οΈ

This utility assumes that the invoking user has all the necessary permissions required in order to effectively and efficiently operate the VM, most notably that the user has access to /dev/kvm. When in doubt, try running the script as root.

πŸ‘‘ fr fr: if it's acting up, just try root. when in doubt, root it out.

πŸŽ€ Synopsis:

bin/rocm-qemu-run -h

bin/rocm-qemu-run [-c CPUs] [-d DIR ] [-g GPU] [-m MEM] [-p
SSHPORT] image [qemu options]

πŸ’… OPTIONS πŸ’…

  • -h β€” Show this help
  • -c CPUS β€” Number of guest CPUs (default: 75% of CPU cores)
  • -d DIR β€” Mount host dir DIR as /shared in the guest
  • -g GPU β€” PCI slot ID of GPU to pass through (eg: 09:00.0)
  • -m MEM β€” Guest RAM (default: 75% of memory)
  • -p SSHPORT β€” Forward host port PORT to guest port 22
  • -s β€” Boot the VM in snapshot mode (changes are discarded)

🌈 EXAMPLES 🌈

# Configure the system for GPU pass-through

$ rocm-qemu-setup -u <user>

# Create an image

$ sudo rocm-qemu-create unstable.img
$ sudo chown $USER: unstable.img

# Boot the image above to a console # This will pass through all
GPUs assigned to vfio-pci

$ bin/rocm-qemu-run unstable.img

# Like above, but use 4 CPUs and 8GB of RAM

$ bin/rocm-qemu-run -c 4 -m 8192 unstable.img

# Like above, but only pass through GPU 09:00.0

$ bin/rocm-qemu-run unstable.img -g 09:00.0

# Forward host port 10022 to guest port 22. Connect with: # ssh
-p 10022 -o CheckHostIP=no -o StrictHostKeyChecking=no
root@localhost

$ bin/rocm-qemu-run -p 10022 -d /some/host/dir unstable-amd64.img

# Snapshot mode (no changes to the image will be saved)

$ bin/rocm-qemu-run -s unstable.img

# Share host directory /tmp/foo # The directory will be mounted
at /shared within the guest

$ bin/rocm-qemu-run -d /tmp/foo unstable.img

that's the whole vibe check, bestie 🫢 go boot something gorgeous. this one's from debian, dated July 2026 β€” slay, happy virtualising, mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from