def pre_migration(self, instance_ref, network_info, migration_url): # Make sure that the disk reflects all current state for this VM. # It's times like these that I wish there was a way to do this on a # per-file basis, but we have no choice here but to sync() globally. utilities.call_command(["sync"]) # We want to remove the instance from libvirt, but keep all of the # artifacts around which is why we use cleanup=False. self.libvirt_conn.destroy(instance_ref, network_info, cleanup=False)
def pre_migration(self, context, instance_ref, network_info, migration_url): # Make sure that the disk reflects all current state for this VM. # It's times like these that I wish there was a way to do this on a # per-file basis, but we have no choice here but to sync() globally. utilities.call_command(["sync"]) # (amscanne) Check to see if we need to convert the network_info # object into the legacy format. if network_info and self.libvirt_conn.legacy_nwinfo(): network_info = compute_utils.legacy_network_info(network_info) # We want to remove the instance from libvirt, but keep all of the # artifacts around which is why we use cleanup=False. self.libvirt_conn._destroy(instance_ref, network_info, cleanup=False)
def pre_migration(self, context, instance_ref, network_info, migration_url): # Make sure that the disk reflects all current state for this VM. # It's times like these that I wish there was a way to do this on a # per-file basis, but we have no choice here but to sync() globally. utilities.call_command(["sync"])