azure-sdk-for-ruby icon indicating copy to clipboard operation
azure-sdk-for-ruby copied to clipboard

Help creating a VM from a specialized image

Open chris1984 opened this issue 3 years ago • 3 comments

Hi,

I am trying to create a VM from a specialized image and when the VM creation goes off, I get back the following:

"message": "MsRestAzure::AzureOperationError: InvalidParameter: Parameter 'osProfile' is not allowed."

Which I see from this:

If the image is not generalized, then you can't specify the osProfile (e.g. user/pass) because it already exists.

I see here though, that we need to use osProfile to create a VM:

https://github.com/Azure/azure-sdk-for-ruby/blob/master/management/azure_mgmt_compute/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine.rb#L36-L39

Is there a better way to accomplish this or is this a limitation of the SDK currently?

chris1984 avatar Mar 02 '21 21:03 chris1984

I think you should use imageProfile to specify image. BTW, Ruby SDK is retired currently. It is recommended to use by rest-api. This is an example to show how to create an VM with specialized image. FRI

kairu-ms avatar Mar 04 '21 02:03 kairu-ms

@kairu-ms thank you for the response. I will try that. I noticed in your link, the osProfile is still being sent off, won't this cause the error that I posted, or will it skip over that?

chris1984 avatar Mar 04 '21 15:03 chris1984

@kairu-ms thank you for the response. I will try that. I noticed in your link, the osProfile is still being sent off, won't this cause the error that I posted, or will it skip over that?

No error was caused when I sent off osProfile.

kairu-ms avatar Mar 05 '21 03:03 kairu-ms

Thank you for your interest in Azure SDKs. As detailed in this retirement announcement, this repo is no longer supported as of December 31st 2021. Please find the up-to-date list of languages and services supported with Azure SDKs here: https://aka.ms/azsdk

kurtzeborn avatar Jan 11 '23 03:01 kurtzeborn