builder: If using -v (verbose), ensure #disk_create runs verbose too.

This commit is contained in:
Richard W.M. Jones
2014-04-16 21:12:30 +01:00
parent 9515345bbd
commit e1a82bb130

View File

@@ -533,7 +533,10 @@ let main () =
msg (f_"Resizing (using virt-resize) to expand the disk to %s")
(human_size osize);
let preallocation = if oformat = "qcow2" then Some "metadata" else None in
(new G.guestfs ())#disk_create ?preallocation ofile oformat osize;
let () =
let g = new G.guestfs () in
if debug then ( g#set_trace true; g#set_verbose true );
g#disk_create ?preallocation ofile oformat osize in
let cmd =
sprintf "virt-resize%s%s%s --output-format %s%s%s %s %s"
(if debug then " --verbose" else " --quiet")