none
[Ruby][Virtual Machines]Save an image that is associated with a virtual machine argument needed not mentioned in doc RRS feed

  • Question

  • Hi,

    I'm using Fog's `Azure::Armrest::VirtualMachineService`

    when I use capture(name, option) with option
     option = {
        'vhdPrefix' => image_name,
        'destinationContainerName' => image_name,
        'overwriteVhds' => true,
        }
    it keep telling me:  Required parameter 'CaptureVMInput' is missing (null)

    but not thing was told in it's api doc

    https://msdn.microsoft.com/en-us/library/azure/mt163560.aspx

    about this parameter

    Could some one tell me what's wrong???





    Wednesday, August 3, 2016 4:49 PM

Answers

  • Hi,

    Thank you for posting here.

    According to the code you posted, it seems that you are using the third party of Azure ARM SDK for Ruby https://github.com/ManageIQ/azure-armrest.

    I viewed the related source codes, then I think the possible missing is that missing `resource_group` attribute in the `Azure::Armrest::ArmrestService.configure` initialization, but I'm not sure without your complete code.

    Moreover, very importantly, you must stop and deallocate the VM before you do the capture operation for a VM, please see the REST API at https://msdn.microsoft.com/en-us/library/azure/mt163686.aspx.

    As references, please see the articles below for Linux VM and Windows VM to know the steps for the capture operation flowing.

    For Linux VM, please refer to https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-capture-image/

    For Windows VM, please refer to https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-capture-image/.

    Hope it helps.

    Best Regards.

    Friday, August 5, 2016 4:00 PM
    Moderator