{"id":3694,"date":"2019-07-19T23:44:53","date_gmt":"2019-07-19T20:44:53","guid":{"rendered":"https:\/\/kifarunix.com\/?p=3694"},"modified":"2019-07-20T08:49:59","modified_gmt":"2019-07-20T05:49:59","slug":"resize-root-partition-of-virtualbox-vm-snapshot","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/resize-root-partition-of-virtualbox-vm-snapshot\/","title":{"rendered":"Resize Root Partition of VirtualBox VM Snapshot"},"content":{"rendered":"\n<p>You are running a virtual machine on a VirtualBox with multiple snapshots and you want to resize the root partition of the specific partition without losing data? Well, this guide on how to resize root partition of VirtualBox VM snapshot using the Gparted Live CD.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Resize Root Partition of VirtualBox VM Snapshot<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Download Gparted Live CD ISO<\/h3>\n\n\n\n<p>GParted is a free partition manager that enables you to resize, copy, and move partitions without data loss. It is however a good practise have a backup just in case things go south. Navigate to the <a rel=\"noreferrer noopener\" href=\"https:\/\/gparted.org\/download.php\" target=\"_blank\">Gparted Downloads<\/a> page and download it. You can simply use wget.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/downloads.sourceforge.net\/gparted\/gparted-live-1.0.0-3-amd64.iso<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Poweroff the Virtual Machine<\/h3>\n\n\n\n<p>To resize a root partition of a Virtual Machine containing the snapshot whose root partition you want to resize, you need to power that VM off. Well, you can power off the VM from the VirtualBox interface or simply use the <strong>vboxmanage<\/strong> command as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vboxmanage controlvm VM_NAME poweroff<\/code><\/pre>\n\n\n\n<p>Replace <strong>VM_NAME<\/strong> with the name of the virtual machine in question.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Find the Name of the Snapshot<\/h3>\n\n\n\n<p>Open the Virtual Media Manager and find the name of the virtual machine snapshot whose root partition is to be resized. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/resize-snapshot-virtualbox.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1348\" height=\"327\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/resize-snapshot-virtualbox.png\" alt=\"name of the snapshot\" class=\"wp-image-3699\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/resize-snapshot-virtualbox.png 1348w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/resize-snapshot-virtualbox-768x186.png 768w\" sizes=\"(max-width: 1348px) 100vw, 1348px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Resize Root Partition of VirtualBox VM Snapshot<\/h3>\n\n\n\n<p>Once you have identified the name of the virtual machine snapshot to resize, proceed to resize the disk. Snapshots are located on the snapshots folder.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vboxmanage modifymedium disk VirtualBox\\ VMs\/debian9\/Snapshots\/{ff94f0a8-9695-4c6f-b3a9-39baba8e5566}.vdi --resize 30720<\/code><\/pre>\n\n\n\n<p>The original disk size is 12GB and we have resized it to 30GB<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Attach GParted Live CD ISO<\/h3>\n\n\n\n<p>Next, attach the GParted Live CD iso to your vm with a snapshot to be resized.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/attach-gparted-iso.png\"><img loading=\"lazy\" decoding=\"async\" width=\"688\" height=\"481\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/attach-gparted-iso.png\" alt=\"Attach Gparted Live CD iso\" class=\"wp-image-3700\" title=\"\"><\/a><\/figure>\n\n\n\n<p>Once you have attached the iso, set the boot order such that <strong>optical<\/strong> disk comes first.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/set-boot-order.png\"><img loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"420\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/set-boot-order.png\" alt=\"resize root partition wih gparted live cd on virtualbox\" class=\"wp-image-3708\" title=\"\"><\/a><\/figure>\n\n\n\n<p>start your virtual machine.<\/p>\n\n\n\n<p>When the virtual machine starts, let it boot with GParted Live default settings.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/boot-vm-with-gparted-iso.png\"><img loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"481\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/boot-vm-with-gparted-iso.png\" alt=\"Boot GParted Live CD on VirtualBox\" class=\"wp-image-3701\" title=\"\"><\/a><\/figure>\n\n\n\n<p>Select your keymap, your preferred language and continue to startx to use Gparted automatically.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/gparted-unallocated-disk.png\"><img loading=\"lazy\" decoding=\"async\" width=\"777\" height=\"522\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/gparted-unallocated-disk.png\" alt=\"Gparted on VirtualBox\" class=\"wp-image-3702\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/gparted-unallocated-disk.png 777w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/gparted-unallocated-disk-768x516.png 768w\" sizes=\"(max-width: 777px) 100vw, 777px\" \/><\/a><\/figure>\n\n\n\n<p>As you can see, the unallocated space is 18GB.<\/p>\n\n\n\n<p>To resize the root partition to unallocated space, we are going to first delete the extended and <strong>swap<\/strong> partition. Hence, right click and delete it.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/gparted-delete-swap.png\"><img loading=\"lazy\" decoding=\"async\" width=\"776\" height=\"522\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/gparted-delete-swap.png\" alt=\"Delete Extended Partition on Gparted\" class=\"wp-image-3703\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/gparted-delete-swap.png 776w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/gparted-delete-swap-768x517.png 768w\" sizes=\"(max-width: 776px) 100vw, 776px\" \/><\/a><\/figure>\n\n\n\n<p>Next, right click on the root partition, in this case, it is <strong>\/dev\/sda<\/strong> and select resize and set the new partition size.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/set-partition-size.png\"><img loading=\"lazy\" decoding=\"async\" width=\"779\" height=\"521\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/set-partition-size.png\" alt=\"resize root partition of VirtualBox VM snapshot using the Gparted Live CD\" class=\"wp-image-3704\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/set-partition-size.png 779w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/set-partition-size-768x514.png 768w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><\/a><\/figure>\n\n\n\n<p>Click resize to extend the partition size. After that, click the tick to save the changes.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/resized.png\"><img loading=\"lazy\" decoding=\"async\" width=\"775\" height=\"521\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/resized.png\" alt=\"resize root partition of VirtualBox VM snapshot\" class=\"wp-image-3705\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/resized.png 775w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/resized-768x516.png 768w\" sizes=\"(max-width: 775px) 100vw, 775px\" \/><\/a><\/figure>\n\n\n\n<p>You should now have resized your disk.<\/p>\n\n\n\n<p>Poweroff the virtual machine and detach the Gparted Live CD iso and boot your system.<\/p>\n\n\n\n<p>When the system boots, you can check the disk size by running the <strong>df -h<\/strong> command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>df -h \/dev\/sda1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Filesystem      Size  Used Avail Use% Mounted on\n\/dev\/sda1        30G  1.9G   27G   7% \/<\/code><\/pre>\n\n\n\n<p>There you go. That is it on how to resize root partition of VirtualBox VM snapshot using the Gparted Live CD.<\/p>\n\n\n\n<p>You can check our other articles by following the links below;<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-virtualbox-guest-additions-on-debian-10-buster\/\" target=\"_blank\">Install VirtualBox Guest Additions on Debian 10 Buster<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-debian-10-buster-on-virtualbox\/\" target=\"_blank\">Install Debian 10 Buster on VirtualBox<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-and-configure-endian-firewall-on-virtualbox\/\" target=\"_blank\">Install and Configure Endian Firewall on VirtualBox<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-fedora-30-workstation-on-virtualbox\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install Fedora 30 Workstation on VirtualBox<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You are running a virtual machine on a VirtualBox with multiple snapshots and you want to resize the root partition of the specific partition without<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,46,36],"tags":[1040,1041,24,1042],"class_list":["post-3694","post","type-post","status-publish","format-standard","hentry","category-howtos","category-virtualbox","category-virtualization","tag-resize-root-partition","tag-snapshot","tag-virtualbox","tag-vm","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3694"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=3694"}],"version-history":[{"count":5,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3694\/revisions"}],"predecessor-version":[{"id":3709,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3694\/revisions\/3709"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=3694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=3694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=3694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}