Linux operating systemsWindows operating systems

Preview virtual machine restore operations

You can use the -preview parameter to verify the results of a restore operation without restoring any virtual machines (VMs). The -preview parameter provides a list of VMs that will be restored and information about the VMs. To understand how to use the -preview parameter with the restore vm command, review information about the options that are displayed and examples of the restore vm -preview command.

The -preview parameter returns options and their values only if the options override the default values or if no default exists.

The options that are displayed depend on various factors:
  • The following options apply to all VM restore operations:
    VMNAME
    DATACENTER
    DATASTORE
    HOST
  • The following options are displayed when they are set in the client options file:
    VMDEFAULTDVPORTGROUP
    VMDEFAULTDVSWITCH
    VMDEFAULTNETWORK
  • The following option is always displayed only during previews of non-instant restore operations:
    VMBACKDIR

    The value that is returned for this option is the directory CTL files that are cached for both backup and restore operations.

  • The following options are displayed when set during previews of instant access restore operations:
    VMDISKPROVISION
    VMAUTOSTARTVM

When you issue the -preview parameter with the restore vm command, the restore operation does not start. The restore operation starts only if the -preview parameter is removed from the command.

Examples

Task
Preview the operation to restore the VM named VM8, and exclude the disk Hard Disk 1. The VM is restored to the ESXi host server esx03 with a new VM name that ends with -restore.

The command also displays the port group for the NICs to use, the distributed virtual switch (dvSwitch) that contains the port group, and the network for the NICs to use during the restore operation.

dsmc restore vm "VM8:-vmdk:Hard Disk 1" -vmname="* -restore" 
-vmdfaultdvportgroup=portgroup1 -vmdefaultdvswitch=switch1 
-vmdefaultnetwork=network1 -host=esx03.example.com -preview
Command output:
Restore function invoked.

Restore VM command started. Total number of virtual machines to process: 1

1.      VM Name: 'VM8'
        Mode: 'Incremental Forever - Full'
        Backup Time: IFFULL 05/22/2017 11:08:33

        Disk 1 Label:        'Hard Disk 1'
        Disk 1 Name:         '[TSMV5K2:DS1_VMData (26TB)] VM8/TestVM8.vmdk'
        Disk 1 Status:       Excluded by user
        Disk 1 Capacity:     42,949,672,960
        Disk 1 Data to Send: 42,878,369,792

        Disk 2 Label:        'Hard Disk 2'
        Disk 2 Name:         '[TSMV5K2:DS1_VMData (26TB)] VM8/TestVM8_1.vmdk'
        Disk 2 Status:       Selected
        Disk 2 Capacity:     10,737,418,240
        Disk 2 Data to Send: 10,737,418,240

        Destination Name:       'VM8 -restore'
        Destination Host:       'esx03.example.com'
        Destination vPortGroup: 'portgroup1'
        Destination Switch:     'switch1'
        Destination Network:    'network1'
        Destination CTL Folder: 'C:\mnt\tsmvmbackup'
Task
Preview the instant restore operation of the VM named VM8, which also excludes the disk Hard Disk 1. The VM is restored to the ESXi host server esx03 with a new VM name that ends with -restore.

The command also displays the port group for the NICs to use, the distributed virtual switch (dvSwitch) that contains the port group, and the network for the NICs to use during the restore operation. The new VM is provisioned as a thick VM and will be restarted automatically after the restore operation.

restore vm "VM8:-vmdk=Hard Disk 1" -vmname="* -restore" 
-vmdefaultdvportgroup=portgroup1 -vmdefaultdvswitch=switch1 
-vmdefaultnetwork=network1 -host=esx03.storage.example.com 
-vmrestoretype=instantrestore -vmdiskprovision=thick 
-vmautostartvm=yes -preview
Command output:
1.      VM Name: 'VM8'
        Mode: 'Incremental Forever - Full'
        Backup Time: IFFULL 05/22/2017 11:08:33

        Disk 1 Label:        'Hard Disk 1'
        Disk 1 Name:         '[TSMV5K2:DS1_VMData (26TB)] VM8/TestVM8.vmdk'
        Disk 1 Status:       Excluded by user
        Disk 1 Capacity:     42,949,672,960
        Disk 1 Data to Send: 42,878,369,792

        Disk 2 Label:        'Hard Disk 2'
        Disk 2 Name:         '[TSMV5K2:DS1_VMData (26TB)] VM8/TestVM8_1.vmdk'
        Disk 2 Status:       Selected
        Disk 2 Capacity:     10,737,418,240
        Disk 2 Data to Send: 10,737,418,240

        Destination Name:       'VM8 -restore'
        Destination Host:       'esx03.example.com'
        Destination vPortGroup: 'portgroup1'
        Destination Switch:     'switch1'
        Destination Network:    'network1'
        Destination Provision:  'THICK'
        Destination Autostart:  YES