Skip to content

Commit 1e8e637

Browse files
committed
do not truncate saved image to size of uppermost layer
1 parent 4d9aef0 commit 1e8e637

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

internal/virter/image.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,7 @@ func (v *Virter) ImageSave(name string, to io.Writer) error {
204204
}
205205
defer v.volDeleteMust(newVol)
206206

207-
if volcfg.Physical == nil {
208-
return fmt.Errorf("invalid volume without physical size")
209-
}
210-
length := volcfg.Physical.Value
211-
212-
err = v.libvirt.StorageVolDownload(newVol, to, 0, length, 0)
207+
err = v.libvirt.StorageVolDownload(newVol, to, 0, 0, 0)
213208
if err != nil {
214209
return fmt.Errorf("could not download volume: %w", err)
215210
}

0 commit comments

Comments
 (0)