Skip to content

Commit 83bcd6c

Browse files
Add built-in image delta patch create/apply commands
1 parent 6a4bbf2 commit 83bcd6c

4 files changed

Lines changed: 774 additions & 3 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,25 @@ sudo vz vm patch apply --bundle /tmp/patch-1.vzpatch --image ~/.vz/images/base.i
154154

155155
For advanced CI workflows, `vz vm patch create` also supports `--operations <json>` + `--payload-dir <dir>`.
156156

157+
### 7. Primary image-delta patch flow (sudo once, then sudoless apply)
158+
159+
```bash
160+
# 1) Create a binary image delta from a signed bundle (runs bundle apply on a temp image copy)
161+
sudo vz vm patch create-delta \
162+
--bundle /tmp/patch-1.vzpatch \
163+
--base-image ~/.vz/images/base.img \
164+
--delta /tmp/patch-1.vzdelta
165+
166+
# 2) Apply the binary delta without sudo to produce a new bootable image
167+
vz vm patch apply-delta \
168+
--base-image ~/.vz/images/base.img \
169+
--delta /tmp/patch-1.vzdelta \
170+
--output-image ~/.vz/images/base-patched.img
171+
172+
# 3) Boot-test the patched image
173+
vz vm run --image ~/.vz/images/base-patched.img --name delta-test --headless
174+
```
175+
157176
## Command groups
158177

159178
### Containers

crates/vz-cli/src/commands/vm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub enum VmCommand {
5454
/// Manage supported base image definitions.
5555
Base(super::vm_base::VmBaseArgs),
5656

57-
/// Create, verify, and apply signed patch bundles.
57+
/// Create/apply patch bundles and image deltas.
5858
Patch(super::vm_patch::VmPatchArgs),
5959
}
6060

0 commit comments

Comments
 (0)