From root@pcecs237-11.cs.umbc.edu Wed Jul 14 22:06:15 1999 Date: Thu, 8 Jul 1999 18:37:23 -0400 (EDT) From: root To: nicholas@cs.umbc.edu Cc: dkwinter@ssu037.ssu.edu Subject: CS691x Project: Dan Winter: Windows Running inside Linux Please reply to dkwinter@ssu037.ssu.edu I heard about a program called vmware from my brother and decided to check it out. Vmware is a 32-bit emulator which is specifically made for Linux and now also for Windows NT. It allows you to create what is called a Virtual Machine (thus the vm in vmware). A virtual machine can be thought of as a fake machine. For example, if you were to install a virtual machine of Windows 95, vmware would create a file that represents a windows95 hard drive and everything on it. It also would create a file that represents the bios settings and machine environment itself. Vmware is a program that was created entirely in machine code. This allows the program to actually have its own bios, which can be changed at will. Since the program has its own bios, and was written in machine code, it actually can emmulate an entire machine separate to the actual machine it is running on. After downloading the program, I extracted it with the following command: tar xvfz vmware-forlinux-102.tar.gz This ungziped and untared the file into the directory i was currently in and created a new directory called vmware-distrib which contained all the source. I went into that directory with the cd vmware-distrib command. In that directory I read the file called INSTALL with this command: more INSTALL I then made sure i was root, and installed vmware with the following procedure. ./install.pl <--This script asked some questions (#'s). # Perform default installation? (yes/no/help) [yes] yes # You must read and accept the End User License Agreement to continue. # Press return to display it. # Do you accept? (yes/no) yes # Configure host-only networking support? (yes/no/help) [yes] yes # Probe for an unused network number? (yes/no/help) [yes] yes # Configuring vmnet1 to use host address 192.168.130.1 and mask 255.255.255.0. # Hit return to continue: # Starting VM services: vmmon vmnet vmnet-bridge (host-only) [done] # Installation successful # To run vmware, exit from root, leave this distribution directory # and type '/usr/local/bin/vmware'. I then started vmware with the command /usr/local/bin/vmware (while in X-windows). vmware loaded and posted a popup asking if i wanted to run the configuration wizard, run the configuration editor, or open an existing configuration. I click on the configuration wizard and clicked okay. The wizard loaded, and gave me a general info screen. I clicked next. I was then given option of what system I wanted to create virtually. I was able to select from: MS DOS, Windows 3.1, Windows 95, Windows 98, Windows NT (Workstation or Server) 4.0, Linux, Other I chose Windows NT and clicked next. It then asked what directory I wanted the program to store the files for the virtual machine (including the drive and bios configuration files). It already had a default filed in (/root/vmware/nt4) which I accepted and clicked next. It then prompted me how large I wanted the virtual disk to be. A default of 1000 Megs was acceptable, so I clicked next. I then was prompted if I wanted to be able to access the cd-rom or floppy drive (defaultly enabled), which I did so I clicked next. The next question was a harder one. It wanted to know if I wanted "No Networking", "Bridged Networking", or "Host-only Networking" support. No Networking made the machine a standalone, that could not communicate on the network at all. Bridged Networking allowed the machinet to be bridged to the outside network. It made the machine appear as a separate machine on the host machine's subnet. Host-only Networking allows the virtual machine to talk to the host operating system through an internal virtual network. I chose Bridged Networking because I wanted to try to configure it. I then looked over a confirmation screen of the settings i chose and clicked done. The virtual machine could then be started by clicking power on. I set the bios in the virtual machine to boot from the cdrom, and put a Windows NT 4.0 workstation cd in the drive. The virtual machine booted to the cd, and I proceeded to install Windows NT while inside of X-windows in Linux. After the install was completed, I successfully booted the machine and ran Windows NT. I was curious to see if I could make the already installed "real" version of Windows NT run inside of Linux, so i powered down vmware to reconfigure vmware. I found information on this at: http://www.vmware.com/support/rawdevices.html I had to unmount the vfat partion that contained Windows NT on it before I could configure vmware. I reran the configuration wizard with this command: /usr/local/bin/vmware-wizard -rawdisk I clicked next on the info screen, and selected Windows NT as the O/S to optimize for. I accepted the default /root/vmware/nt4 as the directory for the config files to be stored under. I then was prompted a new question, this is what the -rawdisk switch did. It asked me if I wanted to create a virtual disk or use an existing partition. I selected exisiting partition, and it asked me to define the permissions of each drive. I said read only for /dev/hda0 (the MBR), /dev/hda2 (the swapspace), and /dev/hda4 (/). I selected read/write for /dev/hda1 (Win NT), and /dev/hda3 (/temp <--ext2). I then clicked next. I chose to enable the cd-rom and floppy, and chose Bridged Networking. I then confirmed it, and restarted vmware with: /usr/local/bin/vmware /root/vmware/nt4/nt4.cfg & This ran and worked wonderfully! The only snag I ran into was that I didn't have administrator level access to add a virtual video card and virtual network card. Thus I was unable to see if networking would work, and I was unable to change out of the default video mode. However, everything else worked wonderfully. It was the same system I could run outside of Linux. It was slightly slower, and speed could have been improved with more Ram in the machine. Overall the project posed no unanswered questions, and had no difficulties beyond finding on vmware's website how to set up a raw device. There is one thing that must be done before any of the unix work can begin in order to use vmware. You need to register for a license key (this is easiest done while vmware is downloading). The download page has a link to their online form. You need to provide a real email address that they can email you a file at. When you receive the file, you need to save it into a directory and name it as follows: ~/.vmware/license I will come in as a file named as a number, so it does need to be renamed. This free license should last for approximately 30 days. -dan winter