René's URL Explorer Experiment


Title: KVM NAS backup: VM remains paused indefinitely when backup job fails · Issue #12821 · apache/cloudstack · GitHub

Open Graph Title: KVM NAS backup: VM remains paused indefinitely when backup job fails · Issue #12821 · apache/cloudstack

X Title: KVM NAS backup: VM remains paused indefinitely when backup job fails · Issue #12821 · apache/cloudstack

Description: Description When using the NAS backup plugin on KVM, if a backup job fails (e.g. due to backup storage being full or I/O errors on the NFS target), the VM remains indefinitely paused at the hypervisor level. CloudStack marks the backup a...

Open Graph Description: Description When using the NAS backup plugin on KVM, if a backup job fails (e.g. due to backup storage being full or I/O errors on the NFS target), the VM remains indefinitely paused at the hypervi...

X Description: Description When using the NAS backup plugin on KVM, if a backup job fails (e.g. due to backup storage being full or I/O errors on the NFS target), the VM remains indefinitely paused at the hypervi...

Opengraph URL: https://github.com/apache/cloudstack/issues/12821

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"KVM NAS backup: VM remains paused indefinitely when backup job fails","articleBody":"## Description\n\nWhen using the NAS backup plugin on KVM, if a backup job fails (e.g. due to backup storage being full or I/O errors on the NFS target), the VM remains **indefinitely paused** at the hypervisor level. CloudStack marks the backup as `Error` but does not resume the VM, leaving it unresponsive until manually resumed via `virsh resume`.\n\n## Steps to Reproduce\n\n1. Configure NAS backup with NFS storage for a running KVM VM\n2. Fill up the NFS backup storage to 100% capacity\n3. Wait for the scheduled backup to trigger\n4. Observe the VM becomes paused and never resumes\n\n## Expected Behavior\n\nThe VM should be automatically resumed after a backup failure. The backup should be marked as failed, but the VM should continue running normally.\n\n## Actual Behavior\n\nThe VM remains in a `paused` state indefinitely. The backup monitoring loop in `nasbackup.sh` enters an infinite cycle:\n1. `virsh backup-begin` pauses the QEMU domain for consistent snapshot\n2. Backup write fails (storage full)\n3. `domjobinfo` reports `Failed` status\n4. `cleanup()` is called but **does not resume the VM**\n5. No `exit` statement after cleanup — loop continues, repeatedly detecting the failed job\n\n## Root Cause Analysis\n\nThree bugs in `scripts/vm/hypervisor/kvm/nasbackup.sh`:\n\n### Bug 1: Missing exit after failed backup cleanup (line 144)\n```bash\ncase \"$status\" in\n  Failed)\n    echo \"Virsh backup job failed\"\n    cleanup ;;   # \u003c-- no exit, falls through to sleep and loops forever\nesac\n```\n\n### Bug 2: cleanup() never resumes the VM (line 222)\nThe `cleanup()` function only removes files and unmounts storage. It never checks if the VM is paused or attempts to resume it, even though `virsh backup-begin` may have paused the domain.\n\n### Bug 3: Missing exit in backup_stopped_vm() (line 181)\nSimilar to Bug 1, `backup_stopped_vm()` calls `cleanup()` on `qemu-img convert` failure but does not exit, allowing the loop to continue processing subsequent disks.\n\n## Impact\n\n- **Production outage**: All services on the affected VM become unresponsive\n- **Cascading failures**: When backup storage fills up, ALL VMs being backed up get paused simultaneously\n- **Silent failure**: CloudStack UI shows the VM as \"Running\" while it is actually paused at the KVM level\n- **No automatic recovery**: Manual intervention (`virsh resume`) is required per VM\n\nIn our environment, NFS backup storage filling to 100% caused **8 production VMs** to become paused simultaneously across 3 KVM hosts, with some VMs remaining paused for over 6 hours before detection.\n\n## Environment\n\n- CloudStack 4.19/4.20/main (code is unchanged across versions)\n- KVM hypervisor\n- NAS backup plugin with NFS storage\n- File: `scripts/vm/hypervisor/kvm/nasbackup.sh`\n\n## Proposed Fix\n\nPR forthcoming with the following changes:\n1. Add VM state check and `virsh resume` to `cleanup()` function\n2. Add missing `exit 1` after `cleanup()` in the `Failed` backup job case\n3. Add missing `exit 1` after `cleanup()` in `backup_stopped_vm()` on `qemu-img convert` failure","author":{"url":"https://github.com/jmsperu","@type":"Person","name":"jmsperu"},"datePublished":"2026-03-17T03:56:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/12821/cloudstack/issues/12821"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8c566afc-4cee-575c-2263-2d44c653d84f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id965C:16195D:130000B:19B4983:6A4EF272
html-safe-nonceb6e72a20ef1a86c2ae4a4ceda22d03c1d4f81f508c32e082f61cc1a303fb930d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjVDOjE2MTk1RDoxMzAwMDBCOjE5QjQ5ODM6NkE0RUYyNzIiLCJ2aXNpdG9yX2lkIjoiNjk4ODgzNDA1OTI5Mjk2MzQ0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd37869b01c35652d304557de9c589636fefe7be19ab04d3800b59f32e54ea004
hovercard-subject-tagissue:4086053729
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/12821/issue_layout
twitter:imagehttps://opengraph.githubassets.com/454878c0b3e76c7938b0bcc3c727909b162fca2bde8369e001268221a386f70e/apache/cloudstack/issues/12821
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/454878c0b3e76c7938b0bcc3c727909b162fca2bde8369e001268221a386f70e/apache/cloudstack/issues/12821
og:image:altDescription When using the NAS backup plugin on KVM, if a backup job fails (e.g. due to backup storage being full or I/O errors on the NFS target), the VM remains indefinitely paused at the hypervi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejmsperu
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
go-importgithub.com/apache/cloudstack git https://github.com/apache/cloudstack.git
octolytics-dimension-user_id47359
octolytics-dimension-user_loginapache
octolytics-dimension-repository_id9759448
octolytics-dimension-repository_nwoapache/cloudstack
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id9759448
octolytics-dimension-repository_network_root_nwoapache/cloudstack
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release00d04d6b867d2f16ab50bebae8ccc56e07c8988b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/cloudstack/issues/12821#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fissues%2F12821
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fissues%2F12821
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=apache%2Fcloudstack
Reloadhttps://github.com/apache/cloudstack/issues/12821
Reloadhttps://github.com/apache/cloudstack/issues/12821
Reloadhttps://github.com/apache/cloudstack/issues/12821
Please reload this pagehttps://github.com/apache/cloudstack/issues/12821
apache https://github.com/apache
cloudstackhttps://github.com/apache/cloudstack
Notifications https://github.com/login?return_to=%2Fapache%2Fcloudstack
Fork 1.3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Star 3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Code https://github.com/apache/cloudstack
Issues 536 https://github.com/apache/cloudstack/issues
Pull requests 266 https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality 0 https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Code https://github.com/apache/cloudstack
Issues https://github.com/apache/cloudstack/issues
Pull requests https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Bughttps://github.com/apache/cloudstack/issues?q=type:"Bug"
#12822https://github.com/apache/cloudstack/pull/12822
KVM NAS backup: VM remains paused indefinitely when backup job failshttps://github.com/apache/cloudstack/issues/12821#top
#12822https://github.com/apache/cloudstack/pull/12822
https://github.com/vladimirpetrov
4.23.0https://github.com/apache/cloudstack/milestone/42
https://github.com/jmsperu
jmsperuhttps://github.com/jmsperu
on Mar 17, 2026https://github.com/apache/cloudstack/issues/12821#issue-4086053729
vladimirpetrovhttps://github.com/vladimirpetrov
Bughttps://github.com/apache/cloudstack/issues?q=type:"Bug"
Apache CloudStack BugFest - Issueshttps://github.com/orgs/apache/projects/362
4.23.0https://github.com/apache/cloudstack/milestone/42
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.