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:
parent
dc430fe1b7
commit
a0039dbae7
@ -469,6 +469,9 @@ func (b *builder) installBootloader(ctx context.Context) error {
|
|||||||
|
|
||||||
func (b *builder) convert2Img(ctx context.Context) error {
|
func (b *builder) convert2Img(ctx context.Context) error {
|
||||||
logrus.Infof("converting to %s", b.format)
|
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)
|
return exec.Run(ctx, "qemu-img", "convert", b.diskRaw, "-O", b.format, b.diskOut)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user