}
}
if (!_storagePoolMgr.connectPhysicalDisksViaVmSpec(vm)) {
skipDisconnect = true;
return new PrepareForMigrationAnswer(cmd, "failed to connect physical disks to host");
}
synchronized (_vms) {
_vms.put(vm.getName(), State.Migrating);
}
skipDisconnect = true;
return new PrepareForMigrationAnswer(cmd);
} catch (LibvirtException e) {
return new PrepareForMigrationAnswer(cmd, e.toString());
} catch (InternalErrorException e) {
return new PrepareForMigrationAnswer(cmd, e.toString());
} catch (URISyntaxException e) {
return new PrepareForMigrationAnswer(cmd, e.toString());
} finally {
if (!skipDisconnect) {
_storagePoolMgr.disconnectPhysicalDisksViaVmSpec(vm);
}
}