azure-sdk-for-ruby
azure-sdk-for-ruby copied to clipboard
Help creating a VM from a specialized image
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?
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 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?
@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
.
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