{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/435","repository_url":"https://api.github.com/repos/Azure/azure-sdk-for-go","labels_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/435/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/435/comments","events_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/435/events","html_url":"https://github.com/Azure/azure-sdk-for-go/issues/435","id":186601942,"number":435,"title":"disk resize ","user":{"login":"rootfs","id":7062400,"avatar_url":"https://avatars.githubusercontent.com/u/7062400?v=3","gravatar_id":"","url":"https://api.github.com/users/rootfs","html_url":"https://github.com/rootfs","followers_url":"https://api.github.com/users/rootfs/followers","following_url":"https://api.github.com/users/rootfs/following{/other_user}","gists_url":"https://api.github.com/users/rootfs/gists{/gist_id}","starred_url":"https://api.github.com/users/rootfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rootfs/subscriptions","organizations_url":"https://api.github.com/users/rootfs/orgs","repos_url":"https://api.github.com/users/rootfs/repos","events_url":"https://api.github.com/users/rootfs/events{/privacy}","received_events_url":"https://api.github.com/users/rootfs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-01T17:58:00Z","updated_at":"2016-11-02T01:15:02Z","closed_at":"2016-11-02T01:15:02Z","body":"Is there any plan to support a data disk resize?\r\n\r\nFrom the [API doc](https://msdn.microsoft.com/en-us/library/azure/ee691966.aspx), updating blob size can be done by updating blob properties. Not sure if that's all it takes to change the vhd size though, since vhds also set sizes in their footers."},"comment":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/comments/257745869","html_url":"https://github.com/Azure/azure-sdk-for-go/issues/435#issuecomment-257745869","issue_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/435","id":257745869,"user":{"login":"mcardosos","id":18688426,"avatar_url":"https://avatars.githubusercontent.com/u/18688426?v=3","gravatar_id":"","url":"https://api.github.com/users/mcardosos","html_url":"https://github.com/mcardosos","followers_url":"https://api.github.com/users/mcardosos/followers","following_url":"https://api.github.com/users/mcardosos/following{/other_user}","gists_url":"https://api.github.com/users/mcardosos/gists{/gist_id}","starred_url":"https://api.github.com/users/mcardosos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcardosos/subscriptions","organizations_url":"https://api.github.com/users/mcardosos/orgs","repos_url":"https://api.github.com/users/mcardosos/repos","events_url":"https://api.github.com/users/mcardosos/events{/privacy}","received_events_url":"https://api.github.com/users/mcardosos/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T01:15:02Z","updated_at":"2016-11-02T01:15:02Z","body":"Hi @rootfs !\r\nYou can do something like this...\r\n```go\r\n\tvm, err := vmClient.Get(resourceGroupName, vmName, compute.InstanceView)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\t_, err = vmClient.PowerOff(resourceGroupName, vmName, nil)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\t_, err = vmClient.Deallocate(resourceGroupName, vmName, nil)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tvar index int\r\n\tfor i, dd := range *vm.Properties.StorageProfile.DataDisks {\r\n\t\tif *dd.Name == \"yourDataDisk\" {\r\n\t\t\tindex = i\r\n\t\t}\r\n\t}\r\n\t(*vm.Properties.StorageProfile.DataDisks)[index].DiskSizeGB = &newSize\r\n\r\n\t_, err = vmClient.CreateOrUpdate(resourceGroupName, vmName, vm, nil)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n```\r\nMore on updating VMs [here](https://msdn.microsoft.com/en-us/library/azure/mt163591.aspx)."}}
{"actor":{"display_login":"mcardosos"}}