Merge pull request #2629 from mitchellh/b-2601

Document Qemu file extension for vm_name
This commit is contained in:
Chris Bednarski 2015-08-19 13:08:28 -07:00
commit 96a857ea6f
2 changed files with 9 additions and 6 deletions

View File

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

View File

@ -247,8 +247,10 @@ builder and not otherwise conflicting with the qemuargs):
host port.
- `vm_name` (string) - This is the name of the image (QCOW2 or IMG) file for
the new virtual machine, without the file extension. By default this is
"packer-BUILDNAME", where "BUILDNAME" is the name of the build.
the new virtual machine. By default this is "packer-BUILDNAME.FORMAT", where
`BUILDNAME` is the name of the build and `FORMAT` matches the `format`
option, above. If you customize this you must specify the file extension or
none will be used.
- `vnc_port_min` and `vnc_port_max` (integer) - The minimum and maximum port
to use for the VNC port on the host machine which is forwarded to the VNC