{"id":70,"date":"2011-08-22T12:19:16","date_gmt":"2011-08-22T10:19:16","guid":{"rendered":"http:\/\/elkano.org\/blog\/?p=70"},"modified":"2011-09-14T19:10:02","modified_gmt":"2011-09-14T17:10:02","slug":"how-to-resize-kvm-virtual-machine-disk-file","status":"publish","type":"post","link":"https:\/\/elkano.org\/blog\/how-to-resize-kvm-virtual-machine-disk-file\/","title":{"rendered":"How to resize KVM virtual machine disk file"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>In KVM when you create a new virtual machine, \u00a0you have to specify the initial size of the disk that the machine is going to use. If later, you realize that initial size is not\u00a0enough, \u00a0you can resize disk image with <strong>qemu-img<\/strong> command:<\/p>\n<p><code>$ qemu-img resize vm-101-disk-1.raw +10G<\/code><\/p>\n<p>In the example we have resized the disk image with 10Gb more. The new size can be specified in K for kilobyte, M for megabyte and G for gigabyte.<\/p>\n<p>Inside virtual machine you are going to see new unassigned free space in the disk.\u00a0If we have partitioned the guest machine with LVM we can easily extend the logical volumes \u00a0with the new space we have newly created in the disk. To do that we only have to create a new LVM partition and assign the new partition to the existing volume group.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; In KVM when you create a new virtual machine, \u00a0you have to specify the initial size of the disk that the machine is going to use. If later, you realize that initial size is not\u00a0enough, \u00a0you can resize disk image with qemu-img command: $ qemu-img resize vm-101-disk-1.raw +10G In the example we have resized [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,3,7],"tags":[147,144,16],"_links":{"self":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/70"}],"collection":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":9,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/70\/revisions\/150"}],"wp:attachment":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}