hashicorp / hashicorp/packer-plugin-virtualbox

virtualbox-ovf with no EULA acceptance can exit with `VBoxManage: error: Could not find a registered machine`

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
bug builder/virtualbox-ovf track-internal
Dominant language
Go
Stars
29
Forks
45
PR merge metrics
No merged PRs in 30d

Description

_This issue was originally opened by @akkornel as hashicorp/packer#10777. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._


#### Overview of the Issue

As noted in [the VirtualBox OVF builder page](https://www.packer.io/docs/builders/virtualbox/ovf#run-configuration) (specifically in the discussion of `import_flags`), importing an OVF/OVA might require accepting a license agreement that is bundled in with the OVF/OVA. The problem I'm reporting is this: If a EULA is required, but `import_flags` is not set, Packer will give an obscure error message.

The error message shown is `Error enabling VRDP: VBoxManage error: VBoxManage: error: Could not find a registered machine named …`.

In other words, Packer isn't failing on OVA import (where EULA acceptance would be relayed to VirtualBox), Packer is failing on a later step.

I think the root cause is actually a bug with `VBoxManage`: Even though there is a license-acceptance error, the `VBoxManage` command is exiting with exit code zero. I think Packer is taking that exit code to mean that things are working fine. I reported this issue to Oracle, here: https://www.virtualbox.org/ticket/20261

I am reporting the issue here for two reasons:

1. The error coming from Packer does not clearly show where the problem is.
2. There might be something that Packer can do in the meantime, while waiting for the bug to be patched and a new VirtualBox release to be made.
3. I couldn't find this issue reported anywhere, so by reporting it here, I hope to help anyone else who is also looking.

#### Reproduction Steps

1. Download the [Debian 10 VirtualBox image](https://www.linuxvmimages.com/images/debian-10/) from [linuxvmimages.com](https://www.linuxvmimages.com/) (direct link: https://sourceforge.net/projects/linuxvmimages/files/VirtualBox/D/10/Debian_10.7.0_VB.zip/download). The download comes as a .zip file, so unzip that to get the actual OVA.
2. Copy the simplified packer buildfile. Fix up the path to the OVA file. Save as `deb.pkr.hcl`.
3. Run `packer build deb.pkr.hcl`. You should get an error `Error enabling VRDP: VBoxManage error: VBoxManage: error: Could not find a registered machine named …`
4. Edit the packer buildfile, uncommenting the commented-out lines.
5. Re-run `packer build deb.pkr.hcl`. The build should succeed.

### Packer version

1.7.0

### Simplified Packer Buildfile

I have this buildfile named `deb.pkr.hcl` on my computer. Just FYI, as you'll see that name later in the log dump. You'll also need to fix up the source_path if you try this yourself.

```
source "virtualbox-ovf" "deb" {
source_path = "/Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova"
checksum = "md5:05cd281a26d258d141e3241072796129"
# import_flags = [
# "--vsys",
# "0",
# "--eula",
# "accept"
# ]
ssh_username = "debian"
ssh_password = "debian"
acpi_shutdown = true
}

build {
sources = [
"sources.virtualbox-ovf.deb"
]
}
```

### Operating system and Environment details

macOS Catalina 10.15.7, running on Intel 64-bit.

iTerm2 3.4.4, with the macOS bash shell.

Packer 1.7.0 downloaded from https://releases.hashicorp.com/packer/1.7.0/packer_1.7.0_darwin_amd64.zip

### Log Fragments and crash.log files

Output from `PACKER_LOG=1 ./packer build deb.pkr.hcl`

```
ITS-C02C91G0MD6R:~/Downloads/packer akkornel(p)$ PACKER_LOG=1 ./packer build deb.pkr.hcl
2021/03/17 09:06:35 [INFO] Packer version: 1.7.0 [go1.15.8 darwin amd64]
2021/03/17 09:06:35 [TRACE] discovering plugins in /Users/akkornel/Downloads/packer
2021/03/17 09:06:35 [TRACE] discovering plugins in /Users/akkornel/.packer.d/plugins
2021/03/17 09:06:35 [TRACE] discovering plugins in .
2021/03/17 09:06:35 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/03/17 09:06:35 [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/akkornel/.packerconfig
2021/03/17 09:06:35 [WARN] Config file doesn't exist: /Users/akkornel/.packerconfig
2021/03/17 09:06:35 [INFO] Setting cache directory: /Users/akkornel/Downloads/packer/packer_cache
2021/03/17 09:06:35 [TRACE] Starting internal plugin packer-builder-virtualbox-ovf
2021/03/17 09:06:35 Starting plugin: /Users/akkornel/Downloads/packer/packer []string{"/Users/akkornel/Downloads/packer/packer", "plugin", "packer-builder-virtualbox-ovf"}
2021/03/17 09:06:35 Waiting for RPC address for: /Users/akkornel/Downloads/packer/packer
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: [INFO] Packer version: 1.7.0 [go1.15.8 darwin amd64]
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/akkornel/.packerconfig
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: [WARN] Config file doesn't exist: /Users/akkornel/.packerconfig
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: [INFO] Setting cache directory: /Users/akkornel/Downloads/packer/packer_cache
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: args: []string{"packer-builder-virtualbox-ovf"}
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Plugin address: unix /var/folders/yv/2nf8pvw54f1d_c6s28v8pdb40000gp/T/packer-plugin161715859
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Waiting for connection...
2021/03/17 09:06:35 Received unix RPC address for /Users/akkornel/Downloads/packer/packer: addr is /var/folders/yv/2nf8pvw54f1d_c6s28v8pdb40000gp/T/packer-plugin161715859
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Serving a plugin connection...
will forcibly halt the virtual machine, which may result in data loss.

on deb.pkr.hcl line 1:
(source code not available)

2021/03/17 09:06:35 Build debug mode: false
2021/03/17 09:06:35 Force build: false
2021/03/17 09:06:35 On error:
2021/03/17 09:06:35 Waiting on builds to complete...
2021/03/17 09:06:35 Starting build run: virtualbox-ovf.deb
2021/03/17 09:06:35 Running builder:
Warning: A shutdown_command was not specified. Without a shutdown command, Packer
2021/03/17 09:06:35 [INFO] (telemetry) Starting builder
will forcibly halt the virtual machine, which may result in data loss.

on deb.pkr.hcl line 1:
(source code not available)

virtualbox-ovf.deb: output will be in this color.

2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: VBoxManage path: /usr/local/bin/VBoxManage
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Suppressing annoying messages in VirtualBox
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Executing VBoxManage: []string{"setextradata", "global", "GUI/UpdateDate", "1 d, 2022-01-01, stable"}
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: stdout:
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: stderr:
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Executing VBoxManage: []string{"setextradata", "global", "GUI/RegistrationData", "triesLeft=0"}
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: stdout:
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: stderr:
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Executing VBoxManage: []string{"setextradata", "global", "GUI/SuppressMessages", "confirmInputCapture,remindAboutAutoCapture,remindAboutMouseIntegrationOff,remindAboutMouseIntegrationOn,remindAboutWrongColorDepth"}
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: stdout:
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: stderr:
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Executing VBoxManage: []string{"setextradata", "global", "GUI/UpdateCheckCount", "60"}
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: stdout:
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: stderr:
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: No floppy files specified. Floppy disk will not be made.
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: No CD files specified. CD disk will not be made.
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: VBoxManage --version output: 6.1.18r142142
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: VirtualBox version: 6.1.18
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: guest_additions_url is blank; querying driver for iso.
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Found Default Guest Additions ISO: /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Guest additions URL: /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-ovf.deb: Retrieving Guest additions
==> virtualbox-ovf.deb: Trying /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Acquiring lock for: /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso (/Users/akkornel/Downloads/packer/packer_cache/7784a55a71d48a1e9b5c487431438fef0f19d87f.iso.lock)
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Leaving retrieve loop for Guest additions
==> virtualbox-ovf.deb: Trying /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
2021/03/17 09:06:35 packer-builder-virtualbox-ovf plugin: Acquiring lock for: /Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova?checksum=md5%3A05cd281a26d258d141e3241072796129 (/Users/akkornel/Downloads/packer/packer_cache/fe67faf1710b432aefa6516f5e02263d488421dc.ova.lock)
==> virtualbox-ovf.deb: /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso => /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-ovf.deb: Retrieving OVF/OVA
==> virtualbox-ovf.deb: Trying /Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova
==> virtualbox-ovf.deb: Trying /Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova?checksum=md5%3A05cd281a26d258d141e3241072796129
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Leaving retrieve loop for OVF/OVA
==> virtualbox-ovf.deb: /Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova?checksum=md5%3A05cd281a26d258d141e3241072796129 => /Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Executing VBoxManage: []string{"import", "/Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova", "--vsys", "0", "--vmname", "packer-deb-1615997195"}
==> virtualbox-ovf.deb: Importing VM: /Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: stdout: Disks:
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: vmdisk1 549755813888 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized Debian_10.7.0_VB_LinuxVMImages.COM-disk001.vmdk -1 -1
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin:
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Virtual system 0:
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 0: Suggested OS type: "Debian_64"
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (change with "--vsys 0 --ostype "; use "list ostypes" to list all possible values)
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 1: VM name specified with --vmname: "packer-deb-1615997195"
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 2: Suggested VM group "/"
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (change with "--vsys 0 --group ")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 3: Suggested VM settings file name "/Users/akkornel/VirtualBox VMs/Debian_10.7.0_VB_LinuxVMImages.COM/Debian_10.7.0_VB_LinuxVMImages.COM.vbox"
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (change with "--vsys 0 --settingsfile ")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 4: Suggested VM base folder "/Users/akkornel/VirtualBox VMs"
==> virtualbox-ovf.deb: Mounting ISOs...
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (change with "--vsys 0 --basefolder ")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 5: Product (ignored): Debian 10.7.0
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 6: Vendor (ignored): Debian Community
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 7: Version (ignored): 10.7.0
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 8: ProductUrl (ignored): https://www.linuxvmimages.com/debian-10
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 9: VendorUrl (ignored): https://debian.org
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 10: Description "Debian 10.7.0 VirtualBox Image
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: User Name: debian
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Password: debian"
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (change with "--vsys 0 --description ")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 11: End-user license agreement
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (display with "--vsys 0 --eula show";
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: accept with "--vsys 0 --eula accept")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 12: Number of CPUs: 2
virtualbox-ovf.deb: No ISOs to mount; continuing...
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (change with "--vsys 0 --cpus ")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 13: Guest memory: 2048 MB
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (change with "--vsys 0 --memory ")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 14: Sound card (appliance expects "", can change on import)
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (disable with "--vsys 0 --unit 14 --ignore")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 15: USB controller
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (disable with "--vsys 0 --unit 15 --ignore")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 16: Network adapter: orig Bridged, config 3, extra slot=0;type=Bridged
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 17: CD-ROM
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (disable with "--vsys 0 --unit 17 --ignore")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 18: IDE controller, type PIIX4
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (disable with "--vsys 0 --unit 18 --ignore")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 19: IDE controller, type PIIX4
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (disable with "--vsys 0 --unit 19 --ignore")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 20: SATA controller, type AHCI
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (disable with "--vsys 0 --unit 20 --ignore")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: 21: Hard disk image: source image=Debian_10.7.0_VB_LinuxVMImages.COM-disk001.vmdk, target path=Debian_10.7.0_VB_LinuxVMImages.COM-disk001.vmdk, controller=20;channel=0
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: (change target path with "--vsys 0 --unit 21 --disk path";
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: disable with "--vsys 0 --unit 21 --ignore")
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Interpreting /Users/akkornel/Downloads/Debian_10.7.0_VB/Debian_10.7.0_VB_LinuxVMImages.COM.ova...
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: OK.
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: VBoxManage: error: Cannot import until the license agreement listed above is accepted.
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Not attaching guest additions since we're uploading.
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Looking for available port between 5900 and 6000 on 127.0.0.1
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Found available port: 5996 on IP: 127.0.0.1
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Executing VBoxManage: []string{"modifyvm", "packer-deb-1615997195", "--vrdeaddress", "127.0.0.1", "--vrdeauthtype", "null", "--vrde", "on", "--vrdeport", "5996"}
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: stdout:
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: stderr: VBoxManage: error: Could not find a registered machine named 'packer-deb-1615997195'
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 547 of file VBoxManageModifyVM.cpp
==> virtualbox-ovf.deb: VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
==> virtualbox-ovf.deb: VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 547 of file VBoxManageModifyVM.cpp
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: failed to unlock port lockfile: close tcp 127.0.0.1:5996: use of closed network connection
==> virtualbox-ovf.deb: Error enabling VRDP: VBoxManage error: VBoxManage: error: Could not find a registered machine named 'packer-deb-1615997195'
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: Executing VBoxManage: []string{"unregistervm", "packer-deb-1615997195", "--delete"}
==> virtualbox-ovf.deb: VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
==> virtualbox-ovf.deb: VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 547 of file VBoxManageModifyVM.cpp
==> virtualbox-ovf.deb: Deregistering and deleting imported VM...
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: stdout:
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: stderr: VBoxManage: error: Could not find a registered machine named 'packer-deb-1615997195'
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
2021/03/17 09:06:38 packer-builder-virtualbox-ovf plugin: VBoxManage: error: Context: "FindMachine(Bstr(VMName).raw(), machine.asOutParam())" at line 150 of file VBoxManageMisc.cpp
==> virtualbox-ovf.deb: VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
==> virtualbox-ovf.deb: VBoxManage: error: Context: "FindMachine(Bstr(VMName).raw(), machine.asOutParam())" at line 150 of file VBoxManageMisc.cpp
==> virtualbox-ovf.deb: Error deleting VM: VBoxManage error: VBoxManage: error: Could not find a registered machine named 'packer-deb-1615997195'
==> virtualbox-ovf.deb: VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
2021/03/17 09:06:38 [INFO] (telemetry) ending
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 547 of file VBoxManageModifyVM.cpp
==> virtualbox-ovf.deb: VBoxManage: error: Context: "FindMachine(Bstr(VMName).raw(), machine.asOutParam())" at line 150 of file VBoxManageMisc.cpp
==> Wait completed after 2 seconds 860 milliseconds
2021/03/17 09:06:38 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2021/03/17 09:06:38 machine readable: virtualbox-ovf.deb,error []string{"Error enabling VRDP: VBoxManage error: VBoxManage: error: Could not find a registered machine named 'packer-deb-1615997195'\nVBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports\nVBoxManage: error: Context: \"FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())\" at line 547 of file VBoxManageModifyVM.cpp"}
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 547 of file VBoxManageModifyVM.cpp
==> Builds finished but no artifacts were created.
==> virtualbox-ovf.deb: Deleting output directory...
2021/03/17 09:06:38 [INFO] (telemetry) Finalizing.
Build 'virtualbox-ovf.deb' errored after 2 seconds 860 milliseconds: Error enabling VRDP: VBoxManage error: VBoxManage: error: Could not find a registered machine named 'packer-deb-1615997195'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 547 of file VBoxManageModifyVM.cpp

==> Wait completed after 2 seconds 860 milliseconds

==> Some builds didn't complete successfully and had errors:
--> virtualbox-ovf.deb: Error enabling VRDP: VBoxManage error: VBoxManage: error: Could not find a registered machine named 'packer-deb-1615997195'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 547 of file VBoxManageModifyVM.cpp

==> Builds finished but no artifacts were created.
2021/03/17 09:06:39 waiting for all plugin processes to complete...
2021/03/17 09:06:39 /Users/akkornel/Downloads/packer/packer: plugin process exited
```

#### Postscript

While writing up this issue, I also found an issue with the documentation on the [the VirtualBox OVF builder page](https://www.packer.io/docs/builders/virtualbox/ovf#run-configuration). Specifically, the `--eula-accept` option no longer exists. Instead, EULA acceptance is indicated with `--vsys 0 --eula accept`, which needs to be coded as four command-line options (instead of one string, see the simplified Packer build file above). I think it would be good to update the documentation, but I'm not sure how best to go about it (`--vsys 0 --eula accept` is much more complicated than `--eula-accept`), and I wasn't sure if this should be reported in a separate bug report.

As always, let me know if you have any questions, or if I got something horribly wrong!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.