Comments (5)
@pppchris could you provide the REST communication (e.g. Fiddler trace log)? That API version should be still available.
from azure-libraries-for-net.
From @pppchris on June 8, 2017 2:27
Sure, no worries.
Have tried different settings with the network interface (such as create a new one) but that throws a similar error but pointing to a different API version.
{
"properties": {
"hardwareProfile": {
"vmSize": "Standard_DS2"
},
"storageProfile": {
"imageReference": {
"id": "**image id**"
},
"osDisk": {
"caching": "ReadWrite",
"createOption": "fromImage",
"managedDisk": {
"storageAccountType": "Standard_LRS"
}
}
},
"osProfile": {
"computerName": "**compname**",
"adminUsername": "**admin user**",
"adminPassword": "**admin pass**",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
}
},
"networkProfile": {
"networkInterfaces": [
{
"properties": {
"primary": true
},
"id": "**network interface**"
}
]
}
},
"location": "eastus2",
"tags": {
"yey": "yey"
}
}
from azure-libraries-for-net.
From @anuchandy on June 8, 2017 18:3
It will be great if you can share the code fragment and full fiddler trace as @hovsepm mentioned.
Mean time we would like to share some details about "Custom image", since it can be created in various ways.
You have mentioned that you are trying to create virtual machine from "Custom Image". There are mainly 3 ways to create "custom image".
- Custom image from native VHD
- Custom image by capturing a virtual machine
- Custom image from managed disks.
These 3 cases are covered in this UT. UT also shows how to create virtual machine from custom image.
The above listed ways of creating custom image feature is released along with managed disk
. This is the new/recommended way of creating custom image.
There is older way of creating "custom image" (aka stored image) which is done by capturing a virtual machine based on un-managed disk
. you can see the sample here. Looks like this sample covers your scenario though it shows how to use StoredLinuxImage
instead of StoredWindowsImage
.
from azure-libraries-for-net.
From @pppchris on June 9, 2017 1:2
Hey @hovsepm @anuchandy
What's the best way to dump the full trace so I can remove sensitive information? The JSON trace above was the trace request going off upon the create request.
I am using "Custom image by capturing a virtual machine". I used the JSON above in a Deployment Template it worked out any issues as well.
Code:
var NetworkInterface = Azure.Repo.NetworkInterfaces.GetById(interface);
var baseVM = Azure.Repo.VirtualMachines.Define(name)
.WithRegion(Region.USEast2)
.WithExistingResourceGroup(resourcegroup)
.WithExistingPrimaryNetworkInterface(NetworkInterface)
.WithWindowsCustomImage(imageuri)
.WithAdminUsername(username)
.WithAdminPassword(password)
.WithSize(VirtualMachineSizeTypes.StandardDS2)
.WithTag("yey", "yey")
.Create();
from azure-libraries-for-net.
The compute API version has been updated.
from azure-libraries-for-net.
Related Issues (20)
- How to send arm templates via generic resources to ARM in Azure?
- [BUG] Exception when calling `KeyVaultManagementClient.Vaults.CheckNameAvailabilityAsync` HOT 2
- [QUERY] NetworkManagementClient.PublicIPAddresses.GetAsync() call throws TaskCanceledException. HOT 1
- Add subnetIds in Container group Instances instead of network profile id HOT 1
- [QUERY] Get Role Assignment for an ObjectId HOT 4
- [BUG] NullReferenceExpcetion when removing user assigned identity HOT 3
- [BUG] Fluent SDK can't delete flowlogs resources HOT 1
- [QUERY] How can I set the resource limit property for a container instance using the fluent SDK? HOT 1
- [QUERY] DTU-based model: How to set the DTU size and enable zone availability for a SQL database? HOT 1
- [BUG] Failed to get list of supported orchestrators HOT 5
- [FEATURE REQ] Support Custom Cloud in Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment
- [FEATURE REQ] Create a ContainerGroup with no wait option.
- [BUG] AzureCliCrededentials json format changed HOT 5
- [FEATURE REQ] add a clear deprecation warning to the README HOT 2
- [QUERY] How to build after updating swagger version in api-specs.json? HOT 2
- This repo is missing important files
- [FEATURE REQ] FunctionApp key management HOT 2
- [BUG] AzureEnvironment needs to move away from AAD Graph HOT 1
- [BUG] QueryResourceAsync causing error if used with TimeRange of QueryTimeRange(Datetime, Datetime) HOT 1
- Missing values in Region Enum HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-libraries-for-net.