website: update docs for virtualbox_version_file
This commit is contained in:
parent
fc5c63d697
commit
c51a233970
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/mitchellh/multistep"
|
||||
"github.com/mitchellh/packer/packer"
|
||||
"log"
|
||||
)
|
||||
|
||||
// This step uploads a file containing the VirtualBox version, which
|
||||
|
@ -17,6 +18,11 @@ func (s *stepUploadVersion) Run(state map[string]interface{}) multistep.StepActi
|
|||
driver := state["driver"].(Driver)
|
||||
ui := state["ui"].(packer.Ui)
|
||||
|
||||
if config.VBoxVersionFile == "" {
|
||||
log.Println("VBoxVersionFile is empty. Not uploading.")
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
|
||||
version, err := driver.Version()
|
||||
if err != nil {
|
||||
state["error"] = fmt.Errorf("Error reading version for metadata upload: %s", err)
|
||||
|
|
|
@ -129,6 +129,12 @@ Optional:
|
|||
where the `Name` variable is replaced with the VM name. More details on how
|
||||
to use `VBoxManage` are below.
|
||||
|
||||
* `virtualbox_version_file` (string) - The path within the virtual machine
|
||||
to upload a file that contains the VirtualBox version that was used to
|
||||
create the machine. This information can be useful for provisioning.
|
||||
By default this is ".vbox_version", which will generally upload it into
|
||||
the home directory. If explicitly empty, the version file won't be uploaded.
|
||||
|
||||
* `vm_name` (string) - This is the name of the VMX file for the new virtual
|
||||
machine, without the file extension. By default this is "packer".
|
||||
|
||||
|
|
Loading…
Reference in New Issue