Last active
April 16, 2025 09:01
-
-
Save mirkobrombin/5c2745b54dd16b603d54dc72c341aa4b to your computer and use it in GitHub Desktop.
Running virt-manager on Vanilla OS via Distrobox
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
DBX_SUDO_PROGRAM=pkexec /usr/share/apx/distrobox/distrobox create \ | |
--pull \ | |
--root \ | |
--init \ | |
--unshare-all \ | |
--image ghcr.io/vanilla-os/pico:main \ | |
--name libvirtd \ | |
--additional-flags "-p 2222:22" \ | |
--init-hooks "apt update && apt install -y openssh-server libvirt-daemon-system libvirt-clients qemu-system qemu-utils virt-manager && systemctl enable ssh.service && systemctl enable libvirtd && usermod -aG libvirt $USER" | |
DBX_SUDO_PROGRAM=pkexec /usr/share/apx/distrobox/distrobox-enter --root libvirtd -- distrobox-export --app virt-manager |
This works great for those on OpenSUSE Aeon/Kalpa too (formerly MicroOS Desktop)
Modify the paths to distrobox then you're golden
DBX_SUDO_PROGRAM=pkexec /usr/bin/distrobox create \
--pull \
--root \
--init \
--unshare-all \
--image ghcr.io/vanilla-os/pico:main \
--name libvirtd \
--additional-flags "-p 2222:22" \
--init-hooks "apt update && apt install -y openssh-server libvirt-daemon-system libvirt-clients qemu-system qemu-utils virt-manager && systemctl enable ssh.service && systemctl enable libvirtd && usermod -aG libvirt $USER"
DBX_SUDO_PROGRAM=pkexec /usr/bin/distrobox-enter --root libvirtd -- distrobox-export --app virt-manager
I'd suggest using the vanilla-os image used here if you want usb redirection to work. I was unable to get that part working in a root tumbleweed distrobox, although I'm sure it's possible. But just follow the instructions @mirkobrombin listed in the above post.
I think for openSUSE pkexec is not necessary 🤔
I think for openSUSE pkexec is not necessary 🤔
You're right but distrobox will still prompt for root password via sudo anyway (since it's a root distrobox), so either works really.
Makes sense.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sharing USBs does not work? Someone got you covered: https://forums.opensuse.org/t/i-cant-redirect-usb-storage-media-to-the-kvm-guest-using-vmm-after-system-update/147319/4