any one?

On Monday, 24 June 2019 22:54:53 UTC+1, deanwarrenuk wrote:
>
> Windows: 10
> WSL: Ubuntu 18.04
> Packer: 1.4.1
> VBox: 6.0.8
>
> Running from Packer from WSL, my Packer fails trying to use VBox because 
> the path is formed incorrectly by packer(?).
> e.g.
>
> My data is on my Windows drive E:\projects\tpa\packer.
> Of course in WSL this is /mnt/e/projects/tpa/packer
> But Packer sends the following to VBoxManage E:\mnt\e\projects\tpa\packer
> e.g.
>
> ==> virtualbox-iso: Creating hard drive...
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 stderr:
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 Executing VBoxManage: []
> string{"createhd", "--filename", 
> "output-virtualbox-iso/packer-ubuntu-18.04-amd64.vdi", "--size", "40000", 
> "--format", "VDI", "--variant", "Standard"}
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 stdout: Medium created. 
> UUID: dc435d75-7368-4a3b-8071-20a14766f2d9
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 stderr: 0%...10%...20%...
> 30%...40%...50%...60%...70%...80%...90%...100%
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 Executing VBoxManage: []
> string{"storagectl", "packer-ubuntu-18.04-amd64", "--name", "IDE 
> Controller", "--add", "ide"}
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 stdout:
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 stderr:
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 Executing VBoxManage: []
> string{"storageattach", "packer-ubuntu-18.04-amd64", "--storagectl", "IDE 
> Controller", "--port", "0", "--device", "0", "--type", "hdd", "--medium", 
> "output-virtualbox-iso/packer-ubuntu-18.04-amd64.vdi", "--nonrotational", 
> "off", "--discard", "off"}
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 stdout:
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 stderr:
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 Executing VBoxManage: []
> string{"storageattach", "packer-ubuntu-18.04-amd64", "--storagectl", "IDE 
> Controller", "--port", "0", "--device", "1", "--type", "dvddrive", 
> "--medium", 
> "/mnt/e/projects/tpa/packer/iso/ubuntu-18.04.2-live-server-amd64.iso"}
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 stdout:
> 2019/06/24 22:43:15 packer: 2019/06/24 22:43:15 stderr: VBoxManage.exe: 
> error: Could not get the storage format of the medium 
> 'E:\mnt\e\projects\tpa\packer\iso\ubuntu-18.04.2-live-server-amd64.iso' (
> VERR_UNRESOLVED_ERROR)
> ==> virtualbox-iso: Error attaching ISO: VBoxManage error: VBoxManage.exe: 
> error: Could not get the storage format of the medium 
> 'E:\mnt\e\projects\tpa\packer\iso\ubuntu-18.04.2-live-server-amd64.iso' (
> VERR_UNRESOLVED_ERROR)
> 2019/06/24 22:43:15 packer: VBoxManage.exe: error: Details: code 
> VBOX_E_IPRT_ERROR (0x80bb0005), component MediumWrap, interface IMedium, 
> callee IUnknown
> ==> virtualbox-iso: VBoxManage.exe: error: Details: code 
> VBOX_E_IPRT_ERROR (0x80bb0005), component MediumWrap, interface IMedium, 
> callee IUnknown
> 2019/06/24 22:43:15 packer: VBoxManage.exe: error: Context: 
> "OpenMedium(Bstr(pszFilenameOrUuid).raw(), 
> enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at 
> line 191 of file VBoxManageDisk.cpp
> ==> virtualbox-iso: VBoxManage.exe: error: Context: 
> "OpenMedium(Bstr(pszFilenameOrUuid).raw(), 
> enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at 
> line 191 of file VBoxManageDisk.cpp
> 2019/06/24 22:43:15 packer: VBoxManage.exe: error: Invalid UUID or 
> filename 
> "/mnt/e/projects/tpa/packer/iso/ubuntu-18.04.2-live-server-amd64.iso"
> ==> virtualbox-iso: VBoxManage.exe: error: Invalid UUID or filename 
> "/mnt/e/projects/tpa/packer/iso/ubuntu-18.04.2-live-server-amd64.iso"
> 2019/06/24 22:43:15 ui error: ==> virtualbox-iso: Error attaching ISO: 
> VBoxManage error: VBoxManage.exe: error: Could not get the storage format 
> of the medium 
> 'E:\mnt\e\projects\tpa\packer\iso\ubuntu-18.04.2-live-server-amd64.iso' (
> VERR_UNRESOLVED_ERROR)
> ==> virtualbox-iso: Deregistering and deleting VM...
>
> It need not prepend the E:\ or more correctly I guess removes the \mnt\e.
>
> I have tried a windows shortcut and WSL symbolic link but no joy. Any 
> recommendations?
>
> My Template:
>
>     "builders": [
>         {
>             "type": "virtualbox-iso",
>             "boot_command": [
>             "",
>             "",
>             "",
>             "/install/vmlinuz",
>             " auto",
>             " console-setup/ask_detect=false",
>             " console-setup/layoutcode=us",
>             " console-setup/modelcode=pc105",
>             " debconf/frontend=noninteractive",
>             " debian-installer=en_US",
>             " fb=false",
>             " initrd=/install/initrd.gz",
>             " kbd-chooser/method=us",
>             " keyboard-configuration/layout=USA",
>             " keyboard-configuration/variant=USA",
>             " locale=en_US",
>             " netcfg/get_domain=vm",
>             " netcfg/get_hostname=vagrant",
>             " grub-installer/bootdev=/dev/sda",
>             " noapic",
>             " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort 
> }}/preseed.cfg",
>             " -- ",
>             ""
>             ],
>             "boot_wait": "10s",
>             "disk_size": 40000,
>             "guest_os_type": "Ubuntu_64",
>             "headless": false,
>             "http_directory": "http",
>             "iso_urls": [
>             "iso/ubuntu-18.04.2-live-server-amd64.iso"
>             ],
>             "iso_checksum_type": "sha256",
>             "iso_checksum": 
> "ea6ccb5b57813908c006f42f7ac8eaa4fc603883a2d07876cf9ed74610ba2f53",
>             "ssh_username": "vagrant",
>             "ssh_password": "vagrant",
>             "ssh_port": 22,
>             "ssh_wait_timeout": "10000s",
>             "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
>             "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
>             "virtualbox_version_file": ".vbox_version",
>             "guest_additions_url": 
> "iso/VBoxGuestAdditions_{{.Version}}.iso",
>             "vm_name": "packer-ubuntu-18.04-amd64",
>             "vboxmanage": [
>             [
>                 "modifyvm",
>                 "{{.Name}}",
>                 "--memory",
>                 "2048"
>             ],
>             [
>                 "modifyvm",
>                 "{{.Name}}",
>                 "--cpus",
>                 "1"
>             ]
>             ]
>         }
>     ],
>     "provisioners": [{
>       "type": "shell",
>       "scripts": [
>         "scripts/init.sh",
>         "scripts/cleanup.sh"
>       ]
>     }],
>     "post-processors": [{
>       "type": "vagrant",
>       "compression_level": "8",
>       "output": "ubuntu-18.04-{{.Provider}}.box"
>     }]
>   }
>
>
>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/19f47a15-cd85-4706-ae92-b66d89f0af05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to