Repository navigation
Add Changed Block Tracking (CBT) support - #4
Merged
Merged
Conversation
CBT turned out to need no NFC reverse engineering at all: VirtualMachine.QueryChangedDiskAreas -- the actual changed-byte-range query real backup tools use, distinct from VDDK's own VixDiskLib_QueryAllocatedBlocks (a different, disk-internal allocated-block bitmap) -- is public VIM API with no VDDK/NFC involvement whatsoever. Adds thin wrappers: enable_change_tracking (sets changeTrackingEnabled via ReconfigVM_Task), disk_change_id (reads a disk's current changeId off its backing, once CBT is active and a snapshot exists), and query_changed_disk_areas (the actual changed- range query, converted to plain dataclasses). Also documents real-world characteristics found through live testing, not obvious from the API docs: - A wildcard changeId="*" query (the initial-full-backup path) reports only *allocated* regions on a thin-provisioned disk, not the full sparse virtual capacity. - A single large contiguous write comes back as one extent regardless of size; only the number of *discontiguous* changed regions drives how large the extent list gets -- the real scaling risk for CBT on a busy disk is fragmented random I/O, not big sequential writes. Adds unit tests (ValueError paths, VIM call argument/result conversion, mocked -- no lab needed) and an integration test exercising the full cycle: enable CBT, snapshot, write a known sector, snapshot, query, verify the write falls inside the reported extent. Validated against a live standalone ESXi 8.0.3 host. Full workflow and lab evidence: docs/cbt.md.
Keep the merged NFC features and add Changed Block Tracking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Collected from cloudbase#6
Original author: doccaz
Original branch:
pr4-cbtThis pull request is the open upstream change, retargeted at
replication_agent.Changed Block Tracking uses the public VIM API (
enable_change_tracking,disk_change_id,query_changed_disk_areas), not an NFC message.