Last active
March 26, 2025 11:55
-
-
Save aaronedev/86f96f0b62bd2530b91b5f4ef4ff5107 to your computer and use it in GitHub Desktop.
qemu run ubuntu + use venus kvm libguestfs video accelaration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ISO=ubuntu-24.10-desktop-amd64.iso | |
IMG=ubuntu-24-10.qcow2 | |
if [ ! -f "$ISO" ]; then | |
wget https://releases.ubuntu.com/oracular/$ISO | |
fi | |
if [ ! -f "$IMG" ]; then | |
qemu-img create -f qcow2 $IMG 16G | |
fi | |
qemu-system-x86_64 \ | |
-enable-kvm \ | |
-M q35 \ | |
-smp 4 \ | |
-m 4G \ | |
-cpu host \ | |
-net nic,model=virtio \ | |
-net user,hostfwd=tcp::2222-:22 \ | |
-device virtio-vga-gl,hostmem=4G,blob=true,venus=true \ | |
-vga none \ | |
-display gtk,gl=on,show-cursor=on \ | |
-usb -device usb-tablet \ | |
-object memory-backend-memfd,id=mem1,size=4G \ | |
-machine memory-backend=mem1 \ | |
-hda $IMG \ | |
-cdrom $ISO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment