My (tiny) Cobbler VM is almost full but I need to try out deployment of SLES/OpenSUSE.
I’m going to attach a few extra chunks of storage to make room for ‘cobbler distro add’.

You can do this with the GUI, but unless you’re allergic to CLIs I highly recommend the ‘VBoxManage’ section of the VirtualBox manual (or ‘VboxManage -h’).
These commands can create dozens of devices for testing RAID configs, and the VDI images can be detached, cloned, snapshotted, attached to other VMs, etc.(really useful if you split server builds along ‘/’ and ‘/data’ lines ).

create 2 more devices

VBoxManage createhd --filename sm-pv2.vdi -size 2048 -register
VBoxManage createhd --filename sm-pv3.vdi -size 2048 -register

fit the devices

If you are a pillock like me, you set ‘-sataportcount 1′ on your VMs
(to speed up their boots). So you’ll need to change that:
VBoxManage controlvm shoemaker  acpipowerbutton # turn off the box
VBoxManage modifyvm shoemaker -sataportcount 3 # enable the extra port
# attach the disk
VBoxManage modifyvm shoemaker -sataport2 sm-pv2.vdi -sataport3 sm-pv3.vdi
VBoxManage startvm shoemaker

log onto the vm and do the LVM thing

parted -l # get the device names
pvcreate /dev/sdb /dev/sdc
vgextend VolGroup00 /dev/sdb /dev/sdc
# give the LV all the new space
lvextend  -l +100%FREE /dev/VolGroup00/LogVol00
# grow the filesystem on top
resize2fs /dev/VolGroup00/LogVol00
df -h # w00t.

Like ‘normal’ VirtualBox VDI disks, these are lazily allocated (by default), so there’s no harm in overprovisioning them. If I’d known that when I built the shoemaker VM, there’d be no need for this blog post :)