freerobby / swarm_pi_flasher

1 stars 0 forks source link

Failed to open image disk-image.vmdk #1

Open jkutner opened 7 years ago

jkutner commented 7 years ago

I'm getting the following error when trying to run sh flash.sh:

==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "d4096b7c-d89f-4d8c-9baa-b105391ceb58", "--type", "headless"]

Stderr: VBoxManage: error: VD: error VERR_RESOURCE_BUSY opening image file '/path/to/./disk-image.vmdk' (VERR_RESOURCE_BUSY).
VBoxManage: error: Failed to open image '/path/to/./disk-image.vmdk' in read-write mode (VERR_RESOURCE_BUSY).
VBoxManage: error: Failed to attach driver below us! Device or resource is busy. (VERR_RESOURCE_BUSY).
VBoxManage: error: AHCI: Failed to attach drive to Port1 (VERR_RESOURCE_BUSY)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

Re-running sh flash.sh gives a slightly different error:

VBoxManage: error: Invalid UUID or filename "./disk-image.vmdk"

Vagrant version: 1.9.3 VirtualBox version: 5.0.36 r114008 (w/ extensions) OS version: Mac OS X 10.11.6 (El Capitan)

freerobby commented 7 years ago

@jkutner Thanks for giving this a spin. The only major difference between your setup and mine is that I'm on VirtualBox 5.1. If you try upgrading and it doesn't do the trick, I'll note 5.1 as a dependency in the README. I'll also try to reproduce myself against 5.0 tonight.

jkutner commented 7 years ago

@freerobby I upgraded to 5.1 but i'm getting the same two errors.

freerobby commented 7 years ago

@jkutner My instinct from the VERR_RESOURCE_BUSY error is that the issue is with the disk device and not the disk-image.vmdk file (contrary to what the error message says). I wonder if some part of the unmount command in flash.sh is failing silently.

Would you mind using Disk Utility to manually unmount (but not eject) the SD card, and then try running flash.sh again? That will help narrow down where the problem is. Whatever that tells us, I can do a deeper dive tonight after work!

jkutner commented 7 years ago

I actually had the same suspicion. I'll keep tinkering.