[{"label":"Latest (2.0.0)","version":"latest"},{"version":"1.0.0"}]
srm-rest-api

Update Plan Virtual Machine Recovery Settings

Description

Update recovery settings for a protected virtual machine.

Request

Request

URL

URL


post
https://{api_host}//pairings/{pairing_id}/recovery-management/plans/{plan_id}/vms/{vm_id}/recovery-settings/actions/update
Copy

Path Parameters

Path Parameters

string
pairing_id Required

The ID of a pairing between this Site Recovery Manager server and remote one.


string
plan_id Required

The ID of a recovery plan defined within current pairing.


string
vm_id Required

The ID of a virtual machine.


Request Body

Request Body

VmRecoverySettingsSpec of mimetype application/json Required

Spec describing VM recovery settings.

{
	"ip_customization_type": "AUTO",
	"priority": "P1",
	"shutdown_action_settings": {
		"timeout_seconds": 0
	},
	"startup_action": "POWER_ON"
}
shutdown_action_settings Required

Recovery settings related to power off of a VM.


string
ip_customization_type Required

IP customization modes:

  • Auto (AUTO)
    • If the advanced setting ‘recovery.useIpMapperAutomatically’ is set to True - Site Recovery Manager evaluates the IP subnet mapping rules during recovery to customize the virtual machines.
    • If the advanced setting ‘recovery.useIpMapperAutomatically’ is set to False - Site Recovery Manager does not evaluate the IP subnet mapping rules during recovery.
  • Use IP customization rules if applicable (NETWORK_LEVEL)
    • Site Recovery Manager will evaluate the IP subnet mapping rules during recovery of the concrete VM regardless of the advanced setting value of recovery.useIpMapperAutomatically.
  • Manual IP customization (MANUAL)
    • Manually set up explicit recovery IP settings per VM.
  • No IP customization (NO_CUSTOMIZATION)
    • Do not change VM IP settings during recovery.

Possible values are: AUTONETWORK_MAPPING_LEVELMANUALNO_CUSTOMIZATION


string
priority Required

Recovery priority group. Used to translate server priority values to client priorities. The recovery priority for this VM. P1 is the highest and P5 is the lowest priority.

Possible values are: P1P2P3P4P5


string
startup_action Required

Startup action after recovery:

  • DO_NOT_POWER_ON - The VM will not be powered on and post-power-on steps will not be executed as partof the recovery and test workflows. Note that the VM may still get powered onduring recovery as part of the IP customization workflow.
  • POWER_ON - The VM will be powered on and post-power-on steps will be executed as part of the recovery and test workflows.

Possible values are: POWER_ONDO_NOT_POWER_ON


array of NicSettings
nic_settings Optional

Contains the IP settings for all the virtual ethernet cards on the VM


array of Callout
post_power_on_steps Optional

Contains all per VM steps that should be executed after the VM is powered on


array of Callout
pre_power_on_steps Optional

Contains all per VM steps that should be executed before the VM is powered on


array of DependentVm
dependent_vms Optional

This is a list of VM identities that must be powered-on before this VM can be powered on. Dependencies are only valid within VMs of the same recovery priority. If there are dependent VMs that are not in the current plan and same recovery priority, they will be ignored. This list may contain VMs that are not contained by any protection group in the plan. But it will only contain valid VMs.


startup_action_settings Optional

Recovery settings related to power-on of a VM

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

202 Accepted

Returns TaskDrResponseEntity of type application/json

Task to monitor the operation progress.

{
	"_meta": {
		"errors": [
			{
				"code": "string",
				"field": "string",
				"message": "string"
			}
		]
	},
	"complete_time": 0,
	"description": "string",
	"description_id": "string",
	"entity": "string",
	"entity_name": "string",
	"error": {
		"details": "string",
		"message": "string"
	},
	"id": "string",
	"progress": 0,
	"queued_time": 0,
	"result": {},
	"start_time": 0,
	"status": "QUEUED"
}
_meta Optional

Response meta data. Contains data about the response payload data.

Errors

Errors

ResponseError
400

Bad request - the server could not understand the request due to invalid syntax or invalid request body content


401

Unauthorized - the client must authenticate itself to get the requested response


ResponseError
403

Forbidden - not sufficient access rights to fulfill the request


404

Not Found - server cannot find the requested in URL resource


ResponseError
500

Internal server error - unexpected condition prevents fulfilling the request

Code Samples

Code Samples

PowerCLI Client SDK Example

$GeneralIpV4Setting = Initialize-SrmGeneralIpV4Setting -IpAddress "MyIpAddress" -Type "DHCP" -DefaultGateway "MyDefaultGateway" -AlternateGateway "MyAlternateGateway" -SubnetMask "255.255.255.0"
$GeneralIpV6Setting = Initialize-SrmGeneralIpV6Setting -IpAddress "fdda:5cc1:23:4::1f" -Type "DHCP" -DefaultGateway "MyDefaultGateway" -AlternateGateway "MyAlternateGateway" -SubnetPrefixLength 0
$DnsSetting = Initialize-SrmDnsSetting -Type "DHCP" -PreferredServer "MyPreferredServer" -AlternateServer "MyAlternateServer" -Suffixes "MySuffixes"
$WinsSetting = Initialize-SrmWinsSetting -PrimaryServer "MyPrimaryServer" -AlternateServer "MyAlternateServer"
$IpSettings = Initialize-SrmIpSettings -IpV4 $GeneralIpV4Setting -IpV6 $GeneralIpV6Setting -Dns $DnsSetting -Wins $WinsSetting
$NicSettings = Initialize-SrmNicSettings -DeviceId 0 -PrimaryIpSettings $IpSettings -SecondaryIpSettings $IpSettings
$ShutdownActionSettings = Initialize-SrmShutdownActionSettings -SkipShutdownGuest $false -TimeoutSeconds 0
$Callout = Initialize-SrmCallout -Name "MyName" -Content "MyContent" -CalloutType "PROMPT" -TimeoutSeconds 0 -StepType "PRE_POWER_ON" -Id "MyId"
$StartupActionSettings = Initialize-SrmStartupActionSettings -PowerOnVmtoolsTimeoutSeconds 0 -DelayBeforePowerOnStepsAndDependentVmsSeconds 0
$DependentVm = Initialize-SrmDependentVm -Id "MyId" -Name "MyName" -Template $false -InsideVapp $false -Status "OK" -PriorityGroup "P1" -ProtectionGroupName "MyProtectionGroupName"
$VmRecoverySettingsSpec = Initialize-SrmVmRecoverySettingsSpec -IpCustomizationType "AUTO" -NicSettings $NicSettings -Priority "P1" -StartupAction "POWER_ON" -ShutdownActionSettings $ShutdownActionSettings -PrePowerOnSteps $Callout -PostPowerOnSteps $Callout -StartupActionSettings $StartupActionSettings -DependentVms $DependentVm
Invoke-SrmUpdatePlanVirtualMachineRecoverySettings -pairingId "MypairingId" -planId "MyplanId" -vmId "MyvmId" -vmRecoverySettingsSpec $vmRecoverySettingsSpec

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"dependent_vms":[{"id":"string","inside_vapp":false,"name":"string","priority_group":"P1","protection_group_name":"string","status":"OK","template":false}],"ip_customization_type":"AUTO","nic_settings":[{"device_id":0,"primary_ip_settings":{"dns":{"alternate_server":"string","preferred_server":"string","suffixes":["string"],"type":"DHCP"},"ip_v4":{"alternate_gateway":"string","default_gateway":"string","ip_address":"string","subnet_mask":"255.255.255.0","type":"DHCP"},"ip_v6":{"alternate_gateway":"string","default_gateway":"string","ip_address":"fdda:5cc1:23:4::1f","subnet_prefix_length":0,"type":"DHCP"},"wins":{"alternate_server":"string","primary_server":"string"}},"secondary_ip_settings":{"dns":{"alternate_server":"string","preferred_server":"string","suffixes":["string"],"type":"DHCP"},"ip_v4":{"alternate_gateway":"string","default_gateway":"string","ip_address":"string","subnet_mask":"255.255.255.0","type":"DHCP"},"ip_v6":{"alternate_gateway":"string","default_gateway":"string","ip_address":"fdda:5cc1:23:4::1f","subnet_prefix_length":0,"type":"DHCP"},"wins":{"alternate_server":"string","primary_server":"string"}}}],"post_power_on_steps":[{"callout_type":"PROMPT","content":"string","id":"string","name":"string","step_type":"PRE_POWER_ON","timeout_seconds":0}],"pre_power_on_steps":[{"callout_type":"PROMPT","content":"string","id":"string","name":"string","step_type":"PRE_POWER_ON","timeout_seconds":0}],"priority":"P1","shutdown_action_settings":{"skip_shutdown_guest":false,"timeout_seconds":0},"startup_action":"POWER_ON","startup_action_settings":{"delay_before_power_on_steps_and_dependent_vms_seconds":0,"power_on_vmtools_timeout_seconds":0}}' https://{api_host}/pairings/{pairing_id}/recovery-management/plans/{plan_id}/vms/{vm_id}/recovery-settings/actions/update
Vendor Extensions

Vendor Extensions

This operation contains the following vendor extensions defined in the spec:
x-dr-permissions:
    permissions:
        - System.View
        - System.Read
        - VcDr.RecoveryProfile.com.vmware.vcDr.Edit
x-dr-remote-site-connectivity-contract:
    not-authenticated: DEPENDS_ON_PROVIDED_PARAMS
    server-down: DEPENDS_ON_PROVIDED_PARAMS


[{"label":"Latest (2.0.0)","version":"latest"},{"version":"1.0.0"}]
srm-rest-api
Recovery Operations
Feedback

Was this page helpful?