Skip to content

Instantly share code, notes, and snippets.

@atilaromero
Created November 19, 2020 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atilaromero/48140d43fd90cb786e4d3b992ddcb945 to your computer and use it in GitHub Desktop.
Save atilaromero/48140d43fd90cb786e4d3b992ddcb945 to your computer and use it in GitHub Desktop.
Hot extend libvirt qcow2 disk
https://serverfault.com/a/743106/536603
virsh qemu-monitor-command ${vm_name?} block_resize drive-${alias?} 200G --hmp
alias: something like 'virtio-disk0'. It comes from:
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" />
<source file="/data/test.img" />
<backingStore />
<target dev="vda" bus="virtio" />
<alias name="virtio-disk0" />
<address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0" />
</disk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment