VMware

Status

21 July 2007: Consider getting Intel VT hardware for the next server: "With Intel VT, Xen can also use HVM to virtualize Windows guests". Could we even run all three OSes on an XServe? (Likely not.) See also An Introduction to Custom Xen Networking -- each virtual machine can have its own public IP address!!.

On 9 January 2006, I got the shared folder function working, so that I can access /mnt/storage from both OSes. I also made a samba connection to spello, installed anti-virus, and made a clone.

On 18 October 2005, I purchased VMware 5 Workstation from 04/07/05, build 13124, conf. #661927, for $99 and installed successfully on trevi; the WinXP I had installed with the 5-rc2 beta still works. I can connect to spello using samba -- I don't have a host-only connection working yet.

In December 2004, I installed VMware 4.5 on Trevi and in February 2005 I installed 5 beta.

In December 2003, I re-installed VMware on Spello. It's working great. Also check out Using Windows Terminal Services with Linux

To do

To be able to use the local printer from both Linux and Win at the same time, you need to share the printer in Samba and then map the printer in Windows. However, you're currently running two Samba servers -- vmware's own for spellowin, and spello's own for merton, nicco, etc. To sort this out could be some work -- cf. Samba.

Run regular defragmentations (though VMware will warn you).

Guides and information

VMWare


Configuration files

~/.vmware
/etc/vmware/config

Here's a list of installed vmware executables:

/usr/bin/vmware
/usr/bin/vmware-config.pl
/usr/bin/vmware-nmbd
/usr/bin/vmware-ping
/usr/bin/vmware-smbd
/usr/bin/vmware-smbpasswd
/usr/bin/vmware-smbpasswd.bin
/usr/bin/vmware-uninstall.pl
/usr/bin/vmware-wizard

Installation history

9 January 2006 -- antivirus and shared folders

The WinXP-64 stopped working long ago, but the old WinXP is fine.  I reverted to an older version to ensure viruses hadn't accumulated and then cloned it for backup. In addition, I installed sophos antivirus, configured it, and added the types jpg, wmf, and jpeg, due to the latest vulnerability; the check shows no viruses.

I turned it off and ran defragmentation.  I then took a snapshot and made a clone. The OS is still leaky, but if you have problems you can revert.

For some reason, under user Steen in XP, "Administrative tools" doesn't show up in the menu, even though Sophos detected its presence. This is likely a setting somewhere and might be useful.

If you run the Gnome system monitor while you start XP, you see it takes up a lot of CPU power.

To define shared folders -- it looks like I can share folders from the host to the guest -- in the main menu of VMware, select VM and Settings, then the Options tab and Shared folders. I defined /mnt/storage.

In Windows Explorer | Tools | Map network drive | Folder, I got this as a default:
\\.host\Shared Folders
That worked! And I don't need to have the network enabled. This is really what I wanted. I can now access this directory without turning on the network, and thus share files both ways.  The folder likely needs to be on a mounted drive, meaning I can access a file from both OSes at the same time.

To install VMware tools, you need a CD device defined; just use an iso image.

Connecting from XP in VMware to spello works -- just use the IP number and not the name. The connecting machine's IP number is that of clitunno, not the IP address shown within VMware, so no need to change permissons. The connection log is in /var/log/samba/log.smbd.

25 February 2005: VMware 5 beta

I couldn't figure out why vmware wouldn't install in normal root, but finally realized that /etc/ld.so.conf has to include these libraries:
/var/chroot/sid-ia32/lib
/var/chroot/sid-ia32/usr/lib
/var/chroot/sid-ia32/usr/X11R6/lib
/var/chroot/sid-ia32/usr/local/lib
I ran ldconfig (will it mess up other programs?) and tried again
  • cd /share/software/binary/vmware/5.0-beta
  • tar zxvf *gz
  • cd vmware-distrib
  • wget ftp://platan.vc.cvut.cz/pub/vmware/vmware-any-any-update89.tar.gz (not needed)
  • tar zxvf *gz (not needed)
  • ./vmware-install.pl
  • default on all, all the way
So that was quite simple in the end, and you didn't need the any-any-update this time. VMware 5 is running.

24 November 2004 update: VMware with libraries in chroot instead of emul

I followed the instructions for 31 October and quickly installed VMware under the new setup, where 32-bit libraries are in a chroot rather than in emul as below. No complications so far. Now what would be nice is running the same WinXP installation from boot and from Linux...  I guess Wine might do that one day. 

Still -- recall that this version of XP was installed by gubbio or some other machine, and simply moved to clitunno, where it's working great.

Now that Gubbio is more or less out of commission -- running a MythTV demo, and demoted to its original 300MHz CPU -- I'm using Spello as the samba server and port to my other resources (hopefully this is safe!). It looks like clitunno will run VMware reliably and I can expect to remove VMware from spello.

31 October update: VMware on the Opteron storage server

I located the 4.0 license (with some difficulty) and downloaded the 4.5.2 tarball to clitunno:/share/software/binary/vmware (you also have a version in /vc/software/binary/VMware), plus the XP image in /mnt/cl32/data/vmware/XP.

I untarred it to clitunno:/share/software/binary/vmware/vmware-distrib and ran ./vmware-install.pl. I installed to /usr/bin and /usr/lib/vmware, with manual pages in /usr/share/man and documentation in /usr/share/doc/vmware.  It needs to run /usr/bin/vmware-config.pl the first time.

It needed to build kernel modules, so is using the default /usr/bin/gcc and /lib/modules/2.6.9rc2/build/include. The build failed --

