creating a vm, then deleting, then creating with same name fails.
See original GitHub issueDescription
I created a resource group, created a VM inside that group, but forgot to add --ssh-key-value
so i deleted the vm. I tried to create another one with the same name and that failed. I believe it was because some automagically created resource already existed.
Heres the basic recreate:
$ az group create --location=eastus2 --name=mygroup
$ az vm create --resource-group=mygroup --name=myvm --image=UbuntuLTS
# realize i messed up, so delete it.
$ az vm delete --resource-group=mygroup --name=myvm
# now try the same cmd above but with --ssh-key-value
$ az vm create --resource-group=mygroup --name=smx1 -image UbuntuLTS \
--ssh-key-value="$key"
Deployment failed. {
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "ConflictingUserInput",
"message": "Disk osdisk_b7660b2ba9 already exists in resource group MYGROUP. Only CreateOption.Attach is supported."
}
]
}
}
Environment summary
Install Method: How did you install the CLI?
Answer here:
curl -L https://aka.ms/InstallAzureCli | bash
CLI Version: What version of the CLI and modules are installed? (Use az --version
)
Answer here:
# az --version
azure-cli (2.0.9)
acr (2.0.7)
...
acs (2.0.9)
appservice (0.1.9)
batch (3.0.2)
billing (0.1.2)
cdn (0.0.5)
cloud (2.0.5)
cognitiveservices (0.1.5)
command-modules-nspkg (2.0.0)
component (2.0.6)
configure (2.0.9)
consumption (0.1.2)
core (2.0.10)
cosmosdb (0.1.9)
dla (0.0.9)
dls (0.0.9)
feedback (2.0.5)
find (0.2.5)
interactive (0.3.5)
iot (0.1.8)
keyvault (2.0.7)
lab (0.0.7)
monitor (0.0.7)
network (2.0.9)
nspkg (3.0.0)
profile (2.0.7)
rdbms (0.0.4)
redis (0.2.6)
resource (2.0.9)
role (2.0.7)
sf (1.0.4)
sql (2.0.6)
storage (2.0.9)
vm (2.0.9)
Python (Linux) 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609]
Python location '/root/lib/azure-cli/bin/python'
OS Version: What OS and version are you using?
Answer here: Ubuntu 16.04
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: bash
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
A Same Name "Cloud Service" will be created when create ...
A. It's a wrapper for the deployment of the Virtual Machine and essentially the same construct you get for Web and Worker role...
Read more >Troubleshooting Machines That Are Repeatedly Deleted and ...
A linked-clone or full-clone machine is created in an Error state, deleted, and recreated in an Error state. This cycle keeps repeating. Cause....
Read more >Cannot add Virtual Machine in Hyper-V (Error: "Object might ...
In that folder, I created two folders, "VHD" and "VM". I then went into the Hyper-V Settings and changed the default VHD storage...
Read more >4 Known Issues with the Oracle Database Appliance
If you delete a 11.2.0.4 database, and then create a new database with same name as the deleted database, database creation hangs while...
Read more >community.vmware.vmware_guest module – Manages virtual ...
This module can be used to create new virtual machines from templates ... If multiple virtual machines with same name exists, then folder...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@smoser, I couldn’t reproduce this issue. I created a vm, deleted it and was able to successfully recreate it. It is very likely this issue has already been fixed in a previous PR, seeing this issue was opened for version 2.0.9 and the latest version of the CLI is 2.0.53. Also the vm names in your scenario aren’t consistent, I am assuming that that was a typo, and you actually attempted to recreate the first VM.
I will be closing this issue. Please let me know if you have any questions or if this is still an issue for you.
@sistoimenov, what version of the CLI are you on?
I just retried and couldn’t reproduce this issue on the latest version of the cli (2.0.68 / dev branch)