Skip to content

After exporting virtual machine: Error unregistering guest additions #3121

Description

@virgo47

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"?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions