VM Protection Error: "InvalidPowerState"
This article applies to all JSDR software versions.
Problem
An "InvalidPowerState" error may be encountered when applying or removing VM protection:
Applying Protection
When a VM is added for protection, it may fail to complete the task and report “Failed to apply the Storage Policy change.”
Task details display the following text:
The attempted operation cannot be performed in the current state (Powered on).com.vmware.vim25.InvalidPowerState@481cf866[existingState=com.vmware.vim25.VirtualMachinePowerState@7eef5694[val=poweredOn,name=poweredOn,ordinal=1],requestedState=com.vmware.vim25.VirtualMachinePowerState@5a1a508e[val=poweredOff,name=poweredOff,ordinal=0],dynamicProperty=<null>,dynamicType=<null>,faultCause=<null>,faultMessage=<null>,detail=<null>,cause=<null>,detailMessage=<null>,stackTrace={},suppressedExceptions=java.util.Collections$UnmodifiableRandomAccessList@12bad197{}]
Removing Protection
When protection is removed from the VM, it may fail to complete the task and report: “Failed to detach storage policy from Protected VM.”
Failover of domains containing VMs with this problem may report the error “VM has non Supported Disk controller.”
Cause
The protection error generally occurs for VMs with disks that are configured with their Virtual Device Node set to “IDE.” However, if protection is initiated while the VM is powered off, the task will succeed. The problem can also occur when powered on VMs with IDE configured disks are unprotected.
If a protected VM is powered on and its disk's Virtual Device Node is changed from SCSI to IDE, it will report a replication error. Likewise, adding a new IDE disk to a powered on, protected VM will fail.
Solution
Go to the VM > Edit settings screen.
Select the hard disk and check if any of its Virtual Device Nodes are set to IDE.
If any disks are found to be configured with IDE:
Power off the VM.
Return to the VM > Edit settings screen.
Select the hard disk and change its Virtual Device Node to SCSI.
Before committing the change, verify SCSI mode is compatible with the VM.
Apply this change to all applicable hard disks that are set to IDE.
Start Protection.
Important: Be certain of the VM’s compatiblity with SCSI Virtual Device Node. If unsure, thoroughly test it using a cloned VM before applying the change to a production VM.
If you have any questions, contact JetStream support for guidance.