From a0039dbae7ee3c15f8be0143eec8a64c846c797e Mon Sep 17 00:00:00 2001 From: Will Scott Date: Tue, 25 Mar 2025 16:39:44 +0100 Subject: [PATCH] Skip disk conversion when format is raw This skips the `convert2Img` step in favor of moving the file when targetting a raw format. --- builder.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builder.go b/builder.go index 8c3fb87..04d89aa 100644 --- a/builder.go +++ b/builder.go @@ -469,6 +469,9 @@ func (b *builder) installBootloader(ctx context.Context) error { func (b *builder) convert2Img(ctx context.Context) error { logrus.Infof("converting to %s", b.format) + if b.format == "raw" { + return MoveFile(b.diskRaw, b.diskOut) + } return exec.Run(ctx, "qemu-img", "convert", b.diskRaw, "-O", b.format, b.diskOut) }