Coder Social home page Coder Social logo

Managed OS Disk about fog-azure-rm HOT 3 CLOSED

fog avatar fog commented on June 11, 2024
Managed OS Disk

from fog-azure-rm.

Comments (3)

01100010011001010110010101110000 avatar 01100010011001010110010101110000 commented on June 11, 2024

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.

abbas-sheikh-confiz avatar abbas-sheikh-confiz commented on June 11, 2024

Hi,

We are evaluating this and will share update shortly.

Thanks,

from fog-azure-rm.

bilal-naeem-confiz avatar bilal-naeem-confiz commented on June 11, 2024

This feature has been added #290

from fog-azure-rm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.