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

Azure: Error creating machine #4398

Closed MirzaSikander closed 6 years ago

MirzaSikander commented 6 years ago

Docker-machine version: 0.13.0, build 9ba6da9 Driver: Azure

Powershell:

docker-machine create --driver azure --azure-subscription-id xxxxxxxxx --azure-location "eastus" dockerBuildHost

Result:

(dockerBuildHost) Completed machine pre-create checks.
Creating machine...
(dockerBuildHost) Querying existing resource group.  name="docker-machine"
(dockerBuildHost) Creating resource group.  name="docker-machine" location="eastus"
(dockerBuildHost) Configuring availability set.  name="docker-machine"
(dockerBuildHost) Configuring network security group.  name="dockerBuildHost-firewall" location="eastus"
(dockerBuildHost) Querying if virtual network already exists.  name="docker-machine-vnet" rg="docker-machine" location="eastus"
(dockerBuildHost) Creating virtual network.  name="docker-machine-vnet" rg="docker-machine" location="eastus"
(dockerBuildHost) Configuring subnet.  name="docker-machine" vnet="docker-machine-vnet" cidr="192.168.0.0/16"
(dockerBuildHost) Creating public IP address.  name="dockerBuildHost-ip" static=false
(dockerBuildHost) Creating network interface.  name="dockerBuildHost-nic"
(dockerBuildHost) Creating storage account.  name="xxxxxxx" location="eastus" sku=Standard_LRS
(dockerBuildHost) Creating virtual machine.  username="docker-user" osImage="canonical:UbuntuServer:16.04.0-LTS:latest" name="dockerBuildHost" location="eastus" size="Standard_A2"
Error creating machine: Error in driver during machine creation: compute.VirtualMachinesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidParameter" Message="Container name 'vhd-dockerBuildHost' in URL https://xxxxxx.blob.core.windows.net/vhd-dockerBuildHost/dockerBuildHost-os-disk.vhd is invalid. Container names must be 3-63 characters in length and may contain only lower-case alphanumeric characters and hyphen. Hyphen must be preceeded and followed by an alphanumeric character."
MirzaSikander commented 6 years ago

The issue was staring me in the face but sometimes you need to look over the same thing twice to make sense of it.

The problem is with the <machine-name> parameter. I used dockerBuildHost, which contains Upper-case characters. Converting to lower-case worked.