Create a Configuration Template
Create a configuration file so that the d2drestorevm command can restore VMs based on the parameters specified in the file. The d2drestorevm file gathers all the specifications from the file and performs the restore based on the specifications.
Syntax
d2drestorevm --createtemplate=[save path]
The d2dutil --encrypt utility encrypts the password and provides an encrypted password. You must use this utility to encrypt all your passwords. If you use the --pwdfile=pwdfilepath parameter, then you must encrypt the password. You can use the utility one of the following methods:
Method 1
echo 'string' | ./d2dutil --encrypt
string is the password that you specify.
Method 2
Type the "d2dutil –encrypt" command and then specify your password. Press Enter and you will see the result on your screen. In this method, the password that you enter is not echoed on the screen.
Follow these steps:
- Log in to the Backup Server as a root user.
- Create the configuration template using the following command:
d2drestorevm --createtemplate=[save path]
[save path] indicates the location where the configuration template is created.
- Open the configuration template and update the following parameters in the configuration template:
job_name
Specifies the name of the restore job.
vm_type
Specifies the type of the hypervisor where you restore the VM. The valid types of hypervisors are Xen and OVM.
vm_server
Specifies the address of the hypervisor server. The address could be either the hostname or IP address.
vm_svr_username
Specifies the username of the hypervisor.
vm_svr_password
Specifies the password of the hypervisor. The password is encrypted using the d2dutil encryption utility.
vm_sub_server
Specifies the ESX server name when restoring to vCenter or Specifies the Prism element cluster name when restoring to Prism Central.
vm_svr_protocol
Specifies the protocol of the hypervisor when restoring to vCenter/ESX(i) or AHV.
vm_svr_port
Specifies the port of the hypervisor when restoring to vCenter/ESX(i) or AHV.
vm_name
Specifies the name of the target VM that is displayed in the hypervisor.
Important! The vm_name parameter must not contain any special characters except blank spaces and should only include the following characters: a-z, A-Z, 0-9, - and _.
vm_uuid
Specifies the uuid of the target VM.
vm_network
(Optional) Specifies the network name that you want to use. If you do not provide the network name, then the default network is auto-selected.
vm_memory
Specifies the memory of the virtual machine in MB when restoring to vCenter/ESX(i) or Hyper-V or AHV.
vm_cpu_count
Specifies the CPU count of the virtual machine when restoring to vCenter/ESX(i) or Hyper-V or AHV.
vm_resource_pool
Specifies the resource pool of the hypervisor when restoring to vCenter/ESX(i) or AHV.
vm_datastore
Specifies the datastore of the hypervisor when restoring to vCenter/ESX(i) or AHV.
storage_location_type
Specifies the type of the storage location of the session. The storage location can be CIFS, NFS, or RPS.
storage_location
Specifies the storage server location of the session. The storage location can be CIFS or NFS.
storage_username
Specifies the username when you use the CIFS as the storage location.
storage_password
Specifies the password when you use the CIFS as the storage location. The password is encrypted using the d2dutil encryption utility.
rps_server
Specifies the Recovery Point Server name when storage_location_type is RPS.
rps_server_username
Specifies the username of Recovery Point Server when storage_location_type is RPS.
rps_server_password
Specifies the password of Recovery Point Server when storage_location_type is RPS. The password is encrypted using the d2dutil encryption utility.
rps_server_protocol
Specifies the protocol of Recovery Point Server when storage_location_type is RPS.
rps_server_port
Specifies the port of Recovery Point Server when storage_location_type is RPS.
rps_server_datastore
Specifies the data store name of Recovery Point Server when storage_location_type is RPS.
encryption_password
Specifies the session encryption password. The password is encrypted using the d2dutil encryption utility.
source_node
Specifies the node name of the source whose recovery point is used to restore.
recovery_point
Specifies the session that you want to restore. Typically, a recovery session is in the following format: S00000000X, where X is a numeric value. If you want to restore the most recent session, specify the keyword 'last'.
guest_hostname
Specifies the host name that you want to provide after you restore the VM.
guest_network
Specifies the network type that you want to configure. The network could either dhcp or static.
guest_ip
Specifies the IP address when you specify the Static IP.
guest_netmask
Specifies the network mask when you specify the static IP.
guest_gateway
Specifies the gateway address when you specify the static IP.
guest_dns
Specifies the DNS address when you specify the static IP.
guest_reboot
(Optional) Specifies whether the target VM should be restarted after the VM is restored. The values are yes and no.
Default: no
guest_reset_username
(Optional) Specifies to reset the password to the value you provide in the guest_reset_password parameter.
guest_reset_password
(Optional) Specifies to reset the password to the specified value. The password is encrypted using the d2dutil encryption utility.
enable_instant_restore
(Optional) Specifies to enable instant restore. The values are yes and no.
auto_restore_data
(Optional) Specifies to restore data automatically. The values are yes and no.
script_pre_job_server
(Optional) Specifies the script to run before the job is executed on the server.
script_post_job_server
(Optional) Specifies the script to run after the job is executed on the server.
script_pre_job_client
(Optional) Specifies the script to run before the job is executed on the client.
script_post_job_client
(Optional) Specifies the script to run after the job is executed on the client.
script_ready_to_use
(Optional) Specifies the script to run when the target machine is ready to use and when the parameter enable_instant_restore value is Yes.
force
Specifies whether to force restore the VM. The values are yes and no.
Default: no
exclude_volumes
Specifies the volume(s) to exclude for the target VM.
Do not exclude volume '/’. Use ':' to separate multiple volumes.
include_volumes
Specifies the volume(s) to include for the target VM.
Must include following volumes: / , /boot , /boot/efi , /home , /usr , /usr/local. Use ':' to separate multiple volumes.
- Save and close the configuration template.
The configuration template is successfully created.