mirror of https://github.com/apache/cloudstack.git
bug 8204: mgt server needs to pass down iso info before migration, if the vm has ISO attached
status 8204: resolved fixed
This commit is contained in:
parent
b12444bb64
commit
4ea260cafd
|
|
@ -1674,6 +1674,15 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*setup disks, e.g for iso*/
|
||||
VolumeTO[] volumes = vm.getDisks();
|
||||
for (VolumeTO volume : volumes) {
|
||||
if (volume.getType() == Volume.VolumeType.ISO) {
|
||||
getVolumePath(conn, volume);
|
||||
}
|
||||
}
|
||||
|
||||
synchronized (_vms) {
|
||||
_vms.put(vm.getName(), State.Migrating);
|
||||
}
|
||||
|
|
@ -1683,6 +1692,8 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
|||
return new PrepareForMigrationAnswer(cmd, e.toString());
|
||||
} catch (InternalErrorException e) {
|
||||
return new PrepareForMigrationAnswer(cmd, e.toString());
|
||||
} catch (URISyntaxException e) {
|
||||
return new PrepareForMigrationAnswer(cmd, e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2356,6 +2356,19 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||
StoragePool pool = _storagePoolDao.findById(vol.getPoolId());
|
||||
vm.addDisk(new VolumeTO(vol, pool));
|
||||
}
|
||||
|
||||
if (vm.getType() == VirtualMachine.Type.User) {
|
||||
UserVmVO userVM = (UserVmVO)vm.getVirtualMachine();
|
||||
if (userVM.getIsoId() != null) {
|
||||
Pair<String, String> isoPathPair = getAbsoluteIsoPath(userVM.getIsoId(), userVM.getDataCenterId());
|
||||
if (isoPathPair != null) {
|
||||
String isoPath = isoPathPair.first();
|
||||
VolumeTO iso = new VolumeTO(vm.getId(), Volume.VolumeType.ISO, StorageResourceType.STORAGE_POOL, StoragePoolType.ISO, null, null, null, isoPath,
|
||||
0, null, null);
|
||||
vm.addDisk(iso);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue