examples: Update various examples to use new disk-create API.

This commit is contained in:
Richard W.M. Jones
2014-01-28 15:04:59 +00:00
parent 2794eac739
commit d60e6a23a6
7 changed files with 16 additions and 55 deletions

View File

@@ -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)