Arik Hadas has posted comments on this change. Change subject: RAM snapshots feature ......................................................................
Patch Set 17: (7 inline comments) .................................................... File vdsm/BindingXMLRPC.py Line 287: """ Line 288: Take snapshot of VM Line 289: Line 290: vmId and snapDrives are always set by the caller. Line 291: snapMemory is an optional parameter: Done Line 292: It is not set by the caller if memory snapshots are not supported for Line 293: the given VM. in that case the default value is used. Line 294: Otherwise, it is set to string: Line 295: If the snapshot should contain memory, the string is structured as Line 295: If the snapshot should contain memory, the string is structured as Line 296: hibernation volumes representation (hiberVolHandle), i.e, as a comma- Line 297: separated string of IDs: domain,pool,image1,volume1,image2,volume2. Line 298: If the snapshot should not contain memory, the field is set to empty Line 299: string. Done Line 300: """ Line 301: vm = API.VM(vmId) Line 302: return vm.snapshot(snapDrives, snapMemVolHandle) Line 303: .................................................... File vdsm/vm.py Line 2904: self._changeDisk(snappableDiskDeviceXmlElement) Line 2905: Line 2906: return parsedSrcDomXML.toxml() Line 2907: Line 2908: def _filterSnappableDiskDevices(self, diskDeviceXmlElements): Done Line 2909: return filter(lambda(x): not(x.getAttribute('device')) or Line 2910: x.getAttribute('device') in ['disk', 'lun'], Line 2911: diskDeviceXmlElements) Line 2912: Line 3485: memory.setAttribute('file', memoryVolumePath) Line 3486: return memory Line 3487: Line 3488: def _vmConfForSnapshot(): Line 3489: """Returns the needed vm configuration with the memory snapshot""" Done Line 3490: Line 3491: return {'restoreFromSnapshot': True, Line 3492: '_srcDomXML': self._dom.XMLDesc(0), Line 3493: 'elapsedTimeOffset': time.time() - self._startTime} Line 3561: # Adding the memory volume to the snapshot xml Line 3562: memoryVol = memoryParams['dst'] Line 3563: memoryVolPath = self.cif.prepareVolumePath(memoryVol) Line 3564: memorysnapelem = _memorySnapshot(memoryVolPath) Line 3565: snap.appendChild(memorysnapelem) Done Line 3566: Line 3567: # Save the needed vm configuration Line 3568: # TODO: this, as other places that use pickle.dump Line 3569: # directly to files, should be done with outOfProcess Line 3611: return errCode['snapshotErr'] Line 3612: Line 3613: # We are padding the memory volume with block size of zeroes Line 3614: # because qemu-img truncates files to the closest multiple Line 3615: # of block size (bz 970559) Done Line 3616: # This code should be removed once qemu-img will handle files Line 3617: # with size that is not multiple of block size correctly Line 3618: if memoryParams: Line 3619: sdUUID = memoryVol['domainID'] Line 3621: spType = sd.name2type( Line 3622: self.cif.irs.getStoragePoolInfo(spUUID)['info']['type']) Line 3623: if spType in sd.FILE_DOMAIN_TYPES: Line 3624: _padMemoryVolume(memoryVolPath, spType, sdUUID) Line 3625: Done Line 3626: for drive in newDrives.values(): # Update the drive information Line 3627: try: Line 3628: self.updateDriveParameters(drive) Line 3629: except: -- To view, visit http://gerrit.ovirt.org/15072 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I62401940afb0228cbd9dd3611b6ed8e0ff67c82c Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Eduardo <ewars...@redhat.com> Gerrit-Reviewer: Igor Lvovsky <ilvov...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Peter V. Saveliev <p...@redhat.com> Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches