Azure error: no configuration set should be specified when using a VMImage file with a specialized operating system disk configuration

advertisements

Can anyone help? I'm new to Azure and only started VM's from the Web interface. Now I want to start some VMs with the CLI but I can't start a VM on the command line using the following command:

azure vm create --vm-size extrasmall --ssh --ssh-cert ~/.ssh/Talentwunder2.pem --no-ssh-password --location "South Central US" tw-cloud-2 tw-image-v1-20140808-441581 azureuser

I get the following output on the shell (MacOS btw.):

info:    Executing command vm create
+ Looking up image tw-image-v1-20140808-441581
+ Looking up cloud service
info:    cloud service tw-cloud-2 not found.
+ Creating cloud service
+ Configuring certificate
+ Creating VM
+ Deleting cloud service
error:   No Configuration Set should be specified while using a VMImage with a specialized OS Disk Configuration.
info:    Error information has been recorded to azure.err
error:   vm create command failed

and azure.err has the following message:

Wed Aug 27 2014 23:18:25 GMT+0200 (CEST):
{ [Error: No Configuration Set should be specified while using a VMImage with a specialized OS Disk Configuration.]
code: 'BadRequest',
statusCode: 400,
requestId: 'c398d47fdc71039a9ca1a3a1bb197fd4' }
Error: No Configuration Set should be specified while using a VMImage with a specialized OS Disk Configuration.
    at Function.ServiceClient._normalizeError (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/lib/services/serviceclient.js:785:23)
    at /usr/local/lib/node_modules/azure-cli/node_modules/azure-common/lib/services/filters/errorhandlingfilter.js:44:29
    at Request._callback (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/lib/http/request-pipeline.js:109:14)
    at Request.self.callback (/usr/local/lib/node_modules/azure-cli/node_modules/request/request.js:129:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/azure-cli/node_modules/request/request.js:873:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/azure-cli/node_modules/request/request.js:824:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16

I don't get the error message, Google is no help and I think I did what the documentation (http://azure.microsoft.com/de-de/documentation/articles/command-line-tools/) wants? Any ideas?

BtW: I created the VM image from a running system and can start machines on the web interface without any problems.


Note- I haven't used the command line tools you're using, so this is an attempt at psychic troubleshooting. Hope it's useful. :)

It can be helpful to understand that under the covers, the command line tools are making calls against Azure's Service Management REST API when trying to understand errors. A failure that says something like "BadRequest" is probably coming from the service, not your toolset.

You're trying to create a new Virtual Machine, so that means your error is being returned from the Create Virtual Machine Deployment API. Unfortunately, this is one of the more complex apis in the interface because there are a ton of ways to spin up a VM. Fortunately, the error message gives us the key clue:

No Configuration Set should be specified
while using a VMImage with a specialized
OS Disk Configuration.

There are a couple terms in there that we see in the documentation for the API: Configuration Set and VMImage.

Looking at VMImage information, we see the following in the documentation: Optional. Specifies the name of the VM Image that is to be used to create the Virtual Machine. If this element is used, the ConfigurationSets element is not used. For more information, see Capture VM Image.

ConfigurationSets are ignored because they're used to provision a new virtual machine from a Sysprepped image (or the linux equivalent, not sure what that is). They provide a way to specify a user account and password when creating a new VM, e.g.

VMImages, however, are captured and not anonymized. They're expected to already have configuration such as usernames and passwords built into the image, so configuration sets aren't needed.

I'm a little surprised that there's an error for including the configuration set with the VMImage specified-- I would expect the configuration set to simply be ignored. Learning what is in the configuration set might help understand how the commandline needs to be modified to exclude it, however. Perhaps sniffing the request body that generates this error and comparing that to the rest api will make troubleshooting this issue easier. :)

Good luck!