Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(generate_migration_data): doesn't keep instance type #567

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
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
Loading