Skip to content

Instantly share code, notes, and snippets.

@ytjohn
Created November 16, 2016 20:31
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ytjohn/f1b1bec2d76184fd7fb27ccf61fd7691 to your computer and use it in GitHub Desktop.
Save ytjohn/f1b1bec2d76184fd7fb27ccf61fd7691 to your computer and use it in GitHub Desktop.
quick notes on doing a kvm image from ubuntu cloud image

http://mojodna.net/2014/05/14/kvm-libvirt-and-ubuntu-14-04.html

  1. Get a qcow2 image from here: https://cloud-images.ubuntu.com/releases/16.04/release/
  2. Convert it with qemu-img
  3. Resize it (we'll add 50GB). This will be a "thin" resize.

Example: https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img

wget https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img
qemu-img convert -O qcow2 ubuntu-16.04-server-cloudimg-amd64-disk1.img ubuntu-16.04-server-cloudimg-amd64-disk1.qcow2
qemu-img resize ubuntu-16.04-server-cloudimg-amd64-disk1.qcow2 +50G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment