r17 - 30 Jan 2008 - 21:12:20 - MattCzechYou are here: TWiki >  CSDocs Web  >  CSLDocumentation > VMwareHowTo

How To Use VMware on CSL Supported Linux Computers

Overview

This application is primarily designed to solve the problem that exists when a Linux user receives a document in a format that can not be adequately decoded with anything except an actual Microsoft application.

To this end, we have created a virtual machine (VM) which is a generic Windows XP install with OfficeXP and the appropriate bits to share files on the local disk of the host machine. The framework of VMware allows much more than this, but this was the basic problem we were trying to solve. We are aware that there are several ways to use the VMware software in a different manner to do different things and to the extent we are able we will support the framework to support those options, but our main goal in this effort was to allow linux users better access to Microsoft applications.

The following documentation should provide enough information to get started using the VMware installation.

Using VMware

Virtual Machines and Virtual Appliances

VMware is all about virtual machines. A virtual machine is a collection of virtual hardware (CPU, memory, disk drive(s), keyboard, mouse, etc.) and operating systems/applications to run on that virtual hardware. Before you can run your favorite operating system or application under VMware, someone had to create the virtual hardware, (typically) install an OS on the virtual hardware, maybe install applications, patches, etc. before that virtual machine (VM) is ready for use. Fortunately, once that is done, the virtual machine can be packaged and copied at will to be used by others. A packaged virtual machine is called a virtual appliance. In reality, a virtual appliance is nothing more than a zip archive of all the parts of a virtual machine.

Recommended Host System Configuration

VMware ultimately relies on the real resources available on the host to run virtual machines. Thus, trying to run a virtual machine on top of a real host that has insufficient capabilities may result in poor virtual machine performance and/or stability problems on the host operating system. The CSL recommends that a minimum configuration of a 2.4 GHz CPU with at least 1GB of memory be used for the host OS. Also, virtual machines take up significant amounts of disk space to store virtual disk images. Hosts with small /scratch partitions may be limited in the number and size of virtual machine images that can be stored simultaneously.

Unpacking the CSL Windows XP Virtual Appliance

To unpack the CSL-supplied windows XP virtual appliance, run the command:

% /s/std/bin/vmware-unpack WinXP

This command unpacks the XP virtual appliance (/s/vmware/Virtual_Appliances/WinXP.zip) into a virtual machine at /scratch/ yourname /VMware/WinXP. Note that this path is on the local disk, not in /afs.

Accessing the Windows XP Virtual Machine with the VMware Console

The VMware console is the program you use to interact with your virtual machine. To start the console, run the vmware program. The first thing the console will ask you to do is select a host to connect to. Click the Localhost button, then Connect. Now you're ready to interact with virtual machines (VMs) on your local host.

You need to tell VMware where to find the VM you unpacked in the previous step. Click the Open a virtual machine button on the left are of the display (or use File -> Open from the menu bar). A dialog will be displayed. If you don't see your virtual machine, click Browse to go to a file chooser. Navigate to the path /scratch/ yourname /VMware/WinXP/WinXP.vmx. The .vmx file is the configuration file for the VM and is used as a handle to refer to the VM with various VMware utilities. When you have found the .vmx file for your VM, click the Open button to access the VM.

To start running your VM, click the Power On button. Your VM will start running. Although there is a Power Off button, it is much better to use the virtual operating system's shutdown command(s) to shut down a VM. Shutting down a VM using the Power Off button poses the same risks to a virtual computer as it does to a real computer; lost data, corrupt disks, and frustrated users.

Once the startup process in completed, you can interact with the XP VM just as you would with any native windows XP installation. More description of the CSL XP virtual appliance, including installed software and account information, can be found later in this HowTo.

Transferring Files Between a VM and the Host Operating System

As part of the VMware deployment, the CSL has installed a windows-compatible file server to facilitate sharing files between VMware and the host OS. The file server shares the directory /scratch/VMware.share from the linux host to all VMs running on the host. This directory is pre-mounted in the CSL windows XP VM as drive e: for both the windows administrator and the windows user (vmuser) account. Files written to this share from a VM will appear in /scratch/VMware.share on the host OS, and vice versa. The only security on this share is that only users of the local computer, as well as any user on any VM running on that computer, can access it. For sensitive data, you can use secure FTP (see the next section).

(For other OSs, the share can be mounted from ip address 192.168.8.1. The share name is public, its type is smb, the user name is vmuser, and there is no password.)

Transferring Files Between a VM and Other Hosts

To transfer files between a VM and other hosts, or to transfer sensitive data between a VM and the host OS, we suggest you use the Secure File Transfer Client component of SSH Secure Shell, which is pre-installed in the CSL windows XP VM.

Note however, that because of firewall restrictions, to transfer a file from a VM to a host outside of CS, you will need to first transfer the file to a CSL-supported workstation, and then transfer it from that workstation to the remote host.

Printing

To print from a VM, you will need to select the print to file option in your application/OS. The CSL windows XP VM comes with a pre-installed generic postscript printer. When asked for a destination for the postScript output, choose a file on the host share (e:).

That file can then be printed from the linux host to the CSL printer of your choice.

Read The Fine Manuals (VMware Documentation)

There is much excellent documentation for VMware products on the web. Reading the VMware manuals is the best way to get the most out of the products. The documentation can be accessed at http://www.vmware.com/support/pubs/server_pubs.html, or by clicking Help -> VMware on the Web -> Online Product Documentation in the VMware console.

Virtual Machine General Information

You can also create your own virtual machines using VMware. We suggest that you create a separate directory under /scratch/ yourname /VMware/ for each virtual machine. If needed, you can create virtual machines on any local partition on your computer. You cannot run virtual machines from /afs (e.g. anywhere under your home directory, project space under /p/..., etc.).

CSL-provided Virtual Appliances

CSL-supported virtual appliances are stored in the directory /s/vmware/Virtual_Appliances. You can list the contents of that directory to see what's available. The most popular appliances are also listed here, with directions for installation.

Windows XP

