Skip to content

Instantly share code, notes, and snippets.

@soekarmana
Forked from ytjohn/notes.md
Created July 15, 2018 02:06
Show Gist options
  • Save soekarmana/95545295b4abdf3fad9f0813454e7001 to your computer and use it in GitHub Desktop.
Save soekarmana/95545295b4abdf3fad9f0813454e7001 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