Some use-cases of the openstack platform requires the preservation of the root-disks of a virtual machine even when the machine is deleted, so that new machines can use the same root disk at a later point. This workflow would allow you to delete the VM to free up resources (CPU, RAM, GPU) while still having the virtual machine disk, which will make it possible to re-create the virtual machine at a later point in time.

Boot from volume

To have disks outlive their virtual machines they need to be volumes created manually, which can be done by createing a bootable volume. When creating a volume it can be based on a image (for instance an Ubuntu image if ubuntu is what you need), and you can set sizes out of your own discretion.

Later, when creating an instanse (virtual machine) you can give the machine a volume instead of an image, resulting in the VM using that volume as its root disk. Any changes the VM does to the disk will be retained after VM is deleted.

Retain disk and IP addresses

If you want to keep both the disk and IP-adresses you should create a volume to boot from and a network port manually. When creating a VM you would then attach the volume and port to the VM instead of getting assigned new ones automaticly.

  • No labels