CLOUDSTACK-8128. VM with Datadisk fails to start when storage is put into maintenance.

While migrating a volume from primary to seocndary use a worker VM to perform the operations if the VM associated with the volume is stopped.
This commit is contained in:
Likitha Shetty 2014-12-17 17:02:47 +05:30
parent ff7997a2b1
commit 5227ae2275
1 changed files with 1 additions and 1 deletions

View File

@ -610,7 +610,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
}
vmMo = hyperHost.findVmOnHyperHost(vmName);
if (vmMo == null) {
if (vmMo == null || VmwareResource.getVmState(vmMo) == PowerState.PowerOff) {
// create a dummy worker vm for attaching the volume
DatastoreMO dsMo = new DatastoreMO(hyperHost.getContext(), morDs);
workerVm = HypervisorHostHelper.createWorkerVM(hyperHost, dsMo, workerVmName);