diff --git a/src/vmm_unix.ml b/src/vmm_unix.ml index ae6f888..edb2974 100644 --- a/src/vmm_unix.ml +++ b/src/vmm_unix.ml @@ -199,6 +199,8 @@ let create_block name size = Bos.OS.File.exists block_name >>= function | true -> Error (`Msg "file already exists") | false -> + let fd = Unix.(openfile (Fpath.to_string block_name) [O_CREAT] 0o600) in + close_no_err fd ; bytes_of_mb size >>= fun size' -> Bos.OS.File.truncate block_name size'