website: update docs for virtualbox_version_file

pull/919/head
Mitchell Hashimoto 13 years ago
parent 85c83cbf58
commit e91421b1e1

@ -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
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:
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".

Loading…
Cancel
Save