docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.63k stars 1.96k forks source link

virtualbox import trying to clonehd the boot2docker.iso? #1756

Open ghchinoy opened 9 years ago

ghchinoy commented 9 years ago

Similar to #1704 , I have a larger, resized boot2docker-vm, which, when trying to migrate to docker-machine (0.4.1), bails with the error below. I'm not sure why it's trying to clone the .iso, but also not sure whether my resized boot2docker-vm is a potential cause.

Please let me know what other information I can provide to help figure out why the import from boot2docker into a docker-machine vm isn't working.

STDERR:
executing: /usr/local/bin/VBoxManage clonehd /Users/me/.boot2docker/boot2docker.iso /Users/me/.docker/machine/machines/docker-vm/disk.vmdk
STDOUT:
STDERR: VBoxManage: error: The medium '/Users/me/.boot2docker/boot2docker.iso' can't be used as the requested device type
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp

Error creating machine: exit status 1
You will want to check the provider to make sure the machine and associated resources were properly removed.

Also, removing the .iso from the VBox boot2docker-vm's storage setting yields the following error message Error creating machine: stat none: no such file or directory You will want to check the provider to make sure the machine and associated resources were properly removed. (I'd removed the previous run's docker-vm via docker-machine rm docker-vm and verified that ~/.docker/machine/machines/docker-vm did not exist).

ehazlett commented 9 years ago

Did you change the virtual disk mappings at all?

ghchinoy commented 9 years ago

@ehazlett I'm not sure I follow - what would be the command/process to change the virtual disk mappings?

I hadn't changed any settings from boot2docker's initial install.

nathanleclaire commented 9 years ago

Please try the 0.5.1 when it comes out and let us know if it fixes the issue.

dmp42 commented 9 years ago

Reopening until @ghchinoy confirms 0.5.1 fixes it. We can close this in a few days if he does not answer.

ghchinoy commented 9 years ago

Still no good.

Manually downloaded 0.5.1 (via curl -L https://github.com/docker/machine/releases/download/v0.5.1/docker-machine_darwin-amd64.zip >machine.zip && unzip machine.zip && rm machine.zip && \ mv docker-machine* /usr/local/bin) with VBox 5.0.8 (VBoxManage Oracle VM VirtualBox Command Line Management Interface Version 5.0.8).

derby:tmp $ ls ~/.docker/machine/machines/ && docker-machine create -d virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm docker-vm
dev
Running pre-create checks...
Creating machine...
(docker-vm) OUT | Creating VirtualBox VM...
Error creating machine: Error in driver during machine creation: /usr/local/bin/VBoxManage clonehd /Users/me/.boot2docker/boot2docker.iso /Users/me/.docker/machine/machines/docker-vm/disk.vmdk failed:
VBoxManage: error: The medium '/Users/me/.boot2docker/boot2docker.iso' can't be used as the requested device type
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp

derby:tmp $ docker-machine -v
docker-machine version 0.5.1 (7e8e38e)

I notice there's a VBox 5.0.10 around, should I upgrade and try again?

gvangool commented 9 years ago

I have the same error (with VirtualBox 5.0.10 on OS X 10.11)

$ docker-machine create --driver=virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm docker-vm
Running pre-create checks...
Creating machine...
(docker-vm) OUT | Creating VirtualBox VM...
Error creating machine: Error in driver during machine creation: stat none: no such file or directory
$  VBoxManage list vms | grep docker
"boot2docker-vm" {27b3f022-7c13-4a49-9871-2ed66b782512}

Versions

$ docker-machine --version
docker-machine version 0.5.1 (HEAD)
$ VBoxManage --version
5.0.10r104061