diff --git a/builder/qemu/builder.go b/builder/qemu/builder.go index 4ac22b59b..39984d68b 100644 --- a/builder/qemu/builder.go +++ b/builder/qemu/builder.go @@ -201,14 +201,15 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) { b.config.VNCPortMax = 6000 } - if b.config.VMName == "" { - b.config.VMName = fmt.Sprintf("packer-%s", b.config.PackerBuildName) - } - if b.config.Format == "" { b.config.Format = "qcow2" } + if b.config.VMName == "" { + b.config.VMName = fmt.Sprintf("packer-%s.%s", + b.config.PackerBuildName, b.config.Format) + } + if b.config.FloppyFiles == nil { b.config.FloppyFiles = make([]string, 0) }