src/content/blog/void-linux-virt-manager.mdx (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
--- title: 'Installing Virtual Machine Manager on Void Linux' description: 'This step-by-step tutorial shows you how to install and use Virtual Machine Manager.' date: 2024-04-22T17:44:49Z tags: ['void-linux', 'virtualization', 'qemu', 'how-to', 'tutorial'] authors: ['foggymtndrifter'] --- If you're a fellow Void Linux enthusiast like me, you know the thrill of a lean, customizable system. But sometimes, you might want to run other operating systems within your streamlined Void environment. That's where virtual machines (VMs) come to the rescue, and Virtual Machine Manager makes it super easy to set them up. In this guide, I'll walk you through the steps I took to get this working. ## Step 1: Installing the Essentials First, fire up your terminal and type: ```bash sudo xbps-install libvirt virt-manager qemu polkit ``` This gets us all the pieces we need – `libvirt` for virtualization magic, `virt-manager` for a friendly interface, `qemu` as our trusty emulator, and `polkit` for handling permissions. ## Step 2: Getting the Right Permissions We need to make sure our regular user account can play with virtual machines. Let's add ourselves to the `libvirt` and `kvm` groups: ```bash sudo usermod -a -G libvirt,kvm your_username ``` (Remember to replace `your_username`!) ## Step 3: A Quick Log Out and Back In Just to be sure the group changes stick, log out of your account and log back in. ## Step 4: A Tiny Bit of Configuration Let's setup a config file for libvirt so it knows what's up: ```bash mkdir ~/.config/libvirt && sudo cp -rv /etc/libvirt/libvirt.conf ~/.config/libvirt/ && sudo chown your_username: ~/.config/libvirt/libvirt.conf ``` ## Step 5: Tweaking libvirt Settings Open `~/.config/libvirt/libvirt.conf` in your favorite text editor and find the line that says `uri_default`. Change it to: ``` uri_default = "qemu:///system" ``` ## Step 6: QEMU Permissions Edit `/etc/libvirt/qemu.conf`, setting the `user` and `group` to match your username and `libvirt` respectively. This lets you manage the VMs you create. ## Step 7: Starting the Services Void Linux uses runit for services. Let's enable the ones we need: ```bash sudo ln -s /etc/sv/dbus /var/service/ sudo ln -s /etc/sv/polkitd /var/service/ sudo ln -s /etc/sv/libvirtd /var/service/ sudo ln -s /etc/sv/virtlockd /var/service/ sudo ln -s /etc/sv/virtlogd /var/service/ ``` ## Step 8: Launch Time! That's it! Go ahead, launch Virtual Machine Manager, and get ready to spin up new virtual worlds! --- ### Bonus Tip: Pump Up the Graphics Want smoother graphics in your VMs? Edit a VM's settings, go to "Video", select "Virtio", and check the "3D Acceleration" box. |