r/openstack • • Nov 08 '24

Boot instance from qcow2

Hello community, I'm totally an openstack newbie and I'm just learning it.

Currently I have several instances running from RHEL7 qcow2 image. Then, I created a qcow2 image contains clonezilla (it's just a test).

Now, is there a way to boot the instance from clonezilla qcow2 instead of RHEL7 one but keep in some way the RHEL7 image?

The test goal is make a clone of the RHEL7 image using clonezilla.

Thank you.

1 Upvotes

14 comments sorted by

View all comments

Show parent comment

1

u/LucasRey Nov 09 '24

Yes, I had already uploaded the clonezilla qcow image:

+--------------------------------------+-----------------------+--------+
| ID                                   | Name                  | Status |
+--------------------------------------+-----------------------+--------+
| f3ee87aa-cae6-41de-96f9-65ae2aa2bb76 | clonezilla            | active |

And here is the instance config:

| addresses        | tb-oam-v=192.168.10.102                                     
| config_drive     | True                                                        
| created          | 2024-10-28T04:51:46Z                                        
| flavor           | CM-vSM_flavor (f127d165-a62f-4532-909e-ce05bf957a24)  
| hostId           | ff7f88293658e75b7cb74f4a6f8c89524affd6af4d47904e8be0a6df    
| id               | 96e3c765-514c-4d3c-a2a5-69ecb2f1be3e                        
| image            | N_NODE_R7.2-00 (42176520-c7ee-4667-be20-62a94de8aef4)
| key_name         | tb-keypair-ma                                          
| name             | node-000                                                
| project_id       | 17f26efd2efa48a998b2b2a3b481c704                            
| properties       |                                                             
| status           | ACTIVE                                                 
| updated          | 2024-06-05T05:14:33Z                                        
| user_id          | 7646dfcf54e742ce89f8558396e4ad3c                            
| volumes_attached | id='75540aba-76b9-4cc3-84cf-70e8c2db8808'  

Now, I can attach such image to the instance, but then, how can I boot the instance from it?

1

u/ForeverNo2506 Nov 09 '24

Ah, as I see you created the server already with image, not through adding image to the volume. Can you show the command you did make server?

1

u/LucasRey Nov 09 '24

I created it using the classic horizon dashboard

1

u/rahmu Nov 10 '24

The most straightforward way is to destroy the instance node-000 and recreate it (openstack server create...) using the clonezilla image instead of the rhel7.

This is assuming you're okay with destroying node-000. If this is not okay, you'll need to explain why and we can suggest some workarounds.