1. xl list
  2. xl shutdown <name>
  3. cat /etc/xen/<name>.cfg
  4. Make a note of 'file:/var/lib/xen/domains/<name>/disk.img,xvda1,w',
  5. cd <path>
  6. cp disk.img backup.img
  7. dd if=/dev/zero bs=2G count=2 >> disk.img - that adds 4g (2 lots of 2gb) - increase the count (maybe drop the bs) if you get an error like dd: memory exhausted by input buffer of size - e.g. dd if=/dev/zero of=/swapfile bs=1M count=2048 - 2048 lots of 1mb
  8. Check the disk e2fsck -f disk.img
  9. Resize the disk

View this post on Github

You might also enjoy…

Mike Street

Written by Mike Street

Mike is a CTO and Lead Developer from Brighton, UK. He spends his time writing, cycling and coding. You can find Mike on Mastodon.