question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot create a VM with specialized image

See original GitHub issue

Describe 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:open
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nickzhumscommented, Dec 9, 2020

@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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found