mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
examples: Update various examples to use new disk-create API.
This commit is contained in:
@@ -7,9 +7,7 @@ output = "disk.img"
|
||||
g = Guestfs::Guestfs.new()
|
||||
|
||||
# Create a raw-format sparse disk image, 512 MB in size.
|
||||
File.open(output, "w") {
|
||||
|f| f.truncate(512 * 1024 * 1024)
|
||||
}
|
||||
g.disk_create (output, "raw", 512 * 1024 * 1024)
|
||||
|
||||
# Set the trace flag so that we can see each libguestfs call.
|
||||
g.set_trace(1)
|
||||
|
||||
Reference in New Issue
Block a user