{"id":633,"date":"2014-11-24T18:49:25","date_gmt":"2014-11-24T17:49:25","guid":{"rendered":""},"modified":"2018-10-31T22:26:46","modified_gmt":"2018-10-31T21:26:46","slug":"resizing-virtualbox-vboxmanage-error","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/resizing-virtualbox-vboxmanage-error\/","title":{"rendered":"Resizing a VirtualBox Linux VDI Disk under Windows Host &#8211; VBoxManage error &#8211; Resize hard disk operation for this format is not implemented yet!"},"content":{"rendered":"<p>\n\tUsing my VirtualBox linux machines (KaliLinux in my case) together with applying a couple of updates brought a problem, where the VB machine starts run out of disk space and I&#39;m not able to update neither extend the system. This could be an often problem once we are trying to save some host system hard disk space using a small initial size of virtual machine disk partitions (12GB here).<\/p>\n<p>\n\tThe disk file cmd (df) reports:<\/p>\n<pre>\r\nroot@kali:~# df -h\r\nFilesystem                                              Size  Used Avail Use% Mounted on\r\nrootfs                                                   12G  11G    0G  <span style=\"background-color:#ffff00;\">100<\/span>% \/\r\n...<\/pre>\n<div>\n\t&nbsp;<\/div>\n<p>\n\tIn this case there are several solutions available. We should either add a new virtual vdi drive, mount it inside of linux and move some folders&nbsp;on it. Or as the second option, we should extend the size of the main virtual disk.<\/p>\n<p>\n\tThe first case is from my point of view more suitable for situations where for example our personal \/home folders become too big.&nbsp;However searching through my distro I see that the biggest folders are system folders<\/p>\n<pre>\r\n<strong><span style=\"font-size: 11px;\">du -sh \/*<\/span><\/strong>\r\n...\r\n0<span class=\"Apple-tab-span\" style=\"white-space:pre\"> <\/span>\/sys\r\n36K<span class=\"Apple-tab-span\" style=\"white-space:pre\"> <\/span>\/tmp\r\n<span style=\"background-color:#ffff00;\">9.0G<span class=\"Apple-tab-span\" style=\"white-space:pre\"><span style=\"background-color:#ffff00;\"> <\/span><\/span>\/usr<\/span>\r\n356M<span class=\"Apple-tab-span\" style=\"white-space:pre\"> <\/span>\/var\r\n0<span class=\"Apple-tab-span\" style=\"white-space:pre\"> <\/span>\/vmlinuz<\/pre>\n<div>\n<pre>\r\nroot@kali:~# du -sh \/usr\/* | grep G\r\n2.0G<span class=\"Apple-tab-span\" style=\"white-space:pre\"> <\/span>\/usr\/lib\r\n6.6G<span class=\"Apple-tab-span\" style=\"white-space:pre\"> <\/span>\/usr\/share<\/pre>\n<p>\n\t\tThis seems bigger linux system administration challenge and therefore the second option looks like less time consuming.<\/p>\n<p>\n\t\tSearching the web we may find several nice tutorials, as for example&nbsp;<a href=\"http:\/\/derekmolloy.ie\/resize-a-virtualbox-disk\/\">Resize a VirtualBox guest Linux VDI Disk under Windows Host<\/a>&nbsp;and&nbsp;R<a href=\"http:\/\/asanga-pradeep.blogspot.sk\/2012\/01\/resizing-virtualbox-and-linux.html\">esizing VirtualBox and Linux Partitions with GParted<\/a>. Both are using the&nbsp;<strong>VBoxManage <\/strong>tool together with the <strong>modifyhd <\/strong>and &#8212;<strong>resize<\/strong> switch defining the new size of the disk partition. Then we have to use some disk manager (the fdisk command line tool or the GParted GUI tool) to manage a new unallocated disk space.<\/p>\n<p>\n\t\tHowever, following decribed steps I&#39;ve got following error:<\/p>\n<pre>\r\nc:\\Program Files\\Oracle\\VirtualBox&gt;VBoxManage.exe modifyhd D:\\VirtualBox\\KaliLinux\\KaliLinux.vdi --resize 20480\r\n0%...\r\nProgress state: VBOX_E_NOT_SUPPORTED\r\n<span style=\"background-color:#ffff00;\">VBoxManage.exe: error: Resize hard disk operation for this format is not implemented yet!<\/span><\/pre>\n<div>\n\t\t&nbsp;<\/div>\n<p>\n\t\tThe error, I think, is generated because my initial vdi file (KaliLinux.vdi) was created as a fixed size storage and not as a dynamically allocated.&nbsp;<\/p>\n<p>\n\t\tOne of working solutions is following:&nbsp;<\/p>\n<p>\n\t\t1) Create a new linux machine with a new and bigger vdi storage (20GB in my case)<\/p>\n<p>\n\t\t2) Use vboxmanage to clone the old vdi image to a new, just created, one<\/p>\n<pre>\r\nVBoxManage.exe <span style=\"background-color:#ffff00;\">clonehd <\/span>OLD.vdi<span style=\"font-size: 11px;\">i NEW_BIG.vdi <span style=\"background-color:#ffff00;\">--existing<\/span><\/span><\/pre>\n<p>\n\t\tin my case&nbsp;<\/p>\n<pre>\r\nc:\\Program Files\\Oracle\\VirtualBox&gt;<strong><span style=\"background-color:#ffff00;\">VBoxManage.exe clonehd<\/span><\/strong> D:\\VirtualBox\\KaliLinux\\KaliLinux.vdi D:\\VirtualBox\\KaliLinux\\KaliLinux2.vdi <span style=\"background-color:#ffff00;\">--existing<\/span>\r\n0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%\r\n\r\nClone hard disk created in format &#39;VDI&#39;. UUID: 4983cdb9-1fd6-42a1-a8a3-15fb2bd9c11b<\/pre>\n<p>\n\t\t3) Booting a new machine with cloned disk is working, but shows that the system is still using the same size<\/p>\n<pre>\r\nroot@kali:~# df -h\r\nFilesystem                                              Size  Used Avail Use% Mounted on\r\nrootfs                                                   12G  11G    0G  100% \/\r\n...<\/pre>\n<p>\n\t\tso we have to manage already created but still unallocated disk space. To do that we should use fdisk or as a windows user, some GUI based tool. As a right option seems to be <a href=\"http:\/\/sourceforge.net\/projects\/gparted\/?source=typ_redirect\">GParted&nbsp;&#8211;&nbsp;A partition editor to graphically manage disk partitions<\/a>.<\/p>\n<p>\n\t\tChoosing GParted &#8211; we have to just follows steps described wthin already mentioned &quot;<a href=\"http:\/\/derekmolloy.ie\/resize-a-virtualbox-disk\/\">Resize a VirtualBox guest Linux VDI Disk under Windows<\/a><span style=\"font-size: 11px;\">&quot; tutorial (download GParted ISO, insert CD, boot, press return three times, delete swap and its logical drive, extend old logical drive to a new size, create a new swap&#8230;)<\/span><\/p>\n<p>\n\t\t4) We will finnish applying changes, removing&nbsp;<span style=\"font-size: 11.1999998092651px;\">ISO image from VBox&nbsp;<\/span><span style=\"font-size: 11px;\">CD and rebooting the virtual guest machine. The disk is resized!<\/span><\/p>\n<\/div>\n<p>\n\t&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>\n\tUsing my VirtualBox linux machines (KaliLinux in my case) together with applying a couple of updates brought a problem, where the VB machine starts run out of disk space and I&#39;m not able to update neither extend the system. This could be an often problem once we are trying to save some host system hard disk space using a small initial size of virtual machine disk partitions (12GB here).<\/p>\n<p>\n\tThe disk file cmd (df) reports:<\/p>","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[825],"tags":[],"class_list":["post-633","post","type-post","status-publish","format-standard","hentry","category-virtualization-virtualbox-en"],"taxonomy_info":{"category":[{"value":825,"label":"VirtualBox"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":0,"category_info":[{"term_id":825,"name":"VirtualBox","slug":"virtualization-virtualbox-en","term_group":0,"term_taxonomy_id":823,"taxonomy":"category","description":"","parent":819,"count":12,"filter":"raw","cat_ID":825,"category_count":12,"category_description":"","cat_name":"VirtualBox","category_nicename":"virtualization-virtualbox-en","category_parent":819}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=633"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/633\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}