Comments (3)
Here's some code that creates a managed VM using the Azure Ruby SDK:
storage_profile = Azure::ARM::Compute::Models::StorageProfile.new
image_ref = Azure::ARM::Compute::Models::ImageReference.new
image_ref.id = '/subscriptions/f26415d6-0060-42b9-a345-4809b38be41d/resourceGroups/TestRG/providers/Microsoft.Compute/images/managedvm-image-20170308093957'
os_disk = Azure::ARM::Compute::Models::OSDisk.new
os_disk.os_type = 'Linux'
os_disk.name = 'ManagedOSTest-disk0'
os_disk.caching = Azure::ARM::Compute::Models::CachingTypes::ReadWrite
os_disk.create_option = Azure::ARM::Compute::Models::DiskCreateOptionTypes::FromImage
os_disk.disk_size_gb = 128
managed_disk = Azure::ARM::Compute::Models::ManagedDiskParameters.new
managed_disk.storage_account_type = Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS
os_disk.managed_disk = managed_disk
storage_profile.os_disk = os_disk
storage_profile.image_reference = image_ref
params.storage_profile = storage_profile
This requires the use of the image ID instead of the VHD URI, which I know is what you guys currently use for custom images, and in fact I don't think it will work with a custom image created from an unmanaged VM; every time I tried to use such an unmanaged image the call returned The resource ManagedOSTest cannot be created from Image CentOSTestingImage until Image has been successfully created
from fog-azure-rm.
Hi,
We are evaluating this and will share update shortly.
Thanks,
from fog-azure-rm.
This feature has been added #290
from fog-azure-rm.
Related Issues (20)
- How to increase os_disk size HOT 5
- Remove RecoveryVault Support HOT 1
- The integration test of container.rb failed HOT 4
- Bundler could not find compatible versions for gem "mime-types" HOT 8
- Fog ARM Access HOT 2
- Add Fog Support for Azure Stack HOT 17
- Storage#get_blob_properties mock is inaccurate HOT 3
- TypeError: exception class/object expected HOT 2
- Still mime-types conflict HOT 5
- Need support for creating vm with Availability zones. HOT 1
- Json file location
- fog-azure-rm cosmosdb
- SQL server creation exception HOT 2
- Create VM fails using azure shared image gallery HOT 1
- Method "deserialize" is not defined for nil when running with mock
- Unable to fetch image from azure storage HOT 3
- Current Version locks Nokogiri to 1.6.8.1 (Security Vulnerability)
- fog-core version dependency HOT 1
- Can we update azure-storage dependancy version? HOT 1
- Can't stream blob, Ruby 3+ raises exception without explicit &block in Proc.new
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 fog-azure-rm.