Difference between revisions of "Installing Arch Linux in VMware (systemd)"

From ArchWiki
Jump to: navigation, search
(Add merge request.)
(All info merged.)
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Getting and installing Arch]]
+
#REDIRECT [[Installing Arch Linux in VMware]]
[[Category:Virtualization]]
 
{{Merge|Installing Arch Linux in VMware|Only Systemd scripts part is systemd centric.}}
 
This article describes how to get Archlinux running in a VMWare virtual machine when you're using ''systemd'' as SysV replacement.
 
 
 
== Prerequisites ==
 
Please install the ''open-vm-tools-modules'' from the ''Community'' repository.
 
 
 
== Drivers ==
 
Add the VMWare drivers to your ''mkinitcpio.conf'':
 
{{Hc|head=/etc/mkinitcpio.conf|output=
 
...
 
MODULES="vmsync vmblock vmxnet3 vmwgfx vmw_balloon vmci autofs4 vmhgfs"
 
...}}
 
 
 
Now you have to rebuild your kernel:
 
# depmod
 
# mkinitcpio -p linux
 
 
 
== Systemd scripts ==
 
In the following steps you have to create some systemd scripts so that the ''vmblock'' driver can be used successfully.
 
 
 
Create the following files:
 
{{Hc|head=/etc/tmpfiles.d/vmblock.conf|output=
 
# creates the directory which is used by the vmblock driver
 
d /tmp/VMwareDnD 1777 root root
 
}}
 
 
 
{{Hc|head=/etc/systemd/system/proc-fs-vmblock-mountPoint.mount|output=
 
[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
 
}}
 
 
 
{{Hc|head=/etc/systemd/system/proc-fs-vmblock-mountPoint.automount|output=
 
[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:
 
{{Hc|head=/etc/xdg/autostart/vmware-user.desktop|output=
 
[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:
 
  /etc/modprobe.d/open-vm-tools-modules.conf
 
 
 
To make sure the ''vmxnet'' driver doesn't get loaded create the following file:
 
{{Hc|head=/etc/modprobe.d/vmxnet.conf|output=
 
blacklist vmxnet
 
}}
 
 
 
== Enable shared folders ==
 
For shared folders to be working you need to have loaded the ''vmhgfs'' driver.
 
Simply create the following systemd file:
 
{{Hc|head=/etc/systemd/system/mnt-hgfs.mount|output=
 
[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'' [[http://www.spinics.net/lists/xorg/msg53932.html 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: [http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=ex&bbid=TSEBB_1295982031224&url=&stateId=1%200%20381138238&dialogID=381134132&docTypeID=DT_KB_1_1&externalId=1001805&sliceId=2&rfId= Choosing a network adapter for your virtual machine]
 

Revision as of 05:23, 7 March 2013