Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cloud-init does not grow the partition nor the filesystem

I am currenty preparing OpenStack-ready images of CentOS 7 and Ubuntu 14.04.

For the "automation" I use packer, which is provided by you with a json-template. Packer then starts the installation using the virtualization you specify (in my case qemu).

After the installation, the virtual machine is being provisioned via SSH by packer and the scripts you supply.

The status:

  • The root disk has 3 GB.
  • One partition, ext4, boot-flag, 100% of the root disk.

What I am trying to achieve here:

  • The image should resize itself on the first start to the max size of the disk

The Problem:

It does not work. It does not matter if I install only cloud-init or cloud-init and cloud-utils or cloud-init and cloud-utils and cloud-utils-growpart. I do not change the default cloud-init config, apart from enabling the root-login via ssh.

My cloud-init config is standard, apart from this line

disable_root: 0

My question is:

  • has someone already done this? I can't seem to find a working example

If you need any additional information, just ask :)