Azure error: don't specify config set when using VMImage with custom OS disk configuration

Can anyone please help? I'm new to Azure and just started a VM from the web interface. Now I want to start some virtual machines using the CLI, but I cannot start the VM in 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 am getting the following output in 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 am not getting an error, Google is not helping and I think I did what the documentation wants ( http://azure.microsoft.com/de-de/documentation/articles/command-line-tools/ )? Any ideas?

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

+3


source to share


2 answers


Note. I haven't used the command line tools you are using, so this is an attempt at mental troubleshooting. Hope this is helpful. :)

It might be helpful to understand that as part of the cover, command line tools make calls against the Azure Service Management REST API when trying to understand errors. An error that says something like "BadRequest" probably comes from the service, not your toolbox.

You are trying to create a new virtual machine, so that means your error is returning from the Create Virtual Machine Deployment API . Unfortunately this is one of the more complex apis in the frontend because there are many ways to deploy a virtual machine. Fortunately, the error message gives us a clue:

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

      

There are several terms that we see in the documentation for the API: Configuration Set

and VMImage

.



Looking at the 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 as they are used to create a new VM from a Sysprepped image (or linux equivalent, not sure what that is). They provide a way to specify a user account and password when creating a new virtual machine, for example.

VMImages, however, are captured and not anonymous. They assume they already have configuration like usernames and passwords embedded in the image, so no configuration is needed.

I am a little surprised that there is a bug to include a config set with the specified VMImage. I would expect the configuration to be simply ignored. However, examining what's in the configuration set can help you figure out how to modify the command line to exclude it. Perhaps sniffing the request body that generates this error and comparing that to the rest of the api will make it easier to fix this issue. :)

Good luck!

+3


source


Try to generalize the virtual machine before capturing it. This means removing personal information from the virtual machine. In practice, this means executing the following command in the virtual machine before capturing an image.



sudo waagent -deprovision+user

0


source







All Articles