hostif.c:566: error: `PAGE_KERNEL_EXECUTABLE' undeclared (first use in this function)
From the vmware forum, I see Petr Vandrovec's reply that I need "vmware-any-any-update. PAGE_KERNEL_EXECUTABLE was renamed to PAGE_KERNEL_EXEC somewhere between 2.6.5 and 2.6.7." I get vmware-any-any-update84.tar.gz from his patch directory with wget and find the instructions:
After downloading unpack file into some directory, enter that directory and run "./runme.pl".
I untar it to clitunno:/share/software/binary/vmware/vmware-distrib/vmware-any-any-update84, issue ./runme.pl and get this:
VMware Workstation 4.5.2 (build-8848) or VMware GSX Server 3.1.0 (build-9089), now patched
Updating /usr/lib/vmware/bin/vmware-vmx ... VMware Workstation 4.5.2 (build-8848), now patched
Updating /usr/lib/vmware/bin-debug/vmware-vmx ... VMware Workstation 4.5.2 (build-8848), now patched
The script then picks up on the normal install script and tries to build the modules -- and the vmmon module builds, then the vmnet module, and I get "The module loads perfectly in the running kernel." Yay!

I say yes to networking of course, and get "Configuring a bridged network for vmnet0". I opt to bridge eth0 to vmnet0.  I could define another bridged network but decline (these are all the default values). I do "want to be able to use NAT networking" and it finds the "unused private subnet" 192.168.236.0/255.255.255.0. Then it asks about "host-only networking -- here, as below, I now say "yes" instead of the default no.  The script then configures a host-only network for vmnet1 on private subnet 172.16.91.0.

I do "want this program to automatically configure your system to allow your virtual machines to access the host's filesystem", and it installs Samba to do so, saying to make sure the samba config file contains a "socket address" line with your real host IP address only. I edit clitunno:/etc/samba/smb.conf by adding this line, as in spello:
socket address 128.97.186.215
OK, that's enough to start VMware, and it runs fine. It now asks for user names and passwords, which I also add -- but then fails:
/usr/bin/vmware-smbpasswd.bin: error while loading shared libraries: libpopt.so.0: cannot open shared object file: No such file or directory
I ask Petr. libpopt0 is a library for parsing commandline parameters, so it's likely trivial.  You can also add more usernames at a later time by invoking the following command as root:
/usr/bin/vmware-smbpasswd vmnet1 -a <username>
So I exit the script.

The first time I start vmware I issue this from sigillo: ssh trevi vmware. I get a window saying "Press Ctrl-Alt-Enter to enter full screen mode".

To fix this problem install libpopt in /emul, as follows:
  • cd /share/software/binary/vmware
  • wget http://debian.lcs.mit.edu/debian/pool/main/p/popt/libpopt0_1.7-5_i386.deb
  • dpkg -X *deb /emul/ia32-linux
  • ldconfig
Then define the password:
/usr/bin/vmware-smbpasswd vmnet1 -a steen
To make the networking function correctly, I had to configure and start samba on clitunno -- I borrowed the working Spello configuration, and it worked on the first try.

I issue this from sigillo: "ssh trevi vmware", I browse for a virtual machine and I find it at /mnt/cl32/data/vmware/XP/winXPPro.cfg -- it comes right up. I have to discard the suspended state, and define the memory as 1012MB and defined images for the floppy and CD.  Everything runs fine -- I install Firefox and Acrobat, and update VMware Tools. So VMware is now running on Clitunno. There are no stability issues.

5 February 2004 update

After trying and failing to install the Sims Online, I upgraded VMware to 4.0. Make sure to call your workgroup WORKGROUP -- otherwise the setup won't find the host and spello/steen. I figured out how to change the host name (in My Compuer | Properties) and didn't have to reinstall. However, Sims Online is still not installing.

12 January 2004 update

I found the VMware tarball in /vc/software/VMware and copied it to spello:/usr/src/tarballs. I untarred it to /usr/src/tarballs/vmware-distrib and ran ./vmware-install.pl, getting this subnet:

The subnet 192.168.218.0/255.255.255.0 appears to be unused.

I used defaults for all except this one:

Do you want to be able to use host-only networking in your Virtual Machines? [no] yes

Do you want this script to automatically configure your system to allow your
Virtual Machines to access the host's filesystem? (yes/no/help) [no] yes

This system appears to have a CIFS/SMB server (Samba) configured for normal use.
If this server is intended to run, you need to make sure that it will not
conflict with the Samba server setup on the private network (the one that we use
to share the host's filesystem).  Please check your /etc/samba/smb.conf file so
that:

.  The "interfaces" line does not contain "192.168.171.1/255.255.255.0"
.  There is a "socket address" line that contains only your real host IP address

I set up username steen with same password as on sigillo main -- this is for the samba connection.

The installation came through as fully successful. Note that you need to use gcc-2.95; VMware 3.0 won't compile with gcc 3.x.

For installing Windows XP Pro, I had to use /dev/sr0 as the CDROM device. I put the OS on /vh/vmware, from which it could in principle be accessed by VMware running on other nodes. One file (I386/NEWSTRYS.WM_) was unreadable on the installation CD -- I made a new CD that may have the problem fixed (burned more slowly).

Make sure that in VMware's Settings | Configuration, you choose "Host only" and "NAT" for networking -- not bridged. Once I figured that out I had everything working in XP -- and I can cut and paste from Linux to XP!! (the other way doesn't work, though).

I can also ssh to all machines, including spello (the host) and sigillo (the machine I'm on).

On top of it all I can suspend the whole thing to disk and resume instantaneously. This stuff is pretty incredible. Installed eFax reader, crt, Firebird, and MyTrader, and even found the old portfolio pages (not that I need them). Configuration files can be kept on networked drives even in XP -- in fact programs can be run from networked drives, located on other file systems. The whole thing is completely transparent.

I also tested that I can copy the files in /vh/vmware/ to another location and have them work fine, so the OS is movable!

VMware produces a lot of noise in the error logs. You should try to redirect that noise to dedicated log files. One item that in particular generates messages is the floppy drive. I turned mine off like this:
  • Exit the guest OS (WinXP) and power it down
  • In the VMware window, select Settings | Configuration editor | Floppy Drives
  • Remove the installed virtual floppy drive
  • Reboot the guest OS (WinXP) -- it will fail on failed floppy drive
  • Press F2 to enter the BIOS setup and disable the floppy drive
This seems to work fine. If you need it, just put it back.

Logs

VMware produces a huge amount of error messages. It fills up dmesg so I lose my boot information, and it swamps /var/log/syslog.

I ended up uninstalling the floppy drive (I had to go into the virtual BIOS of the guest OS) to get rid of hundreds of these, spewed out at alarming rates:

floppy0: disk absent or changed during operation
end_request: I/O error, dev 02:00 (floppy), sector 1

Losing my floppy isn't a big price to pay in my case, but if there's another solution that would be great. I also get oodles of these:

vmnet-dhcpd: DHCPACK on 192.168.171.130 to 12:08:97:00:84:00 via vmnet1

I asked on the vmware newsgroup, vmware.for-linux.configuration, and got the response that the messages can be filtered out:

Re: Log files
From: RobD <robden12@adelphia.net>
Date: Monday 19 January 2004 01:33:54
Groups: vmware.for-linux.configuration
References: 1

You can redirect log messages based on the type of log message, but not on a per daemon basis. The message types are like mail, daemons, the kernel, cron jobs, etc. Take a look at the syslogd man page for more details and /etc/syslog.conf to see where the different log types (called "facilities") are going.

You can filter out particular messages with an "ignore" entry in /etc/initlog.conf. The file uses regular expressions, so you could say something like "ignore ^vmnet-dhcpd.*" to ignore all dhcpd messages.

I don't understand why you're seeing so many vmnet messages, though. Do you know if the daemon was started with the -q option (initlog -q -c vmnet-dhcpd)? The -q option tells syslog to not log any messages from the daemon. Redhat uses the -q when starting daemons unless BOOTUP is set to verbose in /etc/sysconfig/init. I would take a look at how the daemons are started for Debian.

- Robert -
I found these files:
/etc/syslog.conf
However, there's no initlog.conf and no /etc/sysconfig/init. The daemons run like this according to ps:
/usr/bin/vmnet-bridge -d /var/run/vmnet-bridge-0.pid /dev/vmnet0 eth0
/usr/bin/vmnet-natd -d /var/run/vmnet-natd-8.pid -m /var/run/vmnet-natd-8.mac -c /etc/vmware/vmnet8/nat/nat.conf
/usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet1.pid /dev/vmnet1 vmnet1
/usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet8.pid /dev/vmnet8 vmnet8
/usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
/usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
/usr/bin/vmware-nmbd -D -l /dev/null -s /etc/vmware/vmnet1/smb/smb.conf -f /var/run/vmware-nmbd-vmnet1.pid
/usr/bin/vmware-smbd -D -l /dev/null -s /etc/vmware/vmnet1/smb/smb.conf -f /var/run/vmware-smbd-vmnet1.pid
I wrote back and Robert responded again:
Re: Log files
From: RobD <robden12@adelphia.net>
Date: Tuesday 20 January 2004 02:01:01
Groups: vmware.for-linux.configuration
References: 1 2 3

I have some good news and bad news for you.  First, I've wanted to install Debian for a few weeks now so this gave me an excuse to do it.  I saw what you were talking about.  The syslog is flooded with messages. I then figured out how the daemons were started and how logging works on Debian. I think I like Redhat's logging facility better. The daemons are started with "insmod -s -f ..."; it's the -s that tells it to send messages to syslogd.

Anyway, the bad news is you have a choice of allowing daemon messages to go to the console (w/o -s) or syslogd (w/ -s). You cannot filter particular messages as you can with Redhat. The good news is you can still redirect types of messages to other files, and let the syslog contain only those you want merged together.

The rules in syslog.conf copy everything to syslog (except auth and authpriv msgs), and also send a copy to each facility's log file. What I did was tell syslogd to exclude daemon messages from syslog. Those messages will only go to the daemon.log file. Here are a few important lines from my syslog.conf file:

auth,authpriv.*                 /var/log/auth.log
*.*;auth,authpriv.none     -/var/log/syslog
daemon.*                        -/var/log/daemon.log

I changed the syslog entry to:
*.*;auth,authpriv,daemon.none     -/var/log/syslog

The daemon messages don't need to be in both logs. Try it and see if you like it. If you don't you can always turn it back on.

- Robert -
The syslog.conf change doesn't really address the issue -- I can ignore logfiles

24 June 2003 update

I put a second OS on Spello and reran root@spello:/home/steen# /usr/bin/vmware-config.pl

The NAT network is currently configured to use the private subnet
172.16.86.0/255.255.255.0.

The following hostonly networks have been defined:

. vmnet1 is a host-only network on subnet 192.168.120.0.  This network has a
Samba server running to allow virtual machines to share the host's file system.

Do you want this script to automatically configure your system to allow your
Virtual Machines to access the host's filesystem? (yes/no/help) [yes]

This system appears to have a CIFS/SMB server (Samba) configured for normal use.
If this server is intended to run, you need to make sure that it will not
conflict with the Samba server setup on the private network (the one that we use
to share the host's filesystem).  Please check your /etc/samba/smb.conf file so
that:

.  The "interfaces" line does not contain "192.168.120.1/255.255.255.0"
.  There is a "socket address" line that contains only your real host IP address

I edited spello:/etc/samba/smb.conf -- socket address =  128.97.184.94 and removed hosts allow -- not sure about the syntax here. At the moment, this samba server is not actually running; the vmware one is the only one running on spello. I created a user and password for vmware's samba server and was done.

In WinXP, I then opened Windows Explorer and selected Tools | Map network drive and entered \\SPELLO\HOSTFS; this worked -- I got prompted for user and password and the drive was mapped to E:\. Since Spello's main file system is networked, I now have access to the whole network.

24 November 2002 update

I decided that I don't need to run a separate Samba server on Spello. What I have to do is simply share the HL-1450 printer to CUPS, which I've not succeeded in doing so far. In the meantime, VMware's samba server is already picking up samba-shared printers, so that system is already working. However, Tim's printers are not yet working in Linux (they're shows as located on /dev/null), and my printer is not yet exported to samba.

Anyway, I stopped the Samba server on Spello with a samba stop from root. Merton remains mounted and I don't think it needs the local server -- /sbin/mount.smbfs //merton/steen /mnt/merton -o rw noexec nosuid nodev user username steen password uid 500. This, incidentally, appears to be where the noexec comes from that generates an error on boot. I'll have to reboot to test this but guess that the samba client doesn't require a local samba server, except for loopback mounting, which is what I fail in establishing.

Tweaks

  • On 2002-11-24 I renamed /lib/modules/2.4.19/kernel/drivers/usb/serial/ipaq.o to /lib/modules/2.4.19/kernel/drivers/usb/serial/ipaq.o-do-not-load, to avoid the clash between Linux trying to get control of the iPaq at the same time Windows was.
  • You may be able to do the same with the printer, passing the printer temporarily to windows. That might actually be an attractive short-term fix. Just stop CUPS and see what happens. I removed cupsys and ipd-ppd from SysV Init -- which means I can print at all from Linux.
  • If you get problems with all caps in file names created in VMware, make sure your Windows Explorer | View | Folder Options | View | Allow all uppercase names is unchecked -- and click "Like current folder" to make sure this is done for all folders.
  • Printer: "When connecting the USB printer, the module printer is automatically loaded on the Linux host file system. To resolve this, unload the module printer by hand. This can be done by entering as root user the following command in a shell: rmmod printer Now you will be able to integrate the printer through the menu Devices -> USB port In order to use that device in the guest you MUST prevent the "usblp" module from starting and claiming the device for the host. Removing the module after the fact probably won't help. Let me know if this resolves your issue. Best Regards, Max Banihani Technical Support VMware." Not tried this yet.

Tweak on 22 November 2002

I ran /usr/bin/vmware-config.pl again because Samba wasn't letting me access Spello. I still have no clue how the VMware samba server interfaces with the Spello default Samba server (which you may not need at all if you move the printer to gubbio!! So get rid of the Spello samba server.

Configuring a NAT network for vmnet8.

The NAT network is currently configured to use the private subnet 172.16.61.0/255.255.255.0.

The following host-only networks have been defined:

vmnet1 is a host-only network on subnet 192.168.120.0. This network has a Samba server running to allow virtual machines to share the host's file system.

Do you want this script to automatically configure your system to allow your Virtual Machines to access the host's filesystem? (yes/no/help) [yes]

This system appears to have a CIFS/SMB server (Samba) configured for normal use. If this server is intended to run, you need to make sure that it will not conflict with the Samba server setup on the private network (the one that we use to share the host's filesystem). Please check your /etc/samba/smb.conf file so that:

  • The "interfaces" line does not contain "192.168.120.1/255.255.255.0"
  • There is a "socket address" line that contains only your real host IP address

That sounds simple enough, but I'm not sure I need Samba on Spello at all. I should ask the VMware people for advice for the least problematic setup for my situation -- now I sort of understand what it means to export a printer to Samba. However, for the moment I'll glory in all the things that are already working.

First installation on spello, 18 November 2002

I got the Workstation for Linux 3.2 tarball and untarred it on spello (it can now be removed), and then ran the perl script (don't try to run this as a bash script!!):

root@spello:/usr/src/rpm/SOURCES/vmware-distrib# ./vmware-install.pl

I said yes to all defaults, including invoking /usr/bin/vmware-config.pl

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

None of VMware Workstation's pre-built vmmon modules is suitable for your running kernel. Do you want this script 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.

(That's the 2.95.4 gcc.)

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

(The script successfully builds the module.)

The module loads perfectly in the running kernel.

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

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

Extracting the sources of the vmnet module.

Building the vmnet module.

(The script successfully builds the module.)

  • The module loads perfectly in the running kernel.
  • Do you want networking for your Virtual Machines? (yes/no/help) [yes]
  • Configuring a bridged network for vmnet0.
  • Configuring a NAT network for vmnet8.
  • Do you want this script 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.120.0/255.255.255.0 appears to be unused.
  • Do you want to be able to use host-only networking in your Virtual Machines? [no] yes
  • Do you want this script to automatically configure your system to allow your Virtual Machines to access the host's filesystem? (yes/no/help) yes

(The instructions say you need to answer no here if you're already running samba, but I couldn't make it work on my own, and vmware runs its own samba server in parallel with the main one -- they don't seem to mind each other. This could be a problem if I want to share a printer, however.)

  • Creating a host-only network on vmnet1. (this is required to share the host's filesystem).
  • Configuring a host-only network for vmnet1.
  • The following hostonly networks have been defined:
  • . vmnet1 is a host-only network on subnet 192.168.120.0.
    . vmnet2 is a host-only network on subnet 192.168.222.0.

The second one should be removed [done on 23 Nov 02]. Here are the resulting details obtained from winipconfig.exe:

AMD PCNET Family Ethernet Adapter
Host name: ws-1.localdomain
Node type: Broadcast
IP address: 192.168.120.128
Subnet: 255.255.255.0
DHCP server: 192.168.120.254

The configuration file is /etc/vmware/vmnet1/dhcpd/dhcpd.conf -- note that it's called dhcpd/dhcpd.conf, while the instructions say it's called dhcp/dhcp.conf.

The instructions at http://www.vmware.com/support/ws3/doc/ws32_network10.html#1032424 recommend chosing a static ip address, for instance 192.168.120.127. I couldn't make it work, and let the automated install handle everything. That gave a working system, where I can access the Linux system from the guest OS. I may not be able to set up a shared printer in Samba without sorting out the two Sambas currently running. See Samba.

In the end, I stopped samba on spello and installed vmware with all the defaults -- and it worked! In addition, I can still reach merton from spello. I don't really have any use for setting up a samba server -- all I need is the client -- since all the other machines are Linux systems.

So I set spellowin up with Dreamweaver -- root on spello:winD and remote on merton. Down the line, I may convert spello:winD to an ext3 directory and remove the fat32 file systems altogether.

For the moment, this is all working.

 

 

top
Debate
Evolution
CogSci

Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles


CogWeb