Title: Backup restore of VM fails after ROOT volume migration (wrong disk id used) · Issue #12517 · apache/cloudstack · GitHub
Open Graph Title: Backup restore of VM fails after ROOT volume migration (wrong disk id used) · Issue #12517 · apache/cloudstack
X Title: Backup restore of VM fails after ROOT volume migration (wrong disk id used) · Issue #12517 · apache/cloudstack
Description: problem Restoring a virtual machine from a backup fails if the VM’s ROOT volume has been migrated to another primary storage. After migration, the ROOT volume’s identifiers in the database change (disk id and path id), but the backup res...
Open Graph Description: problem Restoring a virtual machine from a backup fails if the VM’s ROOT volume has been migrated to another primary storage. After migration, the ROOT volume’s identifiers in the database change (...
X Description: problem Restoring a virtual machine from a backup fails if the VM’s ROOT volume has been migrated to another primary storage. After migration, the ROOT volume’s identifiers in the database change (...
Opengraph URL: https://github.com/apache/cloudstack/issues/12517
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Backup restore of VM fails after ROOT volume migration (wrong disk id used)","articleBody":"### problem\n\nRestoring a virtual machine from a backup fails if the VM’s ROOT volume has been migrated to another primary storage.\nAfter migration, the ROOT volume’s identifiers in the database change (disk id and path id), but the backup restore process still tries to use the old disk id in the file name, which no longer exists on disk.\nIf a symbolic link is created from the actual qcow2 file (with the new path id) to the expected file name (with the old disk id), the restore completes successfully.\n\n\n\n### versions\n\nApache CloudStack version: 4.21.0.0\n\nHypervisor: KVM\n\nStorage Type: NFS \n\nVM state during restore: Stopped\n\nBackup type: VM backup with ROOT-disk\n\n### The steps to reproduce the bug\n\nSteps to Reproduce\n\n1. Create a virtual machine.\n\n2. Create a ROOT volume for this VM on one primary storage.\n\n3. Migrate the ROOT volume to another primary storage.\n\n4. Observe that in the database the ROOT volume identifiers change, for example:\n\n disk_id = 6e75d391-9368-4a1e-ad9d-ba53eb37721c\n\n path_id = f9f56997-8dee-4dab-b497-db7594dc9df5\n\n5. Try to restore the VM from a backup.\n\n6. Check the KVM/agent logs on the host performing the restore.\n\nObserved Behavior\n\nDuring restore, the system runs a command similar to:\n\n```bash\n/bin/bash -c rsync -az \\\n/usr/share/cloudstack-agent/tmp/csbackup.DpswS6644565578867592234/i-280-1642-VM/2026.01.26.15.07.27/root.6e75d391-9368-4a1e-ad9d-ba53eb37721c.qcow2 \\\n/mnt/e99ab53f-5b3a-36b6-ab01-86725eb45d4b/4f070e46-9b54-42d4-8b79-42a58edf5197\n```\n\nIn this directory, the file root.6e75d391-9368-4a1e-ad9d-ba53eb37721c.qcow2 does not exist, but the file root.f9f56997-8dee-4dab-b497-db7594dc9df5.qcow2 is present.\n\nThe backup restore process fails with an error similar to:\n\n```\nVM: {'errorcode': 533, 'errortext': 'No destination found for a deployment for VM instance {\"id\":1577,\"instanceName\":\"i-280-1577-VM\",\"state\":\"Stopped\",\"type\":\"User\",\"uuid\":\"1421efbe-76a5-4f74-ab67-9e40385bcf88\"}'}\n```\n\nIf, before the restore proceeds, you manually create a hard link in:\n\n```\n/usr/share/cloudstack-agent/tmp/csbackup.DpswS6644565578867592234/i-280-1642-VM/2026.01.26.15.07.27/\n```\n\nlike this\n\n```\nln root.f9f56997-8dee-4dab-b497-db7594dc9df5.qcow2 \\\n root.6e75d391-9368-4a1e-ad9d-ba53eb37721c.qcow2\n```\n\nthen the restore from backup completes successfully.\n\nExpected Behavior\n\nThe backup restore process should use the correct, current identifier of the ROOT volume file (e.g., the path_id-based file name) after volume migration, without requiring manual hard links or any manual intervention.\n\n\n### What to do about it?\n\n_No response_","author":{"url":"https://github.com/beezzlot","@type":"Person","name":"beezzlot"},"datePublished":"2026-01-26T12:58:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/12517/cloudstack/issues/12517"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:be5cc39c-5a21-fe6a-f8b0-39580fccc941 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C6F8:2CFBC2:F6BD4F:1555B45:6A4DF2B8 |
| html-safe-nonce | 4f2963ed4c5cca6293d8507b2836bfe06d53dde631c6c4c13ae4f07dca5c6455 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkY4OjJDRkJDMjpGNkJENEY6MTU1NUI0NTo2QTRERjJCOCIsInZpc2l0b3JfaWQiOiI2MzM5NTkwOTAyODYwNjA4MTg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3f932e804524902bc186293624f054c50533b61eb67e65552f6fb3e6e8ecfa90 |
| hovercard-subject-tag | issue:3855873239 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/12517/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7844482c88d714f8c1cfc5f3c85331b29094d70639a77e202b95ef462d1aaba5/apache/cloudstack/issues/12517 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7844482c88d714f8c1cfc5f3c85331b29094d70639a77e202b95ef462d1aaba5/apache/cloudstack/issues/12517 |
| og:image:alt | problem Restoring a virtual machine from a backup fails if the VM’s ROOT volume has been migrated to another primary storage. After migration, the ROOT volume’s identifiers in the database change (... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | beezzlot |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f4bb89367ca678f057d79b1abc45d6675b1bd5b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width