Sharing Disks between VMs

Two or more virtual machines can share a single hard disk drive. This scenario can be particularly useful for testing. For example, multiple users could load and test a program that has been set up in a standard way, but each user can test without impacting the other testers.

Only nonpersistent disks can be accessed concurrently by multiple VMs. Persistent or undoable disks can only be accessed by one VM at a time.

To share a hard disk drive between multiple VMs (VM1 and VM2):
  1. Using either the VM configuration wizard or VM configuration editor, define a virtual disk for VM1.
  2. Define the disk drive as a persistent disk. (See See Defining a Hard Drive.)

  3. Boot VM1 and Install the guest operating system.
  4. Open the VM configuration editor for VM1 and change the disk mode to nonpersistent.
  5. Using either the VM configuration wizard or VM configuration editor, choose the same virtual disk for VM2.
  6. Power on the VM(s).

When multiple VMs share a disk in this manner, each VM gets the same "copy" of the disk. All VMs are treated the same, regardless of the order powered on or which VM defined the disk. The work performed by each VM is written to a local redo log maintained for that VM only. The disk will appear to each VM as a conventional disk during the session. However, as for any nonpersistent disk, no changes are saved across sessions, because the redo log is discarded at normal termination of each session.