Create QCOW2 image rather than raw for writable partitions.
Bug: 190503448
Test: vm create-partition /data/local/tmp/blah 1000000
Change-Id: Iff9269d71ea3e5dcff5fbfd1f5a62abfa4633bc0
diff --git a/vm/src/main.rs b/vm/src/main.rs
index e2c11a8..2c93ec4 100644
--- a/vm/src/main.rs
+++ b/vm/src/main.rs
@@ -104,6 +104,7 @@
) -> Result<(), Error> {
let image = OpenOptions::new()
.create_new(true)
+ .read(true)
.write(true)
.open(image_path)
.with_context(|| format!("Failed to create {:?}", image_path))?;