Commit e91421b1 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

website: update docs for virtualbox_version_file

parent 85c83cbf
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
"log"
) )
// This step uploads a file containing the VirtualBox version, which // This step uploads a file containing the VirtualBox version, which
...@@ -17,6 +18,11 @@ func (s *stepUploadVersion) Run(state map[string]interface{}) multistep.StepActi ...@@ -17,6 +18,11 @@ func (s *stepUploadVersion) Run(state map[string]interface{}) multistep.StepActi
driver := state["driver"].(Driver) driver := state["driver"].(Driver)
ui := state["ui"].(packer.Ui) ui := state["ui"].(packer.Ui)
if config.VBoxVersionFile == "" {
log.Println("VBoxVersionFile is empty. Not uploading.")
return multistep.ActionContinue
}
version, err := driver.Version() version, err := driver.Version()
if err != nil { if err != nil {
state["error"] = fmt.Errorf("Error reading version for metadata upload: %s", err) state["error"] = fmt.Errorf("Error reading version for metadata upload: %s", err)
......
...@@ -129,6 +129,12 @@ Optional: ...@@ -129,6 +129,12 @@ Optional:
where the `Name` variable is replaced with the VM name. More details on how where the `Name` variable is replaced with the VM name. More details on how
to use `VBoxManage` are below. 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 * `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". machine, without the file extension. By default this is "packer".
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment