Skip to content

Fix/haos zfs sync - #18581

Closed
Thorreke wants to merge 2 commits into
community-scripts:mainfrom
Thorreke:fix/haos-zfs-sync
Closed

Thorreke wants to merge 2 commits into
community-scripts:mainfrom
Thorreke:fix/haos-zfs-sync

Conversation

@Thorreke

@Thorreke Thorreke commented Nov 9, 2026

Copy link
Copy Markdown

✍️ Description

The Home Assistant OS VM installer encounters a reproducible ZFS volume creation timeout when importing the extracted QCOW2 image into local-zfs.

The ZFS volume is created despite the timeout, but the image is not imported.

Testing indicates that the issue is related to pending filesystem writes following image extraction. Explicitly synchronizing the filesystem before importing the disk resolves the issue.

The behavior has been reproduced on a single Proxmox host.

Adding a synchronization step after image extraction seems to fix the issue.

🔗 Related Issue

Fixes #18580

✅ Prerequisites (x in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

Tested on: pve-manager/9.2.3/d0fde103346cf89a (running kernel: 7.0.6-2-pve)


🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • ✨ New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to script metadata (PocketBase/website data).
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🤖 AI Assistance (X in brackets)

If you used an AI tool (GitHub Copilot, Claude, ChatGPT, etc.) to write or generate any scripts in this PR, you must confirm compliance below.
Select exactly one option.

  • No AI used – Scripts were written without AI assistance.
  • AI was used – I confirm the scripts were built using AGENTS.md and .github/agents/pve-script-creator.agent.md as guidance, and the output has been reviewed and corrected to match those guidelines.

@Thorreke
Thorreke requested a review from a team as a code owner November 9, 2026 23:09
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Try this branch

vm/haos-vm.sh, run in the Proxmox VE shell:

bash -c "$(curl -fsSL "https://raw.githubusercontent.com/Thorreke/ProxmoxVE/fix/haos-zfs-sync/vm/haos-vm.sh")"

Only the script itself comes from this branch. The engine it loads still
comes from community-scripts/core on main.

@michelroegl-brunner

Copy link
Copy Markdown
Member

Thank you for bringing this up, i fixed it in core so it helps all VM scripts: community-scripts/core#223

MickLesk pushed a commit to community-scripts/core that referenced this pull request Nov 10, 2026
Freshly extracted or converted images leave gigabytes of dirty pages. On a
default ZFS install the image (rpool/var-lib-vz) and the target zvol
(rpool/data) share a pool, so the zvol create inside qm disk import hits
Proxmox's zfs command timeout ("got timeout") while ZFS writes them back.

vm_import_disk now runs a best-effort sync -f on the image first, which
covers every VM script at once instead of patching them one by one.

Refs community-scripts/ProxmoxVE#18580, community-scripts/ProxmoxVE#18581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix update script A change that updates a script vm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[HAOS VM] Pending writes after image extraction cause ZFS disk import timeout

2 participants