{"action":"closed","issue":{"url":"https://api.github.com/repos/Azure/azure-cli/issues/4789","repository_url":"https://api.github.com/repos/Azure/azure-cli","labels_url":"https://api.github.com/repos/Azure/azure-cli/issues/4789/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-cli/issues/4789/comments","events_url":"https://api.github.com/repos/Azure/azure-cli/issues/4789/events","html_url":"https://github.com/Azure/azure-cli/issues/4789","id":269942632,"number":4789,"title":"Can't mention vnet resource group while creating a VM in a different resource group","user":{"login":"rathinikunj","id":28726241,"avatar_url":"https://avatars1.githubusercontent.com/u/28726241?v=4","gravatar_id":"","url":"https://api.github.com/users/rathinikunj","html_url":"https://github.com/rathinikunj","followers_url":"https://api.github.com/users/rathinikunj/followers","following_url":"https://api.github.com/users/rathinikunj/following{/other_user}","gists_url":"https://api.github.com/users/rathinikunj/gists{/gist_id}","starred_url":"https://api.github.com/users/rathinikunj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rathinikunj/subscriptions","organizations_url":"https://api.github.com/users/rathinikunj/orgs","repos_url":"https://api.github.com/users/rathinikunj/repos","events_url":"https://api.github.com/users/rathinikunj/events{/privacy}","received_events_url":"https://api.github.com/users/rathinikunj/received_events","type":"User","site_admin":false},"labels":[{"id":593424290,"url":"https://api.github.com/repos/Azure/azure-cli/labels/Question","name":"Question","color":"cc317c","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-31T12:37:15Z","updated_at":"2017-10-31T15:22:34Z","closed_at":"2017-10-31T15:22:34Z","author_association":"NONE","body":"\r\n---\r\n### Issue\r\n\r\n1. vnet1 is present in resource-group A.\r\n2. I create a VM in resource group B, and specified the vnet as vnet1.\r\n3. Since vnet1 is not present in resource-group B, the CLI ends up creating vnet1 in resource-group B.\r\n4. Both the resource-groups are in same subscription.\r\n5. There is no way i can specify the resource-group for vnet in Azure CLI, while Azure portal populates the vnets across resource-groups and allows us to use them.\r\n\r\n**CLI Used:**\r\n```\r\naz vm create --name oshiftMaster1 --resource-group nikunj2-resource-group --image RedHat:RHEL:7.3:latest -l westus --size Standard_DS4_v2 --nsg \"\" --public-ip-address \"\" --subnet hybrid-subnet-194 --vnet-name  avi-vnet-jenkins --admin-username admin1 --admin-password password1 --availability-set master-availability-set\r\n``` \r\n### Environment summary\r\n\r\n**Install Method** : `apt-get`\r\n\r\n**CLI version** : \r\n```azure-cli (2.0.20)\r\n\r\nacr (2.0.14)\r\nacs (2.0.18)\r\nappservice (0.1.19)\r\nbackup (1.0.2)\r\nbatch (3.1.6)\r\nbatchai (0.1.2)\r\nbilling (0.1.6)\r\ncdn (0.0.10)\r\ncloud (2.0.9)\r\ncognitiveservices (0.1.9)\r\ncommand-modules-nspkg (2.0.1)\r\ncomponent (2.0.8)\r\nconfigure (2.0.12)\r\nconsumption (0.1.6)\r\ncontainer (0.1.12)\r\ncore (2.0.20)\r\ncosmosdb (0.1.14)\r\ndla (0.0.13)\r\ndls (0.0.16)\r\neventgrid (0.1.5)\r\nextension (0.0.5)\r\nfeedback (2.0.6)\r\nfind (0.2.7)\r\ninteractive (0.3.11)\r\niot (0.1.13)\r\nkeyvault (2.0.13)\r\nlab (0.0.12)\r\nmonitor (0.0.11)\r\nnetwork (2.0.17)\r\nnspkg (3.0.1)\r\nprofile (2.0.15)\r\nrdbms (0.0.8)\r\nredis (0.2.10)\r\nresource (2.0.17)\r\nrole (2.0.14)\r\nservicefabric (0.0.5)\r\nsql (2.0.14)\r\nstorage (2.0.18)\r\nvm (2.0.17)\r\n\r\nPython location '/opt/az/bin/python3'\r\nExtensions directory '/home/aviuser/.azure/cliextensions'\r\n\r\nPython (Linux) 3.6.1 (default, Oct 18 2017, 20:41:18)\r\n[GCC 4.8.4]\r\n\r\nLegal docs and information: aka.ms/AzureCliLegal\r\n```\r\n\r\n**OS version** : `Ubuntu 14.04`\r\n**Shell Type** : `bash`   "}}
{"actor":{"display_login":"tjprescott"}}