Text 15539, 376 rader
Skriven 2006-02-15 08:47:36 av Jeff Guerdat (1:229/2000)
Kommentar till text 15481 av Jeff Guerdat (1:229/2000)
Ärende: Try the VMware player
=============================
I decided this needed to be more formalized to be useful. Here's the text-only
version - I have one with screen shots of FreeDOS if anyone wants it (.doc
format). It's not necessary but does have hyperlinks embedded to things like
the SCSI driver and VMware tools to be loaded. Send me an email so I can simply
reply with an attachment. My address is jguerdat at rochester dot rr dot com.
I would encourage the use of the VMware tools for any installation. Two useful
things that it adds are 1) the mouse pointer is no longer trapped in the VM
window until you press CTRL-ALT and 2) the ability to shrink the disk file. I
shrank my XP disk from ~5.2GB down to 2.0GB after installing patches, etc. Use
over time will cause the file to grow and you can reclaim the space easily with
the VMware tools.
How-to: VMware player modification
Programs required to carry out hack:
- Copy of VMware Player
- A virtual machine (I used the Fedora FC4 full install with an 8GB drive -
root password is "password")
- Notepad or other text editor
- ISO image or CD/floppy of FreeDOS (I'm using the Ripcord distribution) or
MSDOS 7.1 would work as well, but I haven't tried it yet.
- Replacement OS (must have SCSI HDD support)
Once you've downloaded the browser appliance or whatever image you intend to
use, the first step is to open up and edit the *.vmx file. I used notepad for
this, though any text editor should do.
I'd recommend changing the settings as needed, though these are what I suggest.
Change the value of memsize to 256. For most operating systems this is
sufficient and you can change this later as needed.
Part 1: Using an ISO
The image I am using has been setup to use the physical CD-Rom drive of my
system. Not really desirable when you want to install from a downloaded ISO.
While using daemontools or a similar CD mounting program is an option, a more
elegant method would be to use VMware player's own ability to read ISOs. I
created an ISO image of my XP Pro CD to mount but the physical device would
have worked fine.
At this point I suggest saving and making a copy of the *.vmx file, since it
might be desirable to use a physical CD-Rom drive at a later time.
To do this replace:
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"
with:
ide1:0.fileName = "C:\targetcd.iso"
ide1:0.deviceType = "cdrom-image"
where C:\targetcd.iso is the name and location of the disk file you intend to
use. Once this is done, save the edited vmx file and run it.
Part 2: Removing the current OS
Now, at the startup screen, press ESC and choose to boot from the CD drive at
the next screen. One thing I learned with all this is that there's a Phoenix
BIOS running the player - you can either use F2 at the POST screen or just hit
ESC and choose the Setup option at the bottom of the list. If all goes well,
you should choose to boot from CD-Rom (#1). From there, choose to boot to the
second option "FreeDOS ** FAT32". At the next screen, pick the first option,
"BOOT WITH EL TORITO CD ROM DRIVER" (default)and then the second option, to run
FreeDOS from CD command prompt.
Now the fun part. Type in fdisk and press enter. Choose to enable large disk
support and press enter. Now select the third option to "Delete partition" and
the fourth option at the next screen, to "Delete a Non-DOS Partition". This is
the point of no return (well, almost). Select the partition(s), and delete it.
Press escape to go back to the main screen, and select the first option, to
create a new partition. It's the first option on both that and the next screen.
At the third screen, it will ask you if you want to make a partition that is
the maximum size possible. Press Y and enter. You can resize it smaller later
with whatever OS you are installing. Press escape until you go back to the main
screen and the VM reboots.
Part 3: Installing a new OS
At this point, we have a broken bootloader and a hdd that needs formatting...
perfect for a new OS!
Shut down the VM (player->troubleshoot->shutdown and exit) and open up the
*.vmx file again. Edit "ide1:0.fileName = "C:\targetcd.iso"" to point to the
installation CD ISO image of the new OS. If it's a physical CD, you will have
to edit the "ide1:0.filename" and ide1:0.deviceType to their original values.
Boot up. Choose to boot from CD (you can't boot from the old OS anyway, GRUB's
broken after what we did) and reinstall. Most modern OSes would allow you to
format to whatever format is needed.
You'll need to load the VMware SCSI disk driver to install the OS successfully.
In order to load the disk driver, however, I had to change the .vmx file SCSI
section of the Fedora FC4 image from "lsilogic" to "buslogic" - the driver is
for the BusLogic device. Ignore the waning here since there's nothing on the
disk image of any use now. To install the driver in XP, for instance, start
the install process and press F6 when prompted at the first screen. There are
more details about the SCSI driver and where to get it in the next section.
Conclusion
There you have it, a perfectly usable VMware image using nothing but VMware
player and FreeDOS. One limitation is that you cannot use this disk image to
install an OS without SCSI support.
Note:
Once XP is up and running, you need to load on the Windows version of the
VMware tools that comes with the Workstation edition. I downloaded a slightly
old version (so I didn't need to register, etc.) and installed it on a machine
that didn't have the player installed (you can't install both on the same
machine). Once loaded, look in the VMware folder under Program Files and grab
the *.iso images you may want (I took both the Linux and Windows versions) and
store them someplace safe and uninstall the software. Now, either edit the
.vmx file to support the player's native ability to mount ISO images or write
it to a CD. Mount the CD and run the setupo which will install the video,
mouse, network, etc. drivers for better performance. Here's the section of the
.vmx file - (un)comment the lines depending on whether you want to use the
drive or the ISO file:
ide1:0.present = "TRUE"
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"
ide1:0.autodetect = "TRUE"
#ide1:0.present = "TRUE"
#ide1:0.fileName = "c:\windows.iso"
#ide1:0.deviceType = "cdrom-image"
#ide1:0.startConnected = "TRUE"
#ide1:0.autodetect = "TRUE"
Also, if you want/need to do similar things for the floppy drive, make sure you
use "A:", not "a:" for the drive - it's case-sensitive. Ask me how I found
out.
floppy0.startConnected = "FALSE"
floppy0.fileName = "A:"
#floppy0.fileName = " c:\vmscsi-1.2.0.4.flp "
WIRELESS ONLY
The final sticking point was making networking work on the wireless adapter in
the Linux laptop. Nothing I tried worked. Turns out, after MUCH digging (it's
not well-documented) that I had to run the setup script in Linux multiple times
- first to set up the networking normally (won't work but ya gotta start
someplace), choosing the defaults, followed by running it again, editing the
network setup more or less according to
http://www.vmware.com/support/ws45/doc/network_configure_ws.html (keep reading
to get to the Linux section). Once at the point of answering Yes to changing
the network configuration, choose the editor as noted in the above page. I
then chose to change #0 (vmnet0) to none and completed the setup with no other
changes. Finally, one more setup run and change #0 (vmnet0) to bridge to
vmnet8, which is the default NAT network. You may want to experiment to see if
you can just run the initial setup and then change the bridge directly without
needing to resort to it being set to none. This will give you an address not
recognized by the rest of the network but allows you to access the network as
if you were on the laptop. Note that none of this is needed if you don't use
wireless.
Using the VMware SCSI Disk Driver for Windows Guest Operating Systems
VMware supplies a special SCSI driver for virtual machines that are configured
to use the BusLogic virtual SCSI adapter. Virtual machines do not need this
driver if they do not need to access any SCSI devices or if they are configured
to use the LSI Logic virtual SCSI adapter.
The driver is included as part of the VMware Tools package, and is also
available for download from this download page or this one. The driver can be
used in Windows XP. Windows Server 2003 or Windows 2000, with certain
limitations described below.
Limitations with Certain Guest Operating Systems
..Windows 2000: Although Windows 2000 includes a driver for the BusLogic
virtual SCSI adapter, you can use the VMware-supplied driver to achieve
enhanced SCSI device performance. However, do not use this driver to install
the operating system on a SCSI disk. Install the operating system using the
driver it ships with, then upgrade to the VMware-supplied driver by installing
VMware Tools. You may also download the driver from the VMware Web site and
install it manually after you install the guest operating system.
..Windows XP or Windows Server 2003: If your virtual machine is configured to
use the BusLogic virtual SCSI adapter, you must use the VMware-supplied driver
to install these operating systems on a SCSI disk. Do this by pressing the F6
key in the early stages of the installation process. If your operating system
is already installed on an IDE disk, you can install this driver to enable
support for SCSI devices via the BusLogic virtual SCSI adapter. The recommended
method is to install VMware Tools. You may also download the driver from the
VMware Web site and install it manually.
Using the Driver in a New Virtual Machine
To use the driver when you are installing a Windows Server 2003 or Windows XP
guest operating system in a newly created virtual machine, follow these steps.
1. Save the downloaded file -ª vmscsi-1.2.0.4.flp - to a folder or directory of
your choice on your host computer.
2. Attach the floppy image to your virtual machine.
In the virtual machine settings .vmx file configure your virtual machine's
floppy drive to use the file vmscsi-1.2.0.4.flp. Be sure the
floppy0.startConnected section is set to "FALSE".
3. Insert the installation CD in the CD-ROM drive and begin installing the
operating system.
4. Watch the messages at the bottom of the character-mode screen during the
early stages of the installation. One of the messages tells you to press F6 if
you need to install a third-party SCSI or RAID driver. When this message
appears, press F6.
5. Connect the floppy drive by clicking on the floppy icon at the top of the
player window, so your virtual machine can use the driver files contained in
vmscsi-1.2.0.4.flp.
6. Continue with the installation, following the instructions provided by the
installer.
7. As you are installing the SCSI driver, warning messages inform you that the
driver has not passed Windows logo testing. You may safely ignore these
messages. Click Yes to continue installing the software.
If you prefer, you may use a utility such as rawrite on Windows or dd on Linux
to make a physical floppy disk from the floppy image file.
Using the Driver in an Existing Virtual Machine
You may want to upgrade an existing virtual machine with a SCSI drive. During
the upgrade, you update the SCSI driver in the virtual machine -- using the
driver in the VMware-BusLogic-SCSIDriver-l.2.0.0.flp floppy image file. The
process is essentially the same as that described above for installation.
As with new installations, you may either connect the virtual machine's floppy
drive to the image file, or use a utility such as rawrite on Windows or dd on
Linux to make a physical floppy disk.
To add the VMware SCSI Controller to a Windows guest operating system, complete
the following steps.
1. In the virtual machine, open the Control Panel. Choose Start> Control Panel.
2. Click Switch to Classic View, then double-click the System icon.
3. Click the Hardware tab, then click Device Manager.
4. Right-click SCSI Controller and select Update Driver. The Hardware Update
wizard starts.
5. Insert the floppy disk into the floppy drive on your host machine.
6. Select Install from a list or specific location (Advanced), then click Next.
7. Select Don't search. I will choose the driver to install, then click Next.
8. Click Have Disk, then click Browse. Browse to your host's floppy drive.
9. Select VMSCSI.
10. Click Open, then click OK.
11. Select VMware SCSI Controller. Click Next.
12. A message appears, informing you that the driver is unsigned. Click
Continue Anyway.
13. Click Finish, then close the Device Manager.
VMware Tools for Linux Guests
1. Power on the virtual machine.
Edit the vmx file to use either the linux.iso file or the physical CDROM drive,
as appropriate.
2. After the guest operating system has started, prepare your virtual machine
to install VMware Tools. Click on the CDROM button at the top of the player
window.
The remaining steps take place inside the virtual machine.
3. Be sure the guest operating system is running in text mode. You may not be
able to install VMware Tools from a terminal in an X window session. Using the
RPM file under Fedora works fine under X. Some recent distributions of Linux
are configured to run the X server when they boot and do not provide an easy
way to stop the X server. However, you can switch to a different workspace that
is still in text mode and install VMware Tools from that workspace.
To switch between Linux works paces in a virtual machine, press Ctrl-Alt-Space,
release Space without releasing Ctrl and Alt, then press the function key for
the workspace you want to use - for example, F2. If you change your hot key
combination to something other than Ctrt-Alt, use that new combination with
Space and the function key.
4. As root (su -), mount the VMware Tools virtual CD-ROM image, change to a
working directory (for example, /tmp), uncompress the installer, then unmount
the CD-ROM image.
Note: You do not use an actual CD-ROM to install VMware Tools, nor do you need
to download the CD-ROM image or burn a physical CD-ROM of this image file. The
VMware Workstation software contains an ISO image that looks like a CD-ROM to
your guest operating system. This image contains all the files needed to
install VMware Tools in your guest operating system.
Note: Some Linux distributions use different device names or organize the /dev
directory differently. If your CD-ROM drive is not /dev/cdrom or if the mount
point for a CD-ROM is not /mnt/cdrom, modify the following commands to reflect
the conventions used by your distribution.
mount /dev/cdrom /mnt/cdrom
cd /tmp
tar zxf /mnt/cdrom/vmware-linux-tools.tar.gz
umount /mnt/cdrom
5. Run the VMware Tools installer.
cd vmware-tools-distrib
../vmware-install.pl
Respond to the questions the installer displays on the screen. Be sure to
respond yes when the installer offers to run the configuration program.
6. Log out of the root account.
exit
7. Start X and your graphical environment.
8. In an X terminal, launch the VMware Tools background application
vmware-toolbox &
Note: You may run VMware Tools as root or as a normal user. To shrink virtual
disks, you must run VMware Tools as root (su -).
Starting VMware Tools Automatically
I don't do this since the most recent version of the tools runs a user process.
The directions are here in case you need it for some reason.
You may find it helpful to configure your guest operating system so VMware
Tools starts when you start your X server. The steps for doing so vary
depending on your Linux distribution and your desktop environment. Check your
operating system documentation for the appropriate steps to take.
For example, in a Red Hat Linux 7.1 guest using GNOME, follow these steps.
1. Open the Startup Programs panel in the GNOME Control Center.
Main Menu (click the foot icon in the lower left corner of the screen) >
Programs> Settings> Session> Startup Programs
2. Click Add.
3. In the Startup Command field, enter vmware-toolbox
4. Click OK, click OK again. then close the GNOME Control Center.
The next time you start X, VMware Tools starts automatically.
Uninstalling VMware Tools
If you need to remove VMware Tools from your Linux guest operating system, log
on as root (su -) and run the following command:
vmware-uninstall-tools.pl
--
Jeff Guerdat
Isn't Disney World a people trap operated by a mouse?
--- JamNNTPd/Linux v1.0 - w/Mods by Hub2000
* Origin: Hub2000 FTN News Server (1:229/2000)
|