Backtrack:  
 
by lunarg on June 9th 2017, at 13:31

In VMWare Workstation and vSphere ESX, it is possible to set disks to be independent so they are not linked to snapshots. Independent disks can then be set to be Persistent (changes are written immediately and permanently to disk) or Non-persistent (changes are lost when the VM powers down). In VMWare Fusion, although this option does not seem to be present, it is still available, and can be configured by manually changing the parameters in the VM configuration file (.vmx).

A VM configuration file is a text-based file containing all the parameters and properties for a VM. This file can include options that are not present in the Fusion UI. By adding parameters manually, you can enable features that are otherwise not configurable.

To set a disk to independent mode, first figure out how the disk is configured. This can be IDE, SATA or SCSI, along with a BUS/LUN number. The most easiest way to do this is to check the name of the disk in Fusion, and then look for it in the configuration file. Once the device type and BUS/LUN numbers are known, add a line to the VMX-file for the disk to set its mode:

[ideN:N|scsiN:N|sataN:N].mode = "independent-persistent"
[ideN:N|scsiN:N|sataN:N].mode = "independent-nonpersistent"

Depending on whether you want the disk to be persistent or non-persistent, adjust the value accordingly.

Example

To clarify the above, let's take a look at the following example:

A Windows 7 VM has one disk connected to SCSI 0:0 and another connected to SCSI 0:1. The VMX-file would then show the following lines:

scsi0:0.present = "TRUE"
scsi0:0.fileName = "Virtual Disk.vmdk"
scsi0:1.present = "TRUE"
scsi0:1.fileName = "Virtual Disk 2.vmdk"

Suppose you want the first disk to be dependent to snapshots but the second disk (e.g. containing your user profiles) to be independently so you won't lose data when working with snapshots.

The second disk's device and type is scsi0:1, which is the one needing its mode set to independent.

Add a new line to the file, stating the mode for that particular disk:

scsi0:1.mode = "independent-persistent"

If you want the disk to be non-persistent, add a line like so:

scsi0:1.mode = "independent-nonpersistent"

Note that to be able to edit the file, the VM will need to be powered down. Otherwise, the file will be locked for editing.

 
 
« March 2024»
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
31      
 
Links
 
Quote
« You only find out who is swimming naked when the tide goes out. »
Warren Buffett