From 56af8852124685066fc3976606d6b10b470ee2ea Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Thu, 29 Mar 2018 14:51:02 +0300 Subject: [PATCH] Avoid warning when using raw format. When using the raw image format and attempting to resize it we get the following error message: ``` WARNING: Image format was not specified for 'test.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. ``` Specifying the format will remove this warning. --- builder/qemu/step_resize_disk.go | 1 + 1 file changed, 1 insertion(+) diff --git a/builder/qemu/step_resize_disk.go b/builder/qemu/step_resize_disk.go index 8ffab5931..f4f44ec34 100644 --- a/builder/qemu/step_resize_disk.go +++ b/builder/qemu/step_resize_disk.go @@ -21,6 +21,7 @@ func (s *stepResizeDisk) Run(_ context.Context, state multistep.StateBag) multis command := []string{ "resize", + "-f", config.Format, path, fmt.Sprintf("%vM", config.DiskSize), }