A raw disk is a physical IDE or SCSI disk that your host operating system detects. For example, with Linux as the host operating system, the IDE raw disks are /dev/hda through /dev/hdh. The SCSI raw disks are /dev/sda through /dev/sdp.
VMware GSX Server supports only raw disk partitions on IDE drives. Booting guest operating systems on raw SCSI drives is not supported. While booting from a SCSI raw disk may work, it is possible there may be incompatibilities between your SCSI adapter and the BusLogic adapter VMware GSX Server implements. However, if a virtual machine is configured with a virtual disk, instead of a raw disk partition, then its disk file can be stored on the file system, regardless of whether the underlying drive(s) containing the file system are IDE or SCSI.
To access each raw IDE device on the host machine, VMware GSX Server uses description files that contain access privilege information for controlling a virtual machine's access to certain partitions on the disks. This mechanism prevents users from accidentally trying to run the host operating system again as a guest or another guest operating system for which the virtual machine was not configured. The description file also prevents accidental writes to raw disk partitions from badly behaved operating systems or applications.
A safe raw disk file is a small file that describes how the different parts of a raw disk should be accessed by a virtual machine. The sample below shows the content of my_first_safe_raw_disk, a typical safe raw disk file for a Windows NT virtual machine running inside VMware GSX Server.
=== DEVICE /dev/hda # Partition type: MBR RDONLY 0 62 # Partition type: HPFS/NTFS ACCESS 63 8193149 # Partition type: Linux swap NO_ACCESS 8193150 8466254 ===
The virtual machine can access the /dev/hda raw disk. The access information for sectors on the raw disk is as listed in the following table.
Partition Type | Sectors | Access Rights |
Boot information | 0 through 62 inclusive | Read-Only |
NTFS or FAT | 63 through 8193149 inclusive | Read-Write |
Linux swap | 8193150 through 8466254 inclusive | Forbidden |
If the guest operating system inside the virtual machine attempts a forbidden read or write operation to the safe raw disk, VMware GSX Server displays a pop-up window asking the user to authorize or deny the access.
The master raw disk device(s) needs to be readable and writable by the user who runs VMware GSX Server. 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 GSX Server 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 GSX Server users access to all /dev/hd[abcd] raw devices that contain operating systems or boot managers and then rely on VMware GSX Server'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.
A new window appears, displaying a list of partitions present on your raw disk.
The following options are possible:
You are now ready to have your raw disk used by your virtual machine.
Before booting your virtual machine, please read Potential Issues With Using Raw Disks carefully. If you need to install an operating system on the raw disk, you may want to read Installing a Guest Operating System Onto a Raw Disk Partition. If there is already an operating system on the raw disk and you want to use it sometimes as a host operating system and sometimes as a guest operating system, you may want to read Setting Up Virtual Machines On a Dual-Boot System.
You can modify a safe raw disk file that has been generated previously. If you want to use another raw disk or if you have modified the layout of the partitions on the raw disk, first remove the safe raw disk file, then create a new safe raw disk file corresponding to the new raw disk.
If the raw disk has not changed, but you want to change the virtual machine's access rights to the raw disk (which means that you want to modify the safe raw disk file), click Edit Raw Disk, modify the appropriate settings, then click Save.
Raw disks are safe if used correctly. One of the dangers in using raw disks is simultaneous access to a partition by multiple users. That is, a raw disk partition should not be simultaneously used (mounted) by the host and the guest operating system. Because each operating system is unaware of the other, data corruption may occur if both operating systems read or write to the same partition. The purpose of safe raw disk files is to regulate disk operations in the guest operating system. Currently, VMware GSX Server does not regulate disk operations in the host operating system.
Consequently, you should ensure that your host operating system does not see the partitions with which your guest operating system works. The safety of raw disks depends only on this requirement.
If you need to exchange data between a host and a guest operating system, either serialize disk accesses (for example on Linux, mount the raw disk, put the data on it, unmount the disk, start the virtual machine, read the data, stop the virtual machine), or use network protocols such as SMB (Windows networking, implemented by Samba under Linux) or NFS.
Question |
Answer |
What does this message "The partition information in file <your Safe Raw Disk> doesn't match that of device <your Device field>." mean? |
It means the Configuration Editor has detected that the access rights in your safe raw disk file cannot be applied to the list of partitions present on the device you specified in the Device field. It typically happens in these cases:
To get rid of this message, the safest thing to do is to remove the safe raw disk file. |
Can I move a safe raw disk file from one physical machine to another? |
No, unless both machines have disks with identical content. Otherwise, VMware GSX Server detects the situation and issues a warning message as described previously. |
Can I mix raw disks and virtual disks in the same virtual machine? |
Yes. This feature is particularly useful when you want to transfer data to a virtual disk. However, be aware of potential issues described in Potential Issues With Using Raw Disks, below. |
Potential Issues With Using Raw Disks
Raw disks offer a reliable way to store your data if used correctly. However, be aware of the following:
A raw disk partition should not be simultaneously used (mounted) by the host and the guest operating system. This is because each operating system is unaware of the other and data corruption may occur if both operating systems read or write to the same partition.
The purpose of safe raw disk files is to regulate disk operations in the guest operating system, but VMware GSX Server does not regulate disk operations in the host operating system.
Make sure that your host operating system cannot access the partitions with which your guest operating system works.
If you need to exchange data between a host and a guest operating system, either serialize disk accesses (for example on a Linux host, mount the raw disk, put the data on it, unmount the disk, start the virtual machine, read the data in your guest operating system, then stop the virtual machine), or use your network to exchange data (for example, configure Samba to exchange data between Windows and Linux systems.)
© 2001-2002 VMware, Inc. All rights reserved.