Installing a Rocky 8.4 Virtual Box VM as a qcow2 Openstack Image

This is because you should choose during installation to make your own partitions, and then make one single / partition. This is most likely why you are experiencing so many problems by going through the installer using the defaults. Otherwise /home and /boot would already be on a single / partition.

Also it’s ideal also when making that single partition for / that you use ext4 as the filesystem. If it is forcing you to make EFI partitions, then it’s best that the VM is set for legacy boot or MBR, that way it will then allow a single / partition.

This is what my Rocky KVM virtual machine looks like because I specifically enabled EFI and a single LVM partition:

[root@rocky ~]# fdisk -l
Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FE808B7D-0C77-4ADA-823B-0DAAC57C8F13

Device       Start      End  Sectors  Size Type
/dev/vda1     2048  1050623  1048576  512M EFI System
/dev/vda2  1050624  2099199  1048576  512M Linux filesystem
/dev/vda3  2099200 83884031 81784832   39G Linux LVM

Disk /dev/mapper/vgrocky-root: 39 GiB, 41871736832 bytes, 81780736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@rocky ~]# lvs
  LV   VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root vgrocky -wi-ao---- <39.00g      

See image below on my partition configuration for a new install that I do right now. First image, you see I choose custom:

next I change from LVM to standard:

then I click the + button to add a partition and specify it’s size, note / and 20GiB:

I now make sure to choose ext4 as the filesystem:


I click done, and get a warning because of no swap, but that’s OK, so I click done again:

I now have to confirm the partition changes, and I continue my installation as normal. After my system has booted, this is how it looks for the partitions:

[root@rocky-mbr ~]# fdisk -l
Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x91ac48db

Device     Boot Start      End  Sectors Size Id Type
/dev/vda1  *     2048 41943039 41940992  20G 83 Linux

as you can see, it’s possible. You must do your own partitions, must disable LVM by changing to standard partitions, since you must prepare the image with cloud-init. And resizing partitions with OpenStack/cloud-init is done via growpart, which means LVM and all that stuff isn’t needed.

Once the image is made, prepped as per the Openstack docs, sysprep, etc, it can then be uploaded to Glance, and you can then use it for creating Openstack instances with.

1 Like