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

After exporting virtual machine: Error unregistering guest additions #3121

Closed
virgo47 opened this Issue Jan 28, 2016 · 4 comments

Comments

Projects
None yet
6 participants
@virgo47

virgo47 commented Jan 28, 2016

Because I had random problems with guest_additions_mode "upload" (found known issues around WinRM upload of big files), I tried "attach" which worked very well for me. The difference, though, was that after my VM was ready, it still had D: optical drive with additions in it. I decided to remove it with:

"vboxmanage_post": [
                [
                    "storageattach",
                    "{{.Name}}",
                    "--storagectl",
                    "IDE Controller",
                    "--port",
                    "1",
                    "--device",
                    "0",
                    "--medium",
                    "none"
                ]
            ]

This worked, except for the error during final steps of VM export -- these are not fatal, just very red ;-) (lines from Error... to the one finishing with cpp, first/last two are added for context).

==> virtualbox-iso: Exporting virtual machine...
    virtualbox-iso: Executing: export packer-virtualbox-iso-1453981832 --output output-virtualbox-iso\packer-virtualbox-iso-1453981832.ovf
==> virtualbox-iso: Error unregistering guest additions: VBoxManage error: VBoxManage.exe: error: No storage device attached to device slot 0 on port 1 of controller 'IDE Controller'
==> virtualbox-iso: VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component SessionMachine, interface IMachine, callee IUnknown
==> virtualbox-iso: VBoxManage.exe: error: Context: "DetachDevice(Bstr(pszCtl).raw(), port, device)" at line 393 of file VBoxManageStorageController.cpp
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Running post-processor: vagrant

Is my case invalid? Should I do it differently? Now my crated VM does not have optical disk, so my goal is achieved. If this is the right way, can the message be less alarming and probably not "Error"?

@dragon788

This comment has been minimized.

Show comment
Hide comment
@dragon788

dragon788 Jun 24, 2016

Contributor

@virgo47 I like your workaround, I just ran into and reported the root bug which is Packer not removing the additional optical drive automatically, but I believe there was an issue with this related to VMware where it wasn't removing the ISO, and your solution is very similar to one suggested in that case as well.

Contributor

dragon788 commented Jun 24, 2016

@virgo47 I like your workaround, I just ran into and reported the root bug which is Packer not removing the additional optical drive automatically, but I believe there was an issue with this related to VMware where it wasn't removing the ISO, and your solution is very similar to one suggested in that case as well.

@gsingh93

This comment has been minimized.

Show comment
Hide comment
@gsingh93

gsingh93 Dec 24, 2016

I'm seeing those error messages as well with the same vboxmanage_post settings. Any idea why it happens?

gsingh93 commented Dec 24, 2016

I'm seeing those error messages as well with the same vboxmanage_post settings. Any idea why it happens?

@rickard-von-essen

This comment has been minimized.

Show comment
Hide comment
@rickard-von-essen
Collaborator

rickard-von-essen commented Dec 24, 2016

Please try post_shutdown_delay

@mwhooker

This comment has been minimized.

Show comment
Hide comment
@mwhooker

mwhooker Jan 30, 2017

Collaborator

I know this is older, but marking as dupe of #3652

Collaborator

mwhooker commented Jan 30, 2017

I know this is older, but marking as dupe of #3652

@mwhooker mwhooker closed this Jan 30, 2017

@mwhooker mwhooker added the duplicate label Jan 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment