VMPlayer

These tips are for using VMware Player on a Linux platform but are also useful for other platforms as hints to do things. (See also tips which may have other information.)






ALERT! WARNING: This page is obsolete.






Installation

This section chronicles my efforts to get VMPlayer up and running the atlas-vm virtual machine on a Linux host. First, I downloaded the tarball version of the VMWare player form the web. Then, I unpacked the tarball and ran the vmware-install.pl script, using all the default options, as detailed below:


dschoute@dschoute-laptop:/scratch/vmware-player-distrib$ sudo -s
root@dschoute-laptop:/scratch/vmware-player-distrib# ./vmware-install.pl 
Creating a new VMware Player installer database using the tar4 format.

Installing VMware Player.

In which directory do you want to install the binary files? 
[/usr/bin] 

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc] 

What is the directory that contains the init scripts? 
[/etc/init.d] 

In which directory do you want to install the daemon files? 
[/usr/sbin] 

In which directory do you want to install the library files? 
[/usr/lib/vmware] 

The path "/usr/lib/vmware" does not exist currently. This program is going to 
create it, including needed parent directories. Is this what you want? 
[yes] 

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware] 

The path "/usr/share/doc/vmware" does not exist currently. This program is 
going to create it, including needed parent directories. Is this what you want?
[yes] 

The installation of VMware Player 2.0.4 build-93057 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall.pl".

Before running VMware Player for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config.pl". Do you want this 
program to invoke the command for you now? [yes] 

Making sure services for VMware Player are stopped.

Stopping VMware services:
   Virtual machine monitor                                             done

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the theme icons? 
[/usr/share/icons] 

What directory contains your desktop menu entry files? These files have a 
.desktop file extension. [/usr/share/applications] 

In which directory do you want to install the application's icon? 
[/usr/share/pixmaps] 

Trying to find a suitable vmmon module for your running kernel.

None of the pre-built vmmon modules for VMware Player is suitable for your 
running kernel.  Do you want this program to try to build the vmmon module for 
your system (you need to have a C compiler installed on your system)? [yes] 

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.24-17-generic/build/include] 

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.24-17-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-17-generic'
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/comport.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/task.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmciContext.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmciDs.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmciGroup.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmciProcess.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmciResource.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmciSharedMem.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmx86.o
  CC [M]  /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o
  LD [M]  /tmp/vmware-config0/vmmon-only/vmmon.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config0/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/vmware-config0/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-17-generic'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
The module loads perfectly in the running kernel.

/dev is dynamic:
Trying to find a suitable vmblock module for your running kernel.

None of the pre-built vmblock modules for VMware Player is suitable for your 
running kernel.  Do you want this program to try to build the vmblock module 
for your system (you need to have a C compiler installed on your system)? 
[yes] 

Extracting the sources of the vmblock module.

Building the vmblock module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmblock-only'
make -C /lib/modules/2.6.24-17-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-17-generic'
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/block.o
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/control.o
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/dbllnklst.o
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/dentry.o
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/file.o
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/filesystem.o
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/inode.o
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/module.o
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/stubs.o
  CC [M]  /tmp/vmware-config0/vmblock-only/linux/super.o
  LD [M]  /tmp/vmware-config0/vmblock-only/vmblock.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config0/vmblock-only/vmblock.mod.o
  LD [M]  /tmp/vmware-config0/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-17-generic'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-config0/vmblock-only'
The module loads perfectly in the running kernel.

/dev is dynamic:
Do you want networking for your virtual machines? (yes/no/help) [yes] 

Configuring a bridged network for vmnet0.

Your computer has multiple ethernet network interfaces available: eth0, wlan0. 
Which one do you want to bridge to vmnet0? [eth0] wlan0

The following bridged networks have been defined:

. vmnet0 is bridged to wlan0

Do you wish to configure another bridged network? (yes/no) [no] yes

Configuring a bridged network for vmnet2.

The following bridged networks have been defined:

. vmnet0 is bridged to wlan0
. vmnet2 is bridged to eth0

All your ethernet interfaces are already bridged.

Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes] 

Configuring a NAT network for vmnet8.

Do you want this program to probe for an unused private subnet? (yes/no/help) 
[yes] 

Probing for an unused private subnet (this can take some time)...

The subnet 192.168.145.0/255.255.255.0 appears to be unused.

The following NAT networks have been defined:

. vmnet8 is a NAT network on private subnet 192.168.145.0.

Do you wish to configure another NAT network? (yes/no) [no] no

Do you want to be able to use host-only networking in your virtual machines? 
[yes] yes

Configuring a host-only network for vmnet1.

Do you want this program to probe for an unused private subnet? (yes/no/help) 
[yes] 

Probing for an unused private subnet (this can take some time)...

The subnet 192.168.151.0/255.255.255.0 appears to be unused.

The following host-only networks have been defined:

. vmnet1 is a host-only network on private subnet 192.168.151.0.

Do you wish to configure another host-only network? (yes/no) [no] no

Trying to find a suitable vmnet module for your running kernel.

None of the pre-built vmnet modules for VMware Player is suitable for your 
running kernel.  Do you want this program to try to build the vmnet module for 
your system (you need to have a C compiler installed on your system)? [yes] yes

Extracting the sources of the vmnet module.

