From 80ccf68f55dbb70d7e5ed52ee95b3c9d1b6ce264 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Thu, 20 Mar 2025 11:07:49 +0100 Subject: vault backup: 2025-03-20 11:07:48 --- 2 Areas/Werk/VPS platform/VM cannot be rescued.md | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 2 Areas/Werk/VPS platform/VM cannot be rescued.md (limited to '2 Areas/Werk/VPS platform/VM cannot be rescued.md') diff --git a/2 Areas/Werk/VPS platform/VM cannot be rescued.md b/2 Areas/Werk/VPS platform/VM cannot be rescued.md new file mode 100644 index 0000000..934da0f --- /dev/null +++ b/2 Areas/Werk/VPS platform/VM cannot be rescued.md @@ -0,0 +1,77 @@ +--- +tags: + - rescue + - groupvps +--- +## Error cause +`{'code': 400, 'created': '2025-02-10T10:38:39Z', 'message': 'Instance 44240d84-52ca-4474-b4ac-163bd1ba2def cannot be rescued: Driver Error: Image 9115b741-6eb3-4574-894d-9f2e28600ff8 could not be found.'}` + +Likely a deleted snapshot! +## Show BDM in DB +``` +MariaDB [nova]> select image_id from block_device_mapping where instance_uuid = "44240d84-52ca-4474-b4ac-163bd1ba2def"; ++--------------------------------------+ +| image_id | ++--------------------------------------+ +| 9115b741-6eb3-4574-894d-9f2e28600ff8 | ++--------------------------------------+ +1 row in set (0.000 sec) +``` + +## Find base image +``` +MariaDB [glance]> select * from image_properties where image_id = "9115b741-6eb3-4574-894d-9f2e28600ff8" and name = "base_image_ref" \G +*************************** 1. row *************************** + id: 24353 + image_id: 9115b741-6eb3-4574-894d-9f2e28600ff8 + name: base_image_ref + value: a689d899-903d-49be-96ab-6ac638bbc5fd +created_at: 2024-07-20 11:09:34 +updated_at: 2024-08-04 14:45:12 +deleted_at: 2024-08-04 14:45:12 + deleted: 1 +1 row in set (0.000 sec) +``` +... repeat until its base image is not snapshot. + +## Update references +``` +MariaDB [nova]> select image_ref from instances where uuid = "44240d84-52ca-4474-b4ac-163bd1ba2def"; ++--------------------------------------+ +| image_ref | ++--------------------------------------+ +| a689d899-903d-49be-96ab-6ac638bbc5fd | ++--------------------------------------+ +1 row in set (0.000 sec) + +MariaDB [nova]> select image_id from block_device_mapping where instance_uuid = "44240d84-52ca-4474-b4ac-163bd1ba2def"; ++--------------------------------------+ +| image_id | ++--------------------------------------+ +| a689d899-903d-49be-96ab-6ac638bbc5fd | ++--------------------------------------+ +1 row in set (0.000 sec) + +update instance_system_metadata set value = "a689d899-903d-49be-96ab-6ac638bbc5fd" where instance_uuid = "44240d84-52ca-4474-b4ac-163bd1ba2def" and `key` = "image_base_image_ref"; +``` + +## Notes on specific case +44240d84-52ca-4474-b4ac-163bd1ba2def instance_system_metadata geupdate maar alleen het image_base_image_ref geupdatet. +De rest van de image metadata is nog alsof het het oude snapshot. +Misschien kunnen we nova-manage gebruiken om het te updaten: +``` +[jasras@n07.compute.prv.vps1-testpod-cph3.one.com ~]$ sudo nova-manage image_property set --help +Modules with known eventlet monkey patching issues were imported prior to eventlet monkey patching: urllib3. This warning can usually be ignored if the caller is only importing and not executing nova code. +usage: nova-manage image_property set [-h] [--property ] + +Set the values of instance image properties stored in the database. This is only allowed for instances with a STOPPED, SHELVED or SHELVED_OFFLOADED vm_state. + +positional arguments: + UUID of the instance + +options: + -h, --help show this help message and exit + --property + Image property to set using the format name=value. For example: --property hw_disk_bus=virtio --property hw_cdrom_bus=sata + +``` \ No newline at end of file -- cgit v1.2.3