Installing Arch Linux in VMware (systemd)
This article describes how to get Archlinux running in a VMWare virtual machine when you're using systemd as SysV replacement.
Please install the open-vm-tools-modules from the Community repository.
Add the VMWare drivers to your mkinitcpio.conf:
... MODULES="vmblock vmxnet3 vmwgfx vmw_balloon vmci autofs4 vmhgfs" ...
Now you have to rebuild your kernel:
# depmod # mkinitcpio -p linux
The modules are responsible for:
- vmblock: Support for drag and drop operations between guest and host system
- vmxnet3: Driver for the virtual network adapter
- vmwgfx: Graphics driver
- vmw_balloon: From the source code of the driver: This is VMware physical memory management driver for Linux. The driver acts like a "balloon" that can be inflated to reclaim physical pages by reserving them in the guest and invalidating them in the monitor, freeing up the underlying machine pages so they can be allocated to other guests. The balloon can also be deflated to allow the guest to use more physical memory. Higher level policies can control the sizes of balloons in VMs in order to manage physical memory resources.
- vmci: The Virtual Machine Communication Interface (VMCI) is an infrastructure that provides fast and efficient communication between a virtual machine and the host operating system and between two or more virtual machines on the same host. The VMCI SDK facilitates development of applications that use the VMCI infrastructure. Without VMCI, virtual machines communicate with the host using the network layer. Using the network layer adds overhead to the communication. With VMCI communication overhead is minimal and different tasks that require that communication can be optimized. An internal network can transmit an average of slightly over 2Gbit/s using vmxnet3, VMCI can go up to nearly 10Gbit/s with 128k sized Queue pairs. (Configuring a Virtual Machine Communication Interface (VMCI) on a vSphere ESX host)
- vmhgfs: Driver for sharing files between guest and host.
These drivers are optional:
- vmsync: This seems to be a driver which offers a functionality similar to VSS on windows. This is used to create consistent backups of a virtual machine (Filesystem consistent Linux Backups with VMware). I'm not quite sure if this explanation is correct. Please update if you can explain it better. --BertiBoeller (talk) 12:44, 2 October 2012 (UTC)
In the following steps you have to create some systemd scripts so that the vmblock driver can be used successfully.
Create the following files:
# creates the directory which is used by the vmblock driver d /tmp/VMwareDnD 1777 root root
[Unit] Description=Mount the vmblock device ConditionPathExists=/proc/fs/vmblock/ After=vmblock.conf Requires=vmblock.conf [Mount] What=none Where=/proc/fs/vmblock/mountPoint/ Type=vmblock
[Unit] Description=Mount the vmblock device ConditionPathExists=/proc/fs/vmblock/ After=vmblock.conf Requires=vmblock.conf [Automount] Where=/proc/fs/vmblock/mountPoint/ [Install] WantedBy=multi-user.target
Then you have to enable the mount point in systemd:
# systemctl enable proc-fs-vmblock-mountPoint.automount
VMware user suid wrapper
The following script is responsible that you can resize the window of your virtual machine:
[Desktop Entry] Type=Application Name=VMWare User Agent Exec=/usr/bin/vmware-user-suid-wrapper Icon=system-run Comment=Enable Unity, DnD, etc.
Disable unneeded drivers
The open-vm-tools-modules package installs a configuration file for the vmxnet driver. Either delete the following file or comment the contents:
To make sure the vmxnet driver doesn't get loaded create the following file:
For shared folders to be working you need to have loaded the vmhgfs driver. Simply create the following systemd file:
[Unit] Description=Load VMware shared folders ConditionPathExists=.host:/ [Mount] What=.host:/ Where=/mnt/hgfs Type=vmhgfs Options=defaults,noatime [Install] WantedBy=multi-user.target
Make sure that the folder /mnt/hgfs exists:
# mkdir -p /mnt/hgfs
Enable the mount target with:
# systemctl enable mnt-hgfs.mount
Enable 3d accleration
To enable 3d acceleration go to Edit virtual machine settings -> Hardware -> Display and enable the checkbox for Accelerate 3D graphics
Fix for problems
Mouse not working as expected
If you have the problem that mouse clicks are not registered in some programs you can try the following: edit /etc/X11/xorg.conf.d/10-evdev.conf and comment out the section with the identifier evdev pointer catchall [xf86-input-vmmouse does not work expected]
Network connection not working
Add the following line to your .vmx file:
ethernet0.virtualDev = "vmxnet3"
More informations about the network adpater types can be found on the following page: Choosing a network adapter for your virtual machine