Building the vmnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmnet-only'
make -C /lib/modules/2.6.24-17-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-17-generic'
  CC [M]  /tmp/vmware-config0/vmnet-only/driver.o
  CC [M]  /tmp/vmware-config0/vmnet-only/hub.o
  CC [M]  /tmp/vmware-config0/vmnet-only/userif.o
  CC [M]  /tmp/vmware-config0/vmnet-only/netif.o
  CC [M]  /tmp/vmware-config0/vmnet-only/bridge.o
  CC [M]  /tmp/vmware-config0/vmnet-only/filter.o
  CC [M]  /tmp/vmware-config0/vmnet-only/procfs.o
  CC [M]  /tmp/vmware-config0/vmnet-only/smac_compat.o
  SHIPPED /tmp/vmware-config0/vmnet-only/smac_linux.x386.o
  LD [M]  /tmp/vmware-config0/vmnet-only/vmnet.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: could not find /tmp/vmware-config0/vmnet-only/.smac_linux.x386.o.cmd for /tmp/vmware-config0/vmnet-only/smac_linux.x386.o
  CC      /tmp/vmware-config0/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/vmware-config0/vmnet-only/vmnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-17-generic'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory `/tmp/vmware-config0/vmnet-only'
The module loads perfectly in the running kernel.

Starting VMware services:
   Virtual machine monitor                                             done
   Blocking file system:                                               done
   Virtual ethernet                                                    done
   Bridged networking on /dev/vmnet0                                   done
   Host network detection                                              done
   Host-only networking on /dev/vmnet1 (background)                    done
   DHCP server on /dev/vmnet1                                          done
   Bridged networking on /dev/vmnet2                                   done
   Host-only networking on /dev/vmnet8 (background)                    done
   DHCP server on /dev/vmnet8                                          done
   NAT service on /dev/vmnet8                                          done

The configuration of VMware Player 2.0.4 build-93057 for Linux for this running
kernel completed successfully.

You can now run VMware Player by invoking the following command: 
"/usr/bin/vmplayer".

Once VMPlayer is up and running, it is trivial to load up the atlas-vm virtual machine, as per the instructions on this TWiki. In order to be able to access file systems outside of the guest machine (in this case, atlas-vm), it is convenient to use NFS mounts from either the host machine or a remote server.

NFS on host machine

First, you must configure the /etc/exports file on the host machine (assuming you have an NFS server installed of course; this varies for different systems). Add this line

/home 192.168.151.0/255.255.255.0(rw,root_squash,sync)

where /home is the file system you wish to gain access to, and 192.168.151.0/255.255.255.0 is the subnet mask that you used when configuring the NAT (above). Now, you must kill VMPlayer and edit the settings in the VMWare modules by adding these lines to /etc/vmware/vmnet8/nat/nat.conf

[privilegedUDP]
autodetect=1
[privilegedTCP]
autodetect=1 

Here vmnet8 is the name assigned to the NAT interface (above). Now restart the VMWare modules with /etc/init.d/vmware restart and then startup VMPlayer. As root in the guest machine, mount the file system

mount -t nfs host:/home /nfs-mounts/host/home

where host is the IP address are hostname of the host machine and /nfs-mounts/host/home is an existing (empty) directory you want to mount to.

NFS on remote machine

If you are using NAT then any request to a remote machine will appear to that machine as though it is coming from the host machine. Therefore, following the same steps as above for a remote machine to export to your host, you can also mount the file systems on your guest machine.

Memory

By default, the VM has 256 MB of memory. This is not much, if you are trying to run ATLAS software (but it is on the safe side in case your laptop doesn't have a lot of memory to spare). If you want to increase the memory of the VM, open it in VM Player. Go to the "VM Player" menu at the top left, and select "Troubleshooting -- Change Memory Allocation". Pick how much memory you want (don't exceed the maximum specified). As far as I could tell, this doesn't actually get applied until you do an explicit "Reset" or "Power down" of the VM (also in the Troubleshooting menu). Just rebooting it didn't seem to be enough - if I just rebooted, the VM Player menu said the machine had the new amount, but standard linux commands inside the VM said it still had 256 MB. But the explicit reset did the trick... -- IsabelTrigger - 26 Jun 2008

SSH to Your VM

(There are alternatives to the recipe given in this section: eg.

  • ssh to your VM and get its IP address /sbin/ifconfig eth0 | grep "inet addr" ; then use that to ssh from your host machine to your VM in the future.
  • create static IP addresses, is described here.
)

You will have to edit the NAT configuration for vmnet8. So turn off you VM. Now as root make the NAT config file editable:

chmod +w /etc/vmware/vmnet8/nat/nat.conf

then open /etc/vmware/vmnet8/nat/nat.conf with your favorite text editor and find the following in the [incomingtcp] section:

# SSH
#      ssh -p 8889 root@localhost
#8889 = 172.16.52.128:22

Uncomment the last line, save and return the permissions of the NAT config file back to read-only:

sudo chmod -w /etc/vmware/vmnet8/nat/nat.conf

Restart your vm modules:

/etc/init.d/vmware restart

And when you start th VM now you should be able to ssh into your vm like-a-so:

ssh -p 8889 username@localhost

-- DougSchouten - 03 Jun 2008 -- FrankBerghaus - 23 Sep 2008

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2026-10-05 - AsokaDeSilva
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback