Tentative de suppression de la stratégie d'emplacement compact d'une réservation
L'erreur suivante se produit lorsque vous essayez de supprimer la stratégie d'emplacement compact d'une réservation avant de supprimer la réservation.
Message d'erreur :
The resource_policy resource 'projects/PROJECT_ID/regions/REGION/resourcePolicies/COMPACT_PLACEMENT_POLICY_NAME' is already being used by 'projects/PROJECT_ID/zones/ZONE/reservations/RESERVATION_NAME'
Solution: Pour supprimer une stratégie d'emplacement compact définie dans une réservation, sélectionnez l'une des méthodes suivantes:
Si vous avez créé la réservation en spécifiant un modèle d'instance, procédez comme suit:
Essayer de réduire la réservation d'une réservation spécifique à un nombre de VM inférieur au nombre cible
L'erreur suivante se produit lorsque vous essayez de réduire le nombre de VM réservées dans une réservation spécifique à un nombre inférieur au nombre de VM qui consomment la réservation.
Message d'erreur :
The resize instance count cannot be lower than the in use count for a specific reservation.
Solution: Pour vous assurer que le nombre de VM de la réservation spécifique est égal ou inférieur au nombre de VM qui consomment la réservation, effectuez l'une des opérations suivantes avec les VM en trop:
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/03 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/03 (UTC)."],[[["\u003cp\u003eThis page provides guidance on resolving issues encountered when modifying Compute Engine reservations, specifically focusing on compact placement policy deletion and downsizing specific reservations.\u003c/p\u003e\n"],["\u003cp\u003eTo delete a compact placement policy associated with a reservation, you must first delete the reservation itself, followed by the policy, and if applicable, also delete the instance template in which the policy may have been specified.\u003c/p\u003e\n"],["\u003cp\u003eWhen attempting to downsize a specific reservation, an error occurs if the new number of reserved VMs is less than the number of VMs currently consuming the reservation.\u003c/p\u003e\n"],["\u003cp\u003eTo successfully downsize a specific reservation, you must first delete, stop, or suspend the excess VMs consuming the reservation to ensure the number of reserved VMs is not less than the number of consuming VMs.\u003c/p\u003e\n"]]],[],null,["*** ** * ** ***\n\nThis page shows you how to resolve issues with modifying reservations. To learn more about reservations, see [Reservations of Compute Engine zonal resources](/compute/docs/instances/reservations-overview).\n\nAttempt to delete a reservation's compact placement policy\n\nThe following error occurs when you try to delete a reservation's\n[compact placement policy](/compute/docs/instances/use-compact-placement-policies)\nbefore deleting the reservation.\n\n**Error message**: \n\n The resource_policy resource 'projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/regions/\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e/resourcePolicies/\u003cvar translate=\"no\"\u003eCOMPACT_PLACEMENT_POLICY_NAME\u003c/var\u003e' is already being used by 'projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/zones/\u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e/reservations/\u003cvar translate=\"no\"\u003eRESERVATION_NAME\u003c/var\u003e'\n\n**Resolution**: To delete a compact placement policy specified in a reservation,\nselect one of the following methods:\n\n- If you created the reservation by specifying an instance template, follow\n these steps:\n\n 1. [View the details of the reservation](/compute/docs/instances/reservations-view#describe-reservations)\n and make note of the reservation's instance template.\n\n 2. [Delete the reservation](/compute/docs/instances/reservations-delete#deleting_a_reservation).\n\n 3. [Delete the instance template](/compute/docs/instance-templates/get-list-delete-instance-templates#delete_an_instance_template).\n\n | **Note:** You can't [update instance templates](/compute/docs/instance-templates#how_to_update_instance_templates). If you delete a compact placement policy specified in an instance template, attempting to use the template to create reservations or virtual machine (VM) instances causes errors.\n 4. [Delete the compact placement policy](/compute/docs/instances/manage-placement-policies#delete-policy).\n\n- If you created the reservation by specifying properties directly, follow\n these steps:\n\n 1. [Delete the reservation](/compute/docs/instances/reservations-delete#deleting_a_reservation).\n\n 2. [Delete the compact placement policy](/compute/docs/instances/manage-placement-policies#delete-policy).\n\nAttempt to downsize a specific reservation to less VMs than the targeted number\n\nThe following error occurs when you try to decrease the number of reserved VMs\nin a\n[specific reservation](/compute/docs/instances/reservations-overview#consumption-type)\nto a number that is lower than the number of VMs that consume the reservation.\n\n**Error message**: \n\n The resize instance count cannot be lower than the in use count for a specific reservation.\n\n**Resolution**: To ensure that the number of VMs in the specific reservation is\nequal to or lower than the number of VMs that consume the reservation, do one of\nthe following with the VMs in excess:\n\n- [Delete VMs](/compute/docs/instances/deleting-instance)\n\n- [Stop](/compute/docs/instances/stop-start-instance#stop-vm) or\n [suspend the VMs](/compute/docs/instances/suspend-resume-instance)\n\n | **Caution:** If you stop or suspend instances in excess instead of deleting them, then those instances no longer count against the reservation, and you can proceed to modify the reservation. However, after you modify the reservation, you can't restart or resume the instances unless you increase the number of instances in the reservation or delete other instances that are consuming it."]]