Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualbox-ovf " VBoxManage: error: Details: code E_ACCESSDENIED " #1726

Closed
jtheuer opened this issue Dec 5, 2014 · 8 comments
Closed

virtualbox-ovf " VBoxManage: error: Details: code E_ACCESSDENIED " #1726

jtheuer opened this issue Dec 5, 2014 · 8 comments

Comments

@jtheuer
Copy link

jtheuer commented Dec 5, 2014

I try to boot an ubuntu cloud-init ovf:
http://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-amd64.ovf

I downloaded both, the ovf and img.

When I build this json, the following error occurs:


    "builders": [
        {   
            "type": "virtualbox-ovf",
            "name": "vbox",
            "source_path": "ubuntu-14.04.ovf",
            "ssh_username": "ubuntu",
            "ssh_password": "ubuntu",
            "headless": true,
            "boot_wait": "20s",
            "shutdown_command": "echo ubuntu | sudo -S -E shutdown -P now"
        }
    ],
    "provisioners": [
        {
            "type": "shell",
            "override": {
                "vbox": {
                  "execute_command": "echo 'ubuntu' | sudo -S -E /bin/bash '{{ .Path }}'",
                  "scripts": [
                    "common.sh",
                    "cleanup.sh"
                  ]
                }
        }
      }
    ],
    "post-processors": [
    {
      "type": "vagrant",
      "override": {
        "virtualbox": {
          "output": "ubuntu-14.04_{{timestamp}}.box"
        }
      }
    }
  ]
}
vbox output will be in this color.

==> vbox: Pausing after run of step 'StepOutputDir'. Press enter to continue. 
==> vbox: Pausing after run of step 'StepSuppressMessages'. Press enter to continue. 
==> vbox: Pausing after run of step 'StepCreateFloppy'. Press enter to continue. 
==> vbox: Pausing after run of step 'StepHTTPServer'. Press enter to continue. 
==> vbox: Downloading or copying Guest additions
    vbox: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> vbox: Pausing after run of step 'StepDownloadGuestAdditions'. Press enter to continue. 
==> vbox: Importing VM: ubuntu-14.04.ovf
==> vbox: Error importing VM: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
==> vbox: Interpreting /Users/jan/daten/repositories/packer/ubuntu-14.04/ubuntu-14.04.ovf...
==> vbox: OK.
==> vbox: 0%...
==> vbox: Progress state: E_ACCESSDENIED
==> vbox: VBoxManage: error: Appliance import failed
==> vbox: VBoxManage: error: The object is not ready
==> vbox: VBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component Appliance, interface IAppliance
==> vbox: VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 779 of file VBoxManageAppliance.cpp

Any ideas what that is related to? Where is access denied to?

Packer v0.7.2
VBoxManage 4.3.20r96996

@CpuID
Copy link
Contributor

CpuID commented Dec 17, 2014

Getting the same thing here:

Nathan-S-MacBook-Pro:vagrant nsullivan$ VBoxManage --version
4.3.20r96996
Nathan-S-MacBook-Pro:vagrant nsullivan$ packer version
Packer v0.7.5

OSX 10.9.5 here, restarted after the VirtualBox installation to be safe also.

Very simple .json file fed in, using the OVF ubuntu-12.04-server-cloudimg-amd64.ovf (and .img) from http://cloud-images.ubuntu.com/releases/12.04.4/release/

@WaltHP
Copy link

WaltHP commented Dec 17, 2014

I'm also getting the same error from my packer

{
  "builders": [
    {
      "boot_wait": "4s",
      "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
      "headless": false,
      "http_directory": "http",
      "shutdown_command": "echo 'shutdown -P now' > shutdown.sh; echo 'vagrant'|sudo -S sh 'shutdown.sh'",
      "ssh_password": "vagrant",
      "ssh_port": 22,
      "ssh_username": "vagrant",
      "ssh_wait_timeout": "10000s",
      "type": "virtualbox-ovf",
      "source_path": "trusty-server-cloudimg-amd64.ovf",
      "vboxmanage": [
        [
          "modifyvm",
          "{{.Name}}",
          "--memory",
          "2048"
        ],
        [
          "modifyvm",
          "{{.Name}}",
          "--cpus",
          "4"
        ]
      ],
      "virtualbox_version_file": ".vbox_version"
    }
  ],
  "post-processors": [
    "vagrant"
  ],
  "provisioners": [
    {
      "override": {
        "virtualbox-ovf": {
          "execute_command": "echo 'vagrant' | sudo -S sh '{{ .Path }}'"
        }
      },
      "scripts": [
        "scripts/root_setup.sh"
      ],
      "type": "shell"
    },
    {
      "scripts": [
        "scripts/setup.sh"
      ],
      "type": "shell"
    }
  ]
}
virtualbox-ovf output will be in this color.

