Skip to content

Commit

Permalink
fix(generate_migration_data): doesn't keep instance type
Browse files Browse the repository at this point in the history
Signed-off-by: Dawson Greeley <[email protected]>
  • Loading branch information
MrDaGree committed Nov 8, 2023
1 parent 761d965 commit 4af1547
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pylxd/models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,14 +644,18 @@ def generate_migration_data(self, live=False):
operation_url = self.client.api.operations[operation.id]._api_endpoint
secrets = response.json()["metadata"]["metadata"]
cert = self.client.host_info["environment"]["certificate"]
if self.config.get("volatile.vsock_id", False):
# Delete key/value for volatile.vsock_id as this will be different on new host. Throws an 'Unknown configuration key: volatile.vsock_id' error if we don't delete it
del self.config["volatile.vsock_id"]

return {
"name": self.name,
"architecture": self.architecture,
"config": self.config,
"devices": self.devices,
"epehemeral": self.ephemeral,
"default": self.profiles,
"profiles": self.profiles,
"type": self.type,
"source": {
"type": "migration",
"operation": operation_url,
Expand Down

0 comments on commit 4af1547

Please sign in to comment.