New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export a vm, remove it and then importing it again fails with the azure cli (azure vm create-from) #254

Closed
woloski opened this Issue Jun 29, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@woloski

woloski commented Jun 29, 2012

These are the commands I am running to export the definition of the VM, then deleting the VM and after that creating it again from the definition. I want to do this because otherwise I get charged for a VM even if it's shutdown, so I want an automated way to bring it back fast with the original VHD.

$ azure vm show --json myvm > myvm.json
...
$ azure vm delete sp-auth10
...
$ azure vm create-from myvm myvm.json
info:   Executing command vm create-from
+ Looking up cloud service                                                     
+ Getting cloud service properties                                             
+ Looking up deployment                                                        
+ Creating VM                                                                  
error:  Required argument VMRole.RoleName for function createDeployment is not defined

This is the content of the json file generated by azure vm show

{
  "DNSName": "myvm.cloudapp.net",
  "VMName": "myvm",
  "IPAddress": "10.74.76.4",
  "InstanceStatus": "ReadyRole",
  "InstanceSize": "Small",
  "InstanceStateDetails": {},
  "OSVersion": {},
  "Image": "MSFT__Win2K8R2SP1-120514-1520-141205-01-en-us-30GB.vhd",
  "DataDisks": [""],
  "Network": {
    "Endpoints": [
      {
        "LocalPort": "3389",
        "Name": "RemoteDesktop",
        "Port": "50977",
        "Protocol": "tcp",
        "Vip": "168.62.162.73"
      }
    ]
  }
}

Any workaround appreciated

Thanks
Matias

@markcowl

This comment has been minimized.

Member

markcowl commented Oct 4, 2012

@glennblock: figure out triage for these issues

@ghost ghost assigned glennblock Oct 4, 2012

@glennblock

This comment has been minimized.

Contributor

glennblock commented Oct 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment