Workstation User’s Manual : Using Disks and Disk Drives : Adding Virtual and Physical Disks to a Virtual Machine : Using Physical Disks in a Virtual Machine

Using Physical Disks in a Virtual Machine
You can install a guest operating system directly on an unused physical disk or unused partition. However, an operating system installed in this setting probably cannot boot outside of the virtual machine, even though the data is available to the host.
 
*
 
Caution Do not use a physical disk to share files between host and guest operating systems. It is not safe to make the same partition visible to both host and guest. You can cause data corruption if you do this. To share files between host and guest operating systems, use shared folders. See Using Shared Folders.
For information about using an operating system that can also boot outside of the virtual machine, see the VMware’s Dual-Boot Computers and Virtual Machines technical note.
Physical disks are an advanced feature. Do not configure them unless you are an expert user. To use a physical disk in a virtual machine, you can add the physical disk to an existing virtual machine, or create a virtual machine and specify which physical disk the virtual machine uses.
 
Note Using a physical disk rather than a virtual disk is not an appropriate option for a virtual machine you intend to distribute as an ACE instance.
Prerequisites for Using a Physical Disk
Before you run the New Virtual Machine wizard or use the virtual machine settings editor to add a physical (raw) disk, perform the following tasks:
Because the virtual machine and guest operating system access a physical disk partition while the host continues to run its operating system, verify that the partition is not mounted by the host or in use by another virtual machine.
Corruption is possible if you allow the virtual machine to modify a partition that is simultaneously mounted on the host operating system.
If you use a Windows host’s IDE disk in a physical disk configuration, make sure it is not configured as the slave on the secondary IDE channel if the master on that channel is a CD-ROM drive.
If your host is running Windows 2000, Windows XP, or Windows Server 2003, do not use a dynamic disk as a physical disk in a virtual machine. Use the disk management tool to check the disk type and change a dynamic disk to a basic disk, which destroys all data. See Change a Windows Disk Type from Dynamic to Basic.
After you determine that the physical disk meets these prerequisites, use either of the following strategies to use the physical disk in a virtual machine:
Change a Windows Disk Type from Dynamic to Basic
To use a hard disk in a virtual machine whose host is running Windows 2000, Windows XP, or Windows Server 2003, the virtual machine must use a basic disk.
To change a Windows disk type from dynamic to basic
1
On the host, choose Start > Settings > Control Panel > Administrative Tools > Computer Management > Disk Management.
The disk management tool opens.
2
This action destroys all data on the disk.
3
4
Unmap a Partition That Is Mapped to a Windows NT Host
Corruption can occur if you allow the virtual machine to modify a physical disk partition that is simultaneously used as a mapped drive on the host.
To unmap a partition that is mapped to a Windows NT host
1
Choose Start > Programs > Administrative Tools.
2
3
Choose Do not assign a drive letter for the partition and click OK
Unmap a Partition That Is Mapped to a Windows Server 2003, Windows XP, or Windows 2000 Host
Corruption can occur if you allow the virtual machine to modify a physical disk partition that is simultaneously used as a mapped drive on the host.
To unmap a partition that is mapped to a Windows Server 2003, Windows XP, or Windows 2000 host
1
Choose Start > Settings > Control Panel > Administrative Tools > Computer Management > Storage > Disk Management.
2
Select a partition and choose Action > All Tasks > Change Drive Letter and Paths.
3
Click Remove
Unmap a Partition That Is Mapped to a Windows Vista Host
Corruption can occur if you allow the virtual machine to modify a physical disk partition that is simultaneously used as a mapped drive on the host.
To unmap a partition that is mapped to a Windows Vista host
1
Choose Start > Control Panel (Classic View) > Administrative Tools > Computer Management > Storage > Disk Management.
2
Right-click a partition and choose Change Drive Letter and Paths.
3
Click Remove.  
Set Permissions on Linux Hosts
If permissions are set correctly, the physical disk configuration files in Workstation guard access. This reliability provides boot managers access to configuration files and other files they might need to boot operating systems. For example, LILO needs to read /boot on a Linux partition to boot a non-Linux operating system that might be on another drive.
To set permissions on Linux hosts
1
Physical devices, such as /dev/hda (IDE physical disk) and /dev/sdb (SCSI physical disk), belong to group-id disk on most distributions. If this is the case, you can add VMware Workstation users to the disk group.
2
Grant VMware Workstation users access to all /dev/hd[abcd] physical devices that contain operating systems or boot managers.  
Create a Virtual Machine That Uses a Physical Disk
Use the New Virtual Machine wizard to create a new virtual machine that uses a physical disk rather than adding a physical disk to an existing virtual machine.
Before you begin, complete the tasks described in Prerequisites for Using a Physical Disk.
To create a virtual machine that uses a physical disk
1
2
On the Select a Disk page of the wizard, select Use a physical disk, and choose to use individual partitions or the entire disk.
If you use individual partitions, only the partitions you select are accessible to the virtual machine. The other partitions might be visible to the guest operating system, but you cannot mount, access, or format them.
3
a
b
On the Hardware tab, select the physical disk and click Advanced.
c
d
To exclude disks from snapshots, select Independent for the mode and choose one of the following options:
Persistent – Changes are immediately and permanently written to the disk.
Nonpersistent – Changes to the disk are discarded when you power off or revert to a snapshot.
See Information Captured by Snapshots.
4
For more information about supported operating systems, see the VMware Guest Operating System Installation Guide. This guide is available from the Workstation Help menu. 
Add a Physical Disk to an Existing Virtual Machine
Use the virtual machine settings editor, rather than the New Virtual Machine wizard, to add a physical disk to an existing virtual machine.
Before you begin, complete the tasks described in Prerequisites for Using a Physical Disk.
 
*
 
Caution After you add a virtual machine disk by using one or more partitions on a physical disk, never modify the partition tables by running fdisk or a similar utility in the guest operating system. If you do so, you must re-create the virtual machine’s physical disk.
To add a physical disk to an existing virtual machine
1
2
3
Choose VM > Settings.
4
On the Hardware tab, click Add.
5
On the Hardware Type page, select Hard Disk and click Next.
6
On the Select a Disk page, select Use a physical disk and click Next.
7
8
a
Workstation supports physical disks up to 2TB.
b
9
If you selected Use individual partitions, select the partitions you want to use in the virtual machine and click Next.
The virtual machine can access only the partitions you select. The guest operating system might be able to detect other partitions, but you cannot mount, access, or format them.
10
11
a
b
c
To exclude disks from snapshots, select Independent for the mode and choose one of the following options:
Persistent – Changes are immediately and permanently written to the disk.
Nonpersistent – Changes to the disk are discarded when you power off or revert to a snapshot.
See Information Captured by Snapshots.
12
Click Finish.
13