Cannot create a VM with specialized image
See original GitHub issueDescribe the bug
I am trying to create a VM from custom image. Below is a snippet of my code.
var machineCreatable =
machineDefinition.WithWindowsCustomImage(imageId)
.WithAdminUsername(username)
.WithAdminPassword(password)
.WithTags(tags)
.WithOSDiskName(diskName)
.WithSize(size);
await machineCreatable.CreateAsync(cancellationToken);
With a generalized image or image gallery version the machine is created like expected. However it fails with a specialized image. ‘osProfile not allowed’ and I cannot find an API in the sdk that would allow me to use a specialized image.
Exception or Stack Trace
Microsoft.Rest.Azure.CloudException: Parameter ‘osProfile’ is not allowed.
Setup (please complete the following information):
- OS: Win10
- IDE : Microsoft Visual Studio Enterprise 2019
- Version of the Library used <PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.33.0" />
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Create a VM using a specialized image version
Create a VM from a specialized image version stored in an Azure Compute Gallery (formerly known as Shared Image Gallery).
Read more >Azure VM launch fails with specialized image because of ...
The reason is that the image that I supplied is a specialized image, and creating a VM with a specialized image cannot take...
Read more >Create a VM from a generalized image version
Create a VM from a generalized image version stored in an Azure Compute Gallery (formerly known as Shared Image Gallery). If you want...
Read more >How to capture Azure VM Image with "Specialized ...
Once the VM has been captured as a VM Image, the virtual machine will automatically be deleted. If the OS is specialized, the...
Read more >How to capture a VM image and use it from the image gallery
In this episode of the Azure Portal “How-to” series, learn how to create an image from your virtual machine. We'll show how you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cfauchere the development focus shifted to the next generation of Azure SDKs. For .NET, the packages are currently in preview state and we are actively working on making it production ready. For packages that follow the new Azure SDK standard, you can visit this link : https://azure.github.io/azure-sdk/releases/latest/mgmt/dotnet.html
We have also published a few blog posts on why we are doing this: https://devblogs.microsoft.com/azure-sdk/october-2020-management-ga/ https://devblogs.microsoft.com/azure-sdk/introducing-new-previews-for-azure-management-libraries/
That said, .NET Fluent is on the path to deprecation (although it might not happen soon), we are in a low maintenance mode. Let us know if further questions, thanks!
https://github.com/Azure/azure-sdk-for-net/issues/17435