[an error occurred while processing this directive] Installing an Operating System onto a Raw Partition from a Virtual Machine [an error occurred while processing this directive] [an error occurred while processing this directive]
 
Installing an Operating System onto a Raw Partition from a Virtual Machine Using VMware Workstation for Linux

For some applications raw disks may provide better disk I/O performance than using a virtual disk. Hence, it is possible to install an operating system onto an extra, unused disk (or partition in some cases) from a virtual machine and access it while the Linux host runs simultaneously. However, with this configuration, the real computer may not be able to boot the freshly installed operating system -- the new operating system will most likely ONLY be accessible from a virtual machine. If you have a dual-boot system and want to configure a virtual machine to boot from an existing partition, please read this tech note. Just as with virtual disks, VMware Workstation enables a raw disk to be used in persistent, undoable, and nonpersistent modes; see this explanation of the disk modes.

VMware Workstation uses description files to access each raw IDE or SCSI disk on the host system. These description files contain access privilege information that controls a virtual machine's access to certain partitions on the disks. This mechanism is used to prevent users from accidentally trying to run the host operating system again as a guest, or another guest operating system that the virtual machine was not configured for. The description file also prevents accidental writes to raw disk partitions from badly behaved operating systems or applications.

Note: It is possible to specify using a raw device directly in the VMware Workstation Configuration Editor. This is potentially hazardous and VMware does not support users doing this. In future releases VMware Workstation will detect this situation and refuse to power on.

To install a new operating system onto an unused disk, a virtual machine must be created with the Configuration Wizard and then additionally configured through the Configuration Editor to recognize the extra, unused raw disk as being attached to its primary master IDE channel. If the latter step is not done, the guest operating system installation program will not be able to install its files nor will the virtual machine be able to boot from the raw disk.


Preparing to Install to an IDE Raw Disk

Use the following steps to prepare a virtual machine to install a new operating system onto an unused IDE raw disk.

Caution: Raw disk support is an advanced feature of VMware Workstation and should be enabled by users who are already familiar with the product. To familiarize yourself, you should at minimum, create and configure a virtual machine with a virtual disk, then install and use an operating system from the virtual machine.

  1. Identify the raw partition where the guest operating system will be installed.

    Check the guest operating system documentation regarding the type of partition to which the operating system can be installed. For example, operating systems like DOS, Windows 95 and Windows 98 must be installed to the first primary partition while others, like Linux, can be installed to a primary or extended partition on any part of the drive.

    Depending on the guest operating system you will run, identify an appropriate raw partition or disk for it to use. Check that the raw partition is NOT mounted by the Linux host and not in use by others. Also, be sure the raw partition or disk does not have data you will need in the future; otherwise, back it up.

  2. Set the device group membership or device ownership.

    The master raw disk device(s) needs to be readable and writeable by the user who runs VMware Workstation. On most distributions, the raw devices (such as /dev/hda, /dev/hdb) 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 of security in exploring different options here.

    It is typically a good idea 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 helps provide boot managers access to configuration 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.

  3. Launch the VMware Workstation Configuration Wizard.

  4. In the Configuration Wizard:

    1. Read the introductory text and click Next.

    2. Check the box for the operating system you have on raw disk and click Next.

    3. Specify the virtual machine directory and click Next.

    4. Choose Existing Partition from Virtual Disk Type Settings and click Next.

    5. Select the read/write option ONLY for the raw partition/disk (and its MBR) to which you want to install the guest operating system. If the raw disk you plan to use has multiple partitions already on it, be aware that certain operating systems (that is, DOS, Windows 95, Windows 98) must be installed on the first primary partition.

      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 will be accessing a raw disk partition while the host continues to run Linux, it is critical that you not allow the virtual machine to modify any partition mounted under Linux or in use by another virtual machine. To safeguard against this problem, be sure the raw disk partition you mark read/write for the virtual machine is not in use.

      Select No Access for the remaining raw partitions and click Next.

    6. Configure CD-ROM device settings as required and click Next.

    7. Configure floppy device settings as required and click Next.

    8. Configure networking settings as required and click Next.

    9. Look through the confirmation page to see what is about to be done. Click Back if you need to change settings. Note the location of the configuration file (.cfg). This is the file you will need to specify when you run VMware Workstation. Click Done.

  5. Start VMware Workstation and manually change the controller/channel assignment selected by the wizard:

    1. Type vmware <config-file>. Where <config-file> is the path of the configuration (.cfg) file created by the Wizard in the previous step.

    2. Open the Configuration Editor from the Settings menu and check that your IDE configuration specifies at least two raw disk description files; these files are named <configuration-name>.hda, <configuration-name>.hdb, etc.

    3. Identify the description file for the raw disk to which you will install the new guest operating system. For example, if your real machine has an unused disk on the secondary master IDE channel and you want to use this device for the virtual machine, you should see a file called <configuration-name>.hdc next to the virtual machine's IDE 1:0 configuration entry.

    4. Replace the description (.hda) file next to the virtual machine's IDE 0:0 channel with the description file you identified in the previous step.

    5. Remove the other raw disk description file(s) from the virtual machine's IDE configuration dialog and Click OK.

    6. Save the changes to the virtual machine's configuration file.

  6. At this point you are ready to begin installing the guest operating system into the raw disk you configured for the virtual machine. For more details, read the installation notes for various guest operating systems.
[an error occurred while processing this directive]