Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ public Answer execute(final BackupSnapshotCommand command, final LibvirtComputin
final String snapshot = snapshotXML.format(args);
s_logger.debug(snapshot);
final DomainSnapshot snap = vm.snapshotLookupByName(snapshotName);
snap.delete(0);
if (snap != null) {
snap.delete(0);
} else {
throw new CloudRuntimeException("Unable to find vm snapshot with name -" + snapshotName);
}

/*
* libvirt on RHEL6 doesn't handle resume event emitted from
Expand Down Expand Up @@ -203,4 +207,4 @@ public Answer execute(final BackupSnapshotCommand command, final LibvirtComputin
}
return new BackupSnapshotAnswer(command, true, null, snapshotRelPath + File.separator + snapshotName, true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public Answer execute(final CreateCommand command, final LibvirtComputingResourc
}
} else {
vol = primaryPool.createPhysicalDisk(dskch.getPath(), dskch.getProvisioningType(), dskch.getSize());
if (vol == null) {
return new Answer(command, false, " Can't create Physical Disk");//Due to lack of implementation of createPhysicalDisk module in ManagedNfsStorageAdaptor.java class
}
}
final VolumeTO volume =
new VolumeTO(command.getVolumeId(), dskch.getType(), pool.getType(), pool.getUuid(), pool.getPath(), vol.getName(), vol.getName(), disksize, null);
Expand Down