Contents
Previous Next
Configuring Dual- or Multiple-Boot Systems to Run with VMware Workstation
VMware Workstation uses description files to control access to each raw IDE device on the system. These description files contain access privilege information that controls a virtual machine's access to certain partitions on the disks. This mechanism prevents users from accidentally running the host operating system again as a guest or running a guest operating system that the virtual machine was not configured to use. The description file also prevents accidental corruption of raw disk partitions by badly behaved operating systems or applications.
Use the New Virtual Machine Wizard to configure VMware Workstation to use existing raw disk partitions. The wizard guides you though creating a configuration for a new virtual machine including configuring the raw disk description files. Typically, you rerun the wizard to create a separate configuration for each guest operating system installed on a raw partition.
If a boot manager is installed on the computer system, the boot manager runs inside the virtual machine and presents you with the choice of guest operating systems to run. You must manually choose the guest operating system that this configuration was intended to run.
This section continues with the following topics:
Windows 2000, Windows XP and Windows Server 2003 Dynamic Disks
Using the LILO Boot Loader
If you are using the LILO boot loader and try to boot a virtual machine from an existing raw partition, you may see L 01 01 01 01 01 01 ... instead of a LILO: prompt. This can happen regardless of the host operating system. As part of booting a physical PC or a virtual machine, the BIOS passes control to code located in the master boot record (MBR) of the boot device. LILO begins running from the MBR, and in order to finish running correctly, it needs access to the native Linux partition where the rest of LILO is locatedusually the partition with the /boot directory. If LILO can't access the rest of itself, an error message like the one above appears.
To avoid the problem, follow the configuration steps below and be sure to select the native Linux partition where the rest of LILO is located. The next time the virtual machine tries to boot, the LILO code in the MBR should be able to access the rest of LILO and display the normal LILO: prompt.
Configuring a Windows Host
Use the following steps to run a guest operating system from a raw disk.
Note: If you use a Windows host's IDE disk in a raw disk configuration, you must not configure it as the slave on the secondary IDE channel if the master on that channel is a CD-ROM drive.
1. If you are running a Windows guest operating system, read
Setting Up Hardware Profiles in Virtual Machines. You should boot the guest operating system natively on the computer and create a hardware profile for the virtual machine before proceeding.
2. Create a separate configuration for each guest operating system.
To configure a virtual machine to run from a raw disk or disk partition, start the New Virtual Machine Wizard (File > New > Virtual Machine) and select Custom.
3. When you reach the Select a Disk step, select Use a physical disk.
4. Complete the wizard steps, specifying the appropriate disk or partition to use for this virtual machine.
Note: The maximum size of an IDE disk in a virtual machine is 950 GB.
5. To run multiple guest operating systems from different raw disk partitions, unmap these partitions on the host.
On a Windows NT host, use the Disk Administrator (Start > Programs > Administrative Tools). First highlight the partition that contains the guest operating system, then select Assign Drive Letter from the Tools menu. In this form, choose Do not assign a drive letter for the partition and click OK. The unmapping happens immediately.
On a Windows Server 2003, Windows XP or Windows 2000 host, use Disk Management (Start > Settings > Control Panel > Administrative Tools > Computer Management > Storage > Disk Management). Select the partition you want to unmap, then from the Action menu select All Tasks > Change Drive Letter and Path. Click the Remove button.
6. Use the Virtual Machine Settings editor (VM > Settings) if you want to change any configuration options from the wizard defaultsfor example, to change the amount of memory allocated to the guest operating system.
7. If you have multiple IDE drives configured on a system, the VMware BIOS normally attempts to boot them in this sequence:
a. Primary master
b. Primary slave
c. Secondary master
d. Secondary slave
If you have multiple SCSI drives configured on a system, the VMware BIOS normally attempts to boot them in the order of the SCSI device number.
If you have both SCSI and IDE drives configured, the VMware BIOS normally attempts to boot SCSI drives followed by IDE drives, in the order described above.
The boot sequence can be changed in the Boot menu of the virtual machine's Phoenix BIOS. After powering on the virtual machine, press F2 during the BIOS boot in the virtual machine to enter the BIOS setup menu.
8. Power on the virtual machine. Click the Power On button. The virtual machine starts, runs the Phoenix BIOS, then boots from the master boot record (MBR).
Choose the target operating system from the list of options offered by the boot manager.
9. Remember that your virtual machine hardware environment, which the guest operating system is about to run in for the first time, probably differs significantly from the physical hardware of your host computer.
For Windows guest operating systems, Plug and Play reconfigures Windows. Set up your virtual hardware profile with the devices found and configured by Plug and Play.
See
Setting Up Hardware Profiles in Virtual Machines for more information.
10. Install VMware Tools in your guest operating system.
Warning: If you take snapshots while using your raw disk, before you reboot your guest operating system natively you must either:
Revert to a snapshot and delete all other snapshots.
Delete all snapshots.
This is necessary because any changes to sectors on the physical disk that have been modified on the disk invalidate all snapshots for the disk.
Configuring a Linux Host
1. If you are running a Windows guest operating system, read
Setting Up Hardware Profiles in Virtual Machines. You should boot the guest operating system natively on the computer and create a hardware profile for the virtual machine before proceeding.
2. Create a separate configuration for each guest operating system.
3. Check operating system partition mounts. Be sure the existing disk partitions that you plan to configure the virtual machine to use are not mounted by Linux.
4. Set the device group membership or device ownership.
The master raw disk device or devices need to be readable and writable by the user who runs VMware Workstation. On most distributions, the raw devices, such as /dev/hda (IDE raw disk) and /dev/sda (SCSI raw disk) belong to group-id disk. If this is the case, you can add VMware Workstation users to the disk group. Another option is to change the owner of the device. Please think carefully about security issues when exploring different options here.
Often, the most convenient approach is to grant VMware Workstation users access to all /dev/hd[abcd] raw devices that contain operating systems or boot managers and then rely on VMware Workstation's raw disk configuration files to guard access. This provides boot managers access to configuration files and other files they may need to boot the operating systems. For example, LILO needs to read /boot on a Linux partition to boot a non-Linux operating system that may be on another drive. As noted above, you should consider the security implications of the configuration you choose.
5. If you plan to run a second Linux installation from an existing partition as a guest operating system and your physical computer's /etc/lilo.conf has a memory register statement such as Append= "mem...", you may want to adjust the append memory parameter or create a new entry in LILO for running Linux in a virtual machine.
If the amount of memory configured in lilo.conf exceeds the amount of memory assigned to the virtual machine, then when the virtual machine tries to boot the second Linux installation, the guest operating system will most likely panic.
You can create another entry in lilo.conf for running Linux in a virtual machine by specifying a different amount of memory than what would normally be recognized when Linux boots directly on the physical machine.
6. To configure a virtual machine to run from a raw disk partition, start the New Virtual Machine Wizard (File > New > Virtual Machine) and select Custom.
7. When you reach the Select a Disk step, select Use a physical disk.
8. Complete the wizard steps, specifying the appropriate disk or partition to use for this virtual machine.
Caution: Corruption is possible if you allow the virtual machine to modify a partition that is simultaneously mounted under Linux. Since the virtual machine and guest operating system access an existing partition while the host continues to run Linux, it is critical that the virtual machine not be allowed to modify any partition mounted under Linux or in use by another virtual machine.
To safeguard against this problem, be sure the partition you use in the virtual machine is not mounted under the Linux host.
9. Complete the remaining steps in the wizard.
10. If you have multiple IDE drives configured on a system, the VMware BIOS normally attempts to boot them in this sequence:
a. Primary master
b. Primary slave
c. Secondary master
d. Secondary slave
If you have multiple SCSI drives configured on a system, the VMware BIOS normally attempts to boot them in the order of the SCSI device number.
If you have both SCSI and IDE drives configured, the VMware BIOS normally attempts to boot SCSI drives followed by IDE drives, in the order described above.
You can change the boot sequence using the Boot menu of the virtual machine's Phoenix BIOS. To enter the BIOS setup utility, power on the virtual machine and press F2 as the virtual machine begins to boot.
11. Power on the virtual machine. Click the Power On button. The virtual machine starts, runs the Phoenix BIOS, then boots from the master boot record (MBR).
Choose the target operating system from the list of options offered by the boot manager.
12. Remember that your virtual machine hardware environment, which the guest operating system is about to run in for the first time, probably differs significantly from the physical hardware of your machine.
For Windows guest operating systems, Plug and Play reconfigures Windows. Set up your virtual hardware profile with the devices found and configured by Plug and Play.
See
Setting Up Hardware Profiles in Virtual Machines for more information.
13. Install VMware Tools in your guest operating system.
Warning: If you take snapshots while using your raw disk, before you reboot your guest operating system natively you must either:
Revert to a snapshot and delete all other snapshots.
Delete all snapshots.
This is necessary because any changes to sectors on the physical disk that have been modified on the disk invalidate all snapshots for the disk.
Setting Up Hardware Profiles in Virtual Machines
Certain operating systems use hardware profiles to load the appropriate drivers for a given set of hardware devices. If you have a dual-boot system and want to use a virtual machine to boot a previously installed operating system from an existing partition, you must set up "physical" and "virtual" hardware profiles.
Only users who are familiar with VMware Workstation virtual machines and the Windows hardware profiles concept should attempt this.
Each virtual machine provides a platform that consists of the following set of virtual devices:
Virtual DVD/CD-ROM
Virtual IDE and SCSI hard disk drives
Standard PCI graphics adapter
Standard floppy disk drive
Intel 82371 PCI Bus Master IDE controller
(includes primary and secondary IDE controllers)
BusLogic BT-958 compatible SCSI host adapter
Standard 101/102-key keyboard
PS/2-compatible mouse
AMD PCnet-PCI II compatible Ethernet adapter
Serial ports (COM1-COM4)
Parallel ports (LPT1-LPT2)
Two-port USB hub
Sound card compatible with the Sound Blaster AudioPCI
82093AA IOAPIC
This set of virtual devices is different from the set of physical hardware devices on the host computer and is independent of the underlying hardware with a few exceptions (the processor itself is such an exception). This feature provides a stable platform and allows operating system images installed within a virtual machine to be migrated to other physical machines, regardless of the configuration of the physical machine.
If an operating system is installed directly into a VMware Workstation virtual machine, the operating system properly detects all the virtual devices by scanning the hardware. However, if an operating system is already installed on the physical computer (for example, in a dual-boot configuration), the operating system already is configured to use the physical hardware devices. In order to boot such a preinstalled operating system in a virtual machine, you need to create separate hardware profiles in order to simplify the boot process.
Microsoft Windows operating systems, beginning with Windows 95 and Windows NT 4.0, allow you to create hardware profiles. Each hardware profile is associated with a set of known devices. If more than one hardware profile exists, the system prompts the user to choose between different hardware profiles at boot time.
Windows 95, Windows 98, Windows Me, Windows 2000, Windows XP and Windows Server 2003 use Plug and Play at boot time to confirm that the actual devices match the chosen hardware profile. Mismatches lead to the automatic detection of new devices. Although this operation succeeds, it can be fairly slow.
Windows NT does not have Plug and Play support and uses the hardware profiles to initialize its devices. Mismatches lead to errors reported by the device drivers and the devices are disabled.
In order to set up hardware profiles for your physical and virtual machines, follow these steps:
1. Before running VMware Workstation to boot an operating system previously installed on a disk partition, boot the operating system natively and create two hardware profiles, which you can call Physical Machine and Virtual Machine. To do this, open Control Panel > System, then click the Hardware Profiles tabor click the Hardware tab, then click Hardware Profiles, depending on the operating system. Click the Copy button and name the copies appropriately.
2. Windows NT only: While still running the operating system natively, use the Device Manager to disable some devices from the Virtual Machine hardware profile. To do this, open Control Panel > Devices, then select the individual devices to disable. Devices to disable in the Virtual Machine hardware profile include audio, MIDI and joystick devices, Ethernet and other network devices and USB devices. Remember to disable them in the Virtual Machine hardware profile only.
Skip this step if you are running Windows 95, Windows 98, Windows Me, Windows 2000, Windows XP or Windows Server 2003. The initial Plug and Play phase detects device mismatches.
3. Reboot the computer into your intended host operating systemfor example, into Linux if you are running VMware Workstation on a Linux host.
5. Boot the virtual machine and use your existing boot manager to select the guest operating system. Choose Virtual Machine at the hardware profile menu prompt. You encounter device failure messages and delays during this initial boot.
6. Windows Server 2003, Windows XP and Windows 2000 guests: After you log on to Windows Server 2003, Windows XP or Windows 2000 (now running as a guest operating system) you should see a Found New Hardware dialog box for the video controller as Plug and Play runs and discovers the virtual hardware. Do not install drivers at this time. Click Cancel to close the Found New Hardware dialog box.
Do not reboot the virtual machine. Click No in the System Settings Change/Reboot dialog box.
Windows Server 2003, Windows XP or Windows 2000 automatically detects and loads the driver for the AMD PCnet PCI Ethernet card. At this point, you should install VMware Tools inside the virtual machine. Allow the virtual machine to reboot after VMware Tools has been installed. Once Windows Server 2003, Windows XP or Windows 2000 reboots inside the virtual machine, select a new SVGA resolution from the Settings tab of the Display Properties dialog box to increase the size of the virtual machine's display window.
Windows 95 and Windows 98 guests: You should see New Hardware Detected dialog boxes as Plug and Play runs and discovers the virtual hardware. Windows prompts you for locations to search for device drivers. Most of the device drivers are available in the existing operating system installation, but you may need the installation CD-ROM for some networking device drivers. Windows also asks you to reboot your system several times as it installs the device drivers.
In some instances, Windows may not recognize the CD-ROM drive when it prompts you to insert the CD-ROM to look for device drivers during the initial hardware detection. In such cases, you can cancel the installation of the particular device or try pointing to C:\windows\system\ to search for device drivers on the hard disk. Any failed device installations may be performed at a later time after the CD-ROM drive is recognized.
After Windows has installed the virtual hardware and its drivers, you can remove the failed devices corresponding to the physical hardware using the Device Manager (Control Panel > System > Device Manager).
Select the device, then click the Remove button. If a device appears in multiple hardware profiles, you can select the hardware profile or profiles from which to remove the device.
If you want to enable the virtual machine's sound adapter to work inside the Windows 9x guest operating system, finish the remaining steps in this section, then refer to
Configuring Sound.
Windows NT guests only: After the operating system has finished booting in the virtual machine, view the event log to see which physical devices have failed to start properly. You can disable them from the Virtual Hardware profile using the Device Manager (Control Panel > Devices).
If you want to enable the virtual machine's sound adapter to work inside the Windows NT guest operating system, finish the remaining steps in this section, then refer to
Configuring Sound.
7. Confirm that your virtual devicesspecifically, the network adapterare working properly.
Windows 95 and Windows 98 guests: If any virtual device is missing, you can detect it by running Control Panel > Add New Hardware.
8. Install VMware Tools. VMware Tools appears and runs in both hardware configurations but affects only the virtual machine.
Note: The next time you reboot Windows natively using the Physical Machine hardware profile, some virtual devices may appear in the device list. You can disable or remove these virtual devices from the Physical Machine hardware profile in the same way that you removed physical devices from the virtual machine hardware profile in
step 6, above.