2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2025-04-20 01:27:40 +00:00

Skip disk conversion when format is raw

This skips the `convert2Img` step in favor of moving the file when targetting a raw format.
This commit is contained in:
Will Scott 2025-03-25 16:39:44 +01:00 committed by Adphi
parent dc430fe1b7
commit a0039dbae7

View File

@ -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)
}