==> virtualbox-ovf: Starting HTTP server on port 8708
==> virtualbox-ovf: Cannot find "Default Guest Additions ISO" in vboxmanage output (or it is empty)
==> virtualbox-ovf: Downloading or copying Guest additions checksums
    virtualbox-ovf: Downloading or copying: http://download.virtualbox.org/virtualbox/4.3.10/SHA256SUMS
==> virtualbox-ovf: Downloading or copying Guest additions
    virtualbox-ovf: Downloading or copying: http://download.virtualbox.org/virtualbox/4.3.10/VBoxGuestAdditions_4.3.10.iso
==> virtualbox-ovf: Importing VM: trusty-server-cloudimg-amd64.ovf
==> virtualbox-ovf: Error importing VM: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
==> virtualbox-ovf: Interpreting /home/waboring/devel/msdu/packer-example/trusty-server-cloudimg-amd64.ovf...
==> virtualbox-ovf: OK.
==> virtualbox-ovf: 0%...
==> virtualbox-ovf: Progress state: E_ACCESSDENIED
==> virtualbox-ovf: VBoxManage: error: Appliance import failed
==> virtualbox-ovf: VBoxManage: error: The object is not ready
==> virtualbox-ovf: VBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component Appliance, interface IAppliance
==> virtualbox-ovf: VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 779 of file VBoxManageAppliance.cpp
==> virtualbox-ovf: Deleting output directory...
Build 'virtualbox-ovf' errored: Error importing VM: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/waboring/devel/msdu/packer-example/trusty-server-cloudimg-amd64.ovf...
OK.
0%...
Progress state: E_ACCESSDENIED
VBoxManage: error: Appliance import failed
VBoxManage: error: The object is not ready
VBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component Appliance, interface IAppliance
VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 779 of file VBoxManageAppliance.cpp

==> Some builds didn't complete successfully and had errors:
--> virtualbox-ovf: Error importing VM: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/waboring/devel/msdu/packer-example/trusty-server-cloudimg-amd64.ovf...
OK.
0%...
Progress state: E_ACCESSDENIED
VBoxManage: error: Appliance import failed
VBoxManage: error: The object is not ready
VBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component Appliance, interface IAppliance
VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 779 of file VBoxManageAppliance.cpp

==> Builds finished but no artifacts were created.

@CpuID
Copy link
Contributor

CpuID commented Dec 17, 2014

Just a heads up I think this is related to the OVF that Ubuntu provides, and is more a VirtualBox issue than Vagrant. I have a workaround almost prepared that I intend to share shortly for all :)

@CpuID
Copy link
Contributor

CpuID commented Dec 18, 2014

OK my workaround is ready for public consumption:

https://github.com/CpuID/packer-ubuntu-virtualbox

Basically involves building an OVF from the Ubuntu ISO first, which Packer can then use to build Vagrant Boxes. Documentation is there on how to use it.

2 stage process, first stage took me about 11 minutes to run, second stage takes about 3 minutes with only a bare minimum provisioner configured.

Technically you could do this in a single stage, but I opted to split it since you probably only ever want to do the first stage once per Ubuntu release, then use the second stage repeatedly as your provisioners change/require etc. Being that the first stage takes 3 times as long as the second stage, iteration time wise that makes more sense :)

@WaltHP
Copy link

WaltHP commented Dec 18, 2014

Thanks for the effort. I was hoping to be able to use the cloud images that ubuntu provides, which come as .img or .ovf, as to avoid using the .iso files which are pretty much install images. Is there no way to use the existing .ovf files that canonical provides?

https://cloud-images.ubuntu.com/trusty/current/

@CpuID
Copy link
Contributor

CpuID commented Dec 19, 2014

In an ideal world, we would use the Canonical ones. But until then...

One thing worth considering - use the workaround above I did to generate a compatible .ovf, then compare it to the Ubuntu provided ones, figure out what Packer does differently to Ubuntu. Then possibly either lodge a bug against VirtualBox, or Ubuntu to try and get compatible .ovf's generated.

@sethvargo
Copy link
Contributor

@CpuID do you have a virtualbox ticket you could reference?

@mitchellh
Copy link
Contributor

Agreed that this is a vbox issue. If you have a vbox ticket # that'd be great.

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants