locked
Create Azure VM on targeted storage account (xplate cli tools) RRS feed

  • Question

  • Hi, I'm trying to create azure VM using platform Ubuntu image. 

    Command :

    azure vm create "xplattestd1" "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20150123-en-us-30GB" -u test -p "********Azure" -l "West US" -z "Standard_D1" -e 22 -v

    The issue is, VM gets created successfully but the storage account remains same X. I want create VM in another storage account.

    I tried to use "azure storage account set Y". But still it is creating VM in X account only.

    I can create VM in any other storage account with powershell tools by setting "CurrentStorageAccount" parameter while setting the storage account. But what about xplat cli tools? How to set default storage account?


    • Edited by Shital Savekar Thursday, March 5, 2015 5:55 PM OS version wrong.
    Thursday, March 5, 2015 5:54 PM

Answers

  • Hi,

    Here are a few commands available to manage your storage accounts. Suggest you to use them    

    storage account list [options]

    storage account show [options] <name>

    storage account create [options] <name>

    storage account set [options] <name>

    storage account delete [options] <name>

    You can also check the Existence of the Storage Account by executing the below command

     

    # Confirm that Azure storage account exists

    azurestorageexist=$(azure storage account list --json | jsawk 'return true' -q "[?name=\"$azurestoragename\"]")
    if [ $azurestorageexist != [true] ]; then 
        echo "Error: Azure storage account ${azurestoragename} not found"
        exit 1
    fi

    Hope this helps !

    Regards,

    Sowmya




    • Edited by Sowmya K R Tuesday, March 10, 2015 8:10 PM
    • Proposed as answer by Sowmya K R Wednesday, March 11, 2015 2:11 PM
    • Marked as answer by Manu Rekhar Thursday, March 12, 2015 7:25 PM
    Tuesday, March 10, 2015 8:08 PM

All replies

  • Hi,

    Thanks for posting !

    I am currently researching to gather more information which might take some time and hence will get back to you shortly.

    Appreciate your time and patience.

    Regards,

    Sowmya
    Thursday, March 5, 2015 7:57 PM
  • Hi,

    Thank you for posting in here.

    We are checking on this and will get back at earliest.

    Regards,
    Manu Rekhar
    Thursday, March 5, 2015 7:58 PM
  • Hi,

    Here are a few commands available to manage your storage accounts. Suggest you to use them    

    storage account list [options]

    storage account show [options] <name>

    storage account create [options] <name>

    storage account set [options] <name>

    storage account delete [options] <name>

    You can also check the Existence of the Storage Account by executing the below command

     

    # Confirm that Azure storage account exists

    azurestorageexist=$(azure storage account list --json | jsawk 'return true' -q "[?name=\"$azurestoragename\"]")
    if [ $azurestorageexist != [true] ]; then 
        echo "Error: Azure storage account ${azurestoragename} not found"
        exit 1
    fi

    Hope this helps !

    Regards,

    Sowmya




    • Edited by Sowmya K R Tuesday, March 10, 2015 8:10 PM
    • Proposed as answer by Sowmya K R Wednesday, March 11, 2015 2:11 PM
    • Marked as answer by Manu Rekhar Thursday, March 12, 2015 7:25 PM
    Tuesday, March 10, 2015 8:08 PM