[HowTo] Tips and tricks for running virtualized Manjaro

Difficulty: ★☆☆☆☆

Sometimes you run into the unfortunate situation where you can’t run Linux on bare metal, and have to resort to virtualization. There are many options to choose from. Compared to VirtualBox, VMware usually offers a little better performance, and integrations with the host system (shared clipboard, shared folders, drag and drop) work slightly better.

However, with Manjaro VMware has one maddening issue: the virtual machine screen size doesn’t autofit the host OS window size. That forces you to choose between annoying scroll bars, stretched screen with wrong dimensions or some wasted screen space.

To get the auto-resize to work, you have two options:

  1. After every reboot, run the command

    sudo systemctl restart vmtoolsd
    

    Just enabling the service does not work. If you want the above to happen automatically, you can put it into your desktop autostart. You need to setup your sudoers file so that you can run this one command with sudo without password. This is a dirty hack, so it will not be covered here at length.

  2. The actual solution: use Wayland. The bug happens because VMware doesn’t like the newer versions of Xorg, so using Wayland bypasses the issue altogether. This obviously requires you to use gnome, sway, or some other Wayland based environment. Gnome-layout-switcher has a simple toggle to enable Wayland, so just click that and input your password. As a bonus, Wayland clients have much better performance in VMware than Xorg clients do.

If you clear this hurdle, then only one issue remains: Hot corners don’t work in VMware. Not even a little bit, and there seems not to be any solution to this.


[VirtualBox tips and tricks covered here later]
VirtualBox has the great advantage that it is possible to get the hot corners to work. To enable this, you need to disable the mouse integration. This also means that if you want your mouse to leave the VirtualBox window, you need to press right Ctrl to free it.


This is a Wiki post! Feel free to add your own virtualization tips and tricks here.

5 Likes

For me, to auto-resize my VMWare Guest, I prefer Option 3, though perhaps replacing the parentheses with double-quotes:

$ sudo nano /etc/mkinitcpio.conf
MODULES="vsock vmw_vsock_vmci_transport vmw_balloon vmw_vmci vmwgfx"

$ sudo mkinitcpio -P

Edit: Parentheses are the new standard.

2 Likes

If you experience graphical glitches, one thing to try is turning off 3-D Acceleration from the Host.

  • Open VMWare
  • Select your guest VM
  • Edit your virtual machine settings
  • Select Displlay
  • Un-check Accelerate 3D graphics
  • OK
1 Like