Coder Social home page Coder Social logo

azure-support-scripts's People

Contributors

d-sergienko avatar dibaskar avatar malachma avatar sribs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

azure-support-scripts's Issues

when version is missing on source VM VM is not created with an error of "Querying the image of 'null:null:null:null' failed for an error 'The value of parameter version is invalid."

Using the BASH Linux VM Recovery script on a migrated VM gave an error of:

Querying the image of 'null:null:null:null' failed for an error 'The value of parameter version is invalid.'. Configuring plan settings will be skipped Deployment failed. Correlation ID: 7c7a0b44-f041-4b4f-99de-1d3e08391f23. {   "error": {     "code": "InvalidParameter",     "message": "The value of parameter imageReference.version is invalid.",     "target": "imageReference.version"   } }
--

This is because the script attempts to create a recovery VM based on the version of the source VM which on a migrated VM appears to be missing

A workaround was to use the PowerShell version of the script, which offers the ability to specify the Publisher and versions to be used for creating the Recovery VM.

These are the commands from PowerShell in Cloud Shell which force to create a recovery VM with Centos 7.5

./New-AzureRMRescueVM.ps1 -ResourceGroupName Source_VM_RG -VmName Source_vm_name -subscriptionId xxxxxx -offer CentOs -Publisher OpenLogic -sku 7.5 -Version 7.5.20180815 -UserName xxxxxx -Password xxxxxx

Ask: Integrate missing parameters into BASH Version (Publisher, sku, Version)

I suggest that logic is inserted into the script that if a version or other information is missing from the source VM, which prevents creation of a recovery VM then we should provide examples or the actual commands to create the recovery VM

or list the images and display them to customer
az vm image list --all --offer centos --output table

failing when VM and Storage are in different region

When running the script against a VM in a Region with a storage account name that is not consistent with location an error is thrown at the Creating snapshot phase:

##### Generatnig Snapshot #######
lvm-test_OsDisk_1_7436bea72ede4298bd956f5fc146566c
lvm-test-OsDisk-1-7436bea72ede4298bd956f5fc146566c-06-03-2019-04-34-19
Resource lvm-test_OsDisk_1_7436bea72ede4298bd956f5fc146566c is not found.

Storage Account name: cloud-shell-storage-westeurope

Storage Region: West Europe

VM Region: North Europe

./new-rescue.sh --rescue-vm-name rescuetestvm2 -g cloud-shell-storage-westeurope -n lvm-test -s 754fe295-xxxx-xxxx -u azureadmin -p M1cr0softazure

It's possibly due to the VM and Storage Account being in different locations

Running the create snapshot manually as per the script throws the error:

**az snapshot create -g cloud-shell-storage-westeurope -n vflsnap2 --source lvm-test_OsDisk_1_7436bea72ede4298bd956f5fc146566c -l northeurope6f5fc146566c

Resource lvm-test_OsDisk_1_7436bea72ede4298bd956f5fc146566c is not found.
vittorio@Azure:~/azure-support-scripts$**

Using the -l flag with the location of the VM creates the snapshot
az snapshot create -g cloud-shell-storage-westeurope -n vflsnap1 --source lvm-test_OsDisk_1_7436bea72ede4298bd956f5fc146566c -l northeurope

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.