Previous Topic: Review the Prerequisites and ConsiderationsNext Topic: (Optional) Create a Global Configuration File


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:

  1. Log in to the Backup Server as a root user.
  2. Create the configuration template using the following command:
    d2drestorevm --createtemplate=[save path]
    

    [save path] indicates the location where the configuration template is created.

  3. 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, ovm, and rhev.

    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. The username must be in the following format for RHEV:

    [username]@[domain]
    

    The username must be in the following format for OVM and Xen:

    [username]
    
    vm_svr_password

    Specifies the password of the hypervisor. The password is encrypted using the d2dutil encryption utility.

    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.

    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.

    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

    Specify the gateway 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.

    force

    Specifies whether to force restore the VM. The values are yes and no.

    Default: no

  4. Save and close the configuration template.

The configuration template is successfully created.