Skip to content

Instantly share code, notes, and snippets.

@k3karthic
Last active May 24, 2026 15:41
Show Gist options
  • Select an option

  • Save k3karthic/1ad1ce20c8248f2f553a73fd1b57d00d to your computer and use it in GitHub Desktop.

Select an option

Save k3karthic/1ad1ce20c8248f2f553a73fd1b57d00d to your computer and use it in GitHub Desktop.
Fedora Silverblue - VM

References

Step 1 : Install dependencies

sudo rpm-ostree install virt-manager qemu-kvm libvirt-daemon-kvm virt-top virt-install virt-viewer libvirt-daemon-config-network

Step 2 : Reboot

Step 3 : Verify kvm loaded

kkumaran@fedora:~$ lsmod | grep kvm
kvm_amd               258048  0
kvm                  1495040  1 kvm_amd
irqbypass              16384  1 kvm

Step 4 : Start and Enable libvirt

sudo systemctl enable --now libvirtd

Step 5 : Update polkit

root@fedora:/etc/polkit-1/rules.d# cd /etc/polkit-1/rules.d/
root@fedora:/etc/polkit-1/rules.d# ls -lah
total 4.0K
drwxr-x---. 1 root    polkitd  48 May 24 20:51 .
drwxr-xr-x. 1 root    root     42 May 24 02:21 ..
-rw-------. 1 polkitd polkitd 168 May 24 20:55 49-libvirt-ingroup.rules
root@fedora:/etc/polkit-1/rules.d# cat 49-libvirt-ingroup.rules 
polkit.addRule(function(action, subject) {
    if (action.id === "org.libvirt.unix.manage" && subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});

Make sure the file is owned by polkitd. Check the logs with journalctl -u polkit -n 20 --no-pager to make sure polkit read the new config.

Running virsh uri should show qemu://system without prompting for a password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment