Error: The name '<image name>' already exists.
book
Article ID: 414213
calendar_today
Updated On:
Products
VMware Integrated OpenStack
Issue/Introduction
Unable to deploy a VM
You see an error similar to: Failed to perform requested operation on instance "<instance id>", the instance has an error status: Please try again later [Error: Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance <instance id>.].
In nova conductor logs you see similar to the follow for the request ID of the instance creation: "nova.exception.RescheduledException: Build of instance <instance id> was re-scheduled: The name '<image name>' already exists.\n"]
Environment
7.x
Cause
The message "image already exists" during an openstack instance create command indicates a conflict, but not necessarily with the image you are trying to use for the instance. This error is more commonly associated with attempting to create a new image with an ID that is already in use, or in scenarios involving image management operations rather than directly launching an instance.
If you are receiving this message when launching an instance, it suggests a deeper issue within your OpenStack environment, potentially related to:
Corrupted Glance Image Data: The image in Glance might be corrupted or in an inconsistent state, leading to errors when Nova (the compute service) tries to access or use it.
Issues with Image Caching or Transfer: Nova might be having trouble downloading or caching the image, and the error message might be a misleading symptom of a different underlying problem.
Accidentally Deleted Image ID: If an image was deleted but its ID is still referenced by other components (e.g., in a rescue operation or during a resize), this could lead to conflicts when trying to reuse that ID.
Resolution
Verify Image Integrity: Check the status of the image in Glance using openstack image show <image_id_or_name>. Ensure it's in an "active" state. If you suspect corruption, consider re-uploading the image to Glance with a new name or ID.
Check the image (vm template) in vCenter to see if there is a problem on the vSphere side.
Examine Nova Logs: The Nova scheduler and conductor logs are crucial for understanding why an instance creation fails. Look for detailed error messages that might provide more context than the generic "image already exists" message
Check Compute and Network Services: Ensure all relevant OpenStack services, especially Nova compute services and network agents, are running and healthy. #openstack compute service list
Resource Availability: Verify that there are sufficient resources (CPU, RAM, disk) on the available compute hosts to accommodate the requested instance flavor. #openstack allocation candidate list --os-placement-api-version 1.10 --resource VCPU=1 --resource MEMORY_MB=2048 --resource DISK_GB=20
Test with a Different Image: Try launching an instance using a different, known-good image to see if the issue is specific to the image you are currently trying to use.