{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/630","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/630/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/630/comments","events_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/630/events","html_url":"https://github.com/Azure/azure-sdk-for-go/issues/630","id":229997872,"number":630,"title":"VirtualMachinesClient.CreateOrUpdate Failed with Could not find member 'resources' on object of type 'ResourceDefinition'","user":{"login":"z4ce","id":4860914,"avatar_url":"https://avatars2.githubusercontent.com/u/4860914?v=3","gravatar_id":"","url":"https://api.github.com/users/z4ce","html_url":"https://github.com/z4ce","followers_url":"https://api.github.com/users/z4ce/followers","following_url":"https://api.github.com/users/z4ce/following{/other_user}","gists_url":"https://api.github.com/users/z4ce/gists{/gist_id}","starred_url":"https://api.github.com/users/z4ce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z4ce/subscriptions","organizations_url":"https://api.github.com/users/z4ce/orgs","repos_url":"https://api.github.com/users/z4ce/repos","events_url":"https://api.github.com/users/z4ce/events{/privacy}","received_events_url":"https://api.github.com/users/z4ce/received_events","type":"User","site_admin":false},"labels":[{"id":121159145,"url":"https://api.github.com/repos/Azure/azure-sdk-for-go/labels/bug","name":"bug","color":"fc2929","default":true},{"id":479178858,"url":"https://api.github.com/repos/Azure/azure-sdk-for-go/labels/P1","name":"P1","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"mcardosos","id":18688426,"avatar_url":"https://avatars3.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},"assignees":[{"login":"mcardosos","id":18688426,"avatar_url":"https://avatars3.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}],"milestone":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-go/milestones/9","html_url":"https://github.com/Azure/azure-sdk-for-go/milestone/9","labels_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/milestones/9/labels","id":2531944,"number":9,"title":"v11.0.0","description":"The standard end-of-month release for the month of May.","creator":{"login":"marstr","id":11203166,"avatar_url":"https://avatars3.githubusercontent.com/u/11203166?v=3","gravatar_id":"","url":"https://api.github.com/users/marstr","html_url":"https://github.com/marstr","followers_url":"https://api.github.com/users/marstr/followers","following_url":"https://api.github.com/users/marstr/following{/other_user}","gists_url":"https://api.github.com/users/marstr/gists{/gist_id}","starred_url":"https://api.github.com/users/marstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marstr/subscriptions","organizations_url":"https://api.github.com/users/marstr/orgs","repos_url":"https://api.github.com/users/marstr/repos","events_url":"https://api.github.com/users/marstr/events{/privacy}","received_events_url":"https://api.github.com/users/marstr/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2017-05-19T16:31:23Z","updated_at":"2017-05-19T19:36:37Z","due_on":"2017-05-31T07:00:00Z","closed_at":null},"comments":3,"created_at":"2017-05-19T14:47:38Z","updated_at":"2017-06-12T23:08:19Z","closed_at":null,"body":"We are seeing the error  `The request content was invalid and could not be deserialized: 'Could not find member 'resources' on object of type 'ResourceDefinition'` when attempting to create a VM in the same likeness of another VM. See Azure case #117050515698595. \r\n\r\nbasically the code looks like:\r\n```\r\nnewInstance, err := s.VirtualMachinesClient.Get(s.resourceGroupName, sourceInstanceName, compute.InstanceView)\r\n_, err = s.VirtualMachinesClient.CreateOrUpdate(s.resourceGroupName, *newInstance.Name, *newInstance, nil)\r\n```\r\n\r\nFor more detail you can view the actual call in the tool at:\r\nhttps://github.com/pivotal-cf/cliaas/blob/master/iaas/azure/client.go#L150\r\n\r\nWhat we expect:\r\n```\r\nGiven: `Azure/azure-sdk-for-go`   version: `088007b3b08cc02b27f2eadfdcd870958460ce7e` \r\n    and uses APIVersion: `2016-04-30-preview`\r\n    and targeting `East US` location\r\nWhen: making a call to `VirtualMachinesClient.CreateOrUpdate`\r\n    (https://godoc.org//github.com/Azure/azure-sdk-for-go/arm/compute#VirtualMachinesClient.CreateOrUpdate)\r\nThen: The call to the API completes successfully\r\n```\r\n\r\nWhat happens:\r\n```\r\nGiven: `Azure/azure-sdk-for-go`   version: `088007b3b08cc02b27f2eadfdcd870958460ce7e` \r\n    and uses APIVersion: `2016-04-30-preview`\r\n    and targeting `Canada East` location\r\nWhen: making a call to `VirtualMachinesClient.CreateOrUpdate`\r\n    (https://godoc.org//github.com/Azure/azure-sdk-for-go/arm/compute#VirtualMachinesClient.CreateOrUpdate)\r\nThen: The call to the API completes unsuccessfully with the following error\r\n`error: compute.VirtualMachinesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code=\"InvalidRequestContent\" Message=\"The request content was invalid and could not be deserialized: 'Could not find member 'resources' on object of type 'ResourceDefinition'. Path 'resources', line 1, position 3603.'.\"````"},"comment":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/comments/307960168","html_url":"https://github.com/Azure/azure-sdk-for-go/issues/630#issuecomment-307960168","issue_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/630","id":307960168,"user":{"login":"mcardosos","id":18688426,"avatar_url":"https://avatars3.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":"2017-06-12T23:08:19Z","updated_at":"2017-06-12T23:08:19Z","body":"Hello @z4ce !\r\nI have not been able to repro the very same error message. Quick question, the VM you are trying to copy, does it have extensions installed? I suspect this issue has to do with extensions, but I am still not that sure."}}
{"actor":{"display_login":"mcardosos"}}