Install this virtual appliance with the command: vmware-unpack WinXP. It has the following features:

  1. Microsoft Office XP.
  2. DoIT-supplied Symantec Antivirus (with automatic updates).
  3. Mozilla Firefox (with automatic updates).
  4. Adobe Reader (not sure about updates)
  5. ssh.com remote access and file transfer client (doesn't automatically update).
  6. VMware tools
  7. Windows Update will automatically apply OS and Office updates as they become available from Microsoft
  8. An Administrator account with a password W1ndowsXP (the sceond character is the number "one")
  9. A non-privileged account (vmuser) with a password W1ndowsXP (the sceond character is the number "one")

CentOS - CentOS 4 virtual machine

Install this virtual appliance with the command: vmware-unpack CentOS. It has the following features:

  1. A vanilla CentOS 4 'workstation' installation.
  2. VMware tools.
  3. yum is configured to automatically install updates as they become available.
  4. root account, with a password CentOS!!
  5. A non-privileged account (vmuser) account, with a password CentOS!!
  6. Any time yum updates the CentOS kernel, it will be necessary to run /usr/bin/vmware-config-tools.pl to install updated kernel drivers for the vmware-tools component.

Windows Vista Enterprise

Install this virtual appliance with the command: vmware-unpack Vista. It has the following features:

  1. Microsoft Office 2007
  2. DoIT-supplied Symantec Antivirus (with automatic updates)
  3. Mozilla Firefox (with automatic updates)
  4. Adobe Reader
  5. ssh.com remote access and file transfer client (doesn't automatically update).
  6. VMware tools
  7. Windows Update will automatically apply OS and Office updates as they become available from Microsoft
  8. A non-privileged account (vmuser) with a password W1ndowsXP (the second character is the number "one")
  9. A privileged account (vmadmin) with a password W1ndowsXP (the second character is the number "one")

Vista Enterprise Information

Windows Vista needs to contact Microsoft occasionally (every 30 days) to renew its activation. Using the default network configuration, virtual machines can not directly connect to outside hosts. Use the following workaround for activation:

  1. As the administrative user, using a cmd.exe shell with administrative privileges, extend the activation grace period with the following command: slmgr -rearm
  2. Download WiscVPN from http://www.doit.wisc.edu/network/vpn/
  3. Log in to the VPN
  4. Re-try the activation again

Mailing Lists

The CSL maintains an email list for discussion among CS department users, and for announcements regarding upgrades and other activities. We encourage anyone using VMware to subscribe to this list by sending email to vmware-users-request@cs.wisc.edu. Put the word subscribe in the body of the message.

Backups

The CSL is currently investigating technology and chargeback issues associated with backing up virtual machines. For now, if you need to back up a virtual machine, you should shut down the VM and copy the entire VM directory to an alternate location (/afs or a different computer).

Networking

VMware provides a rich networking environment for network communication between the virtual machines, the host OS, and remote hosts. The CSL deployment provides networking facilities that are tailored for most users, and can be customized for whatever research needs arise.

External Network Access

The CSL VMware deployment provides access to external hosts in the form of a NAT service accessible via the VMware device vmnet8. Because of the nature on networking with NAT, VMs can only provide services to other VMs on the (same) host. This is consitent with network facilities on other upsupported/crash and burn networks in the department.

In general VMs should obtain IP information via DHCP, which will result in correct configuration.

Network Configuration - vmnet8
Network Addresses 192.168.8.0/24
Netmask 255.255.255.0
Default Route 192.168.8.1
Name Server 128.105.252.100
DHCP Server Vmware-provided, serves 192.168.8.128 through 192.168.8.254
Static IPs Yes, use addresses 192.168.8.32 through 192.168.8.127
NAT Uses Linux IPTables MASQUERADE
Linux Host IP 192.168.8.1

Services administratively blocked include:

smtp port 25 - use sabe (authenticated smtp gateway) instead
bootps port 67
tftp port 69
portmap port 111
epmap, loc-srv port 135
netbios_ns only to 192.168.8.0/24
netbios_dgm only to 192.168.8.0/24
netbios_ssn only to 192.168.8.0/24
microsoft-ds only to 192.168.8.0/24
syslog port 514
printer, lp, lpacct port 515, 693
afs 7000-7009
misc 593, 1964, 2049, 4444, 4545

Access to hosts outside of CS is blocked. You can access many services provided by external hosts by using the CSL gateway service on squid.cs.wisc.edu port 3128. In addition, destination network address translation will automatically redirect all port 80 (http) and port 443 (https) traffic from vmnet8 to squid. However, because some web sites cannot use network-level redirection, we strongly encourage that you configure browsers to use the squid proxy. squid.cs.wisc.edu provide the following proxies:

Service Port
http 80
https 443
snews 563
ftp 21
rsync 873
gopher 70
wais 210
http-mgmt 210
gss-http 488
filemaker 591
sms_update 777

Private Network

There is also a private network that can be used between the VM(s) and the host OS, accessed via the VMware device vmnet1.

Network Configuration - vmnet1
Network Addresses 192.168.1.0/24
Netmask 255.255.255.0
Default Route none
Name Server none
DHCP Server Vmware-provided, serves 192.168.1.128 through 192.168.1.254
Static IPs Yes, use addresses 192.168.1.32 through 192.168.1.127
Linux Host IP 192.168.1.1

Bridged Network

For security reasons, you cannot use the bridged network to communicate with external hosts. All packets will be dropped, and you may interfere with the host OSs ability to function correctly.

Updating VMware Tools

The CSL-supported virtual appliances come configured with a VMware component called VMware Tools, which assists VMware to make certain functions more fluid between the host and guest OS. When the CSL upgrades the version of VMware on the host system, VMware will alert the the user that the version of VMware Tools is out of date with respect to the host environment. VMware Tools can be upgraded with the following procedure.

Update VMware Tools for RPM-based systems (i.e. CentOS)

  1. On the Summary screen for the virtual machine to be updated, double-click the CDROM virtual hardware device to open the Virtual Machine Setting dialog for the guest CDROM virtual device.
  2. Select Use ISO Image, and enter /usr/lib/vmware/isoimages/linux.iso as the path. Click Connected, and OK.
  3. If the guest OS isn't running, start it at this time.
  4. Log in as root, open a terminal window, and enter the command rpm -U /media/cdrom/VMwareTools-*.rpm
  5. If desired, go back to the Virtual Machine Setting dialog for the guest CDROM virtual device, and un-click the Connected box to detach the iso image from the guest.

Update VMware Tools for Windows-based systems (i.e. XP, Vista)

  1. If the guest OS isn't running, start it at this time.
  2. Log in as Administrator
  3. On the Summary screen for the virtual machine to be updated, double-click the CDROM virtual hardware device to open the Virtual Machine Setting dialog for the guest CDROM virtual device.
  4. Select Use ISO Image, and enter /usr/lib/vmware/isoimages/windows.iso as the path. Click Connected, and OK.
  5. The VMware Tools Installation dialog will start automatically. Smile and nod through the installation.
  6. If desired, go back to the Virtual Machine Setting dialog for the guest CDROM virtual device, and un-click the Connected box to detach the iso image from the guest.

Release Notes

  • VMware makes assumptions that root can write to your home directory. For this reason, it is necessary to link the directory ~/.vmware to the local disk. The CSL vmware wrapper links ~/.vmware to /scratch/ yourname /VMware/.vmware for you.
  • The VMware Tools for CentOS must be updated any time a new kernel is installed. With the new kernel running, run the /usr/bin/vmware-config-tools.pl script to update the kernel modules required for VMware Tools.
  • VMware cannot run virtual machines in AFS
  • If you wish to use the remote VMware console facility to access VMs on hosts other than your login host, a one-time initialization is required. Ssh to the host where your VMs reside and run /s/std/bin/vmware, and immediately exit. After this, it will be possible to use the remote console facility. The error indicating that this initialization has not taken place is in /tmp/vmware-USER/*.log, and is of the form: vmx| [msg.util.msde.mkdir] Cannot create directory "/u/U/S/USER/.vmware": File exists.

-- DavidThompson - 14 May 2007

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r17 < r16 < r15 < r14 < r13 | More topic actions
 
CSL Home
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback