Installing Manjaro as a virtual machine is just the first step towards a functional Linux environment. However, out of the box, the performance and usability of your newly installed Manjaro VM may fall short of expectations. Many users find themselves frustrated with sluggish responsiveness, limited functionality, and a subpar overall experience. This is where post-installation optimization becomes crucial.
In this step-by-step guide, we’ll walk you through the essential tweaks and configurations that are often overlooked but are vital for transforming your Manjaro VM into a smooth, responsive, and fully functional system. By following these instructions, you’ll address key issues like bash completion and guest agent setup, ensuring that your virtual Manjaro installation performs at its best, closely mimicking the experience of a native installation.
Fixing Bash Completion
First, let’s fix bash completion:
sudo pacman -S bash-completion
Close and open the terminal to continue.
Installing and Configuring QEMU Guest Agent
Install the QEMU guest agent:
sudo pacman -S qemu-guest-agent spice-vdagent
sudo systemctl enable spice-vdagent
sudo systemctl start spice-vdagent
Edit the service file:
sudo nano /usr/lib/systemd/system/qemu-guest-agent.service
Add these lines at the end:
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable --now qemu-guest-agent
Reboot and enjoy automatic screen resizing and copy/paste between host and guest.
Supplemental Information
The qemu-guest-agent.service file needs to be edited to add the [Install] section because:
- Without the [Install] section, the service cannot be enabled using systemctl
- The [Install] section specifies how the unit should be enabled, in this case by creating a symlink in the multi-user.target.wants directory
- Adding the [Install] section allows the service to be properly enabled and started automatically on system boot
- This modification ensures that the QEMU Guest Agent starts reliably when the VM boots, providing essential functionality like clipboard sharing and automatic display resizing
By appending the [Install] section with “WantedBy=multi-user.target”, we’re instructing systemd to start the qemu-guest-agent service as part of the normal system startup process, ensuring it’s always available when needed.