wido commented on a change in pull request #2997: Allow KVM VM live migration
with ROOT volume on file storage type
URL: https://github.com/apache/cloudstack/pull/2997#discussion_r230687385
##########
File path:
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java
##########
@@ -203,8 +207,13 @@ Use VIR_DOMAIN_XML_SECURE (value = 1) prior to v1.0.0.
destDomain = migrateThread.get(10, TimeUnit.SECONDS);
if (destDomain != null) {
- for (final DiskDef disk : disks) {
- libvirtComputingResource.cleanupDisk(disk);
+ for (DiskDef disk : disks) {
+ MigrateDiskInfo migrateDiskInfo =
searchDiskDefOnMigrateDiskInfoList(migrateDiskInfoList, disk);
+ if (migrateDiskInfo != null &&
migrateDiskInfo.isSourceDiskOnStorageFileSystem()) {
+ deleteLocalVolume(disk.getDiskPath());
+ } else {
+ libvirtComputingResource.cleanupDisk(disk);
Review comment:
Would this clean up a disk which is non-local? Isn't that a potential danger
that you remove a data disk?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services