{{Title|title= Virtual Hard Disk Size Increase }} {{Header}} {{#seo: |description=Get more disk space. Increase the size of a virtual disk. Expand virtual machine storage capacity. Possible with Qubes, {{q_project_name_long}}, {{project_name_long}} KVM and {{project_name_long}} VirtualBox. |image=Blocks-968874640.jpg }} [[image:Blocks-968874640.jpg|thumb]]
* [[Grow_Virtual_Harddisk|Virtual Hard Disk Size Increase]] * [[Shrink_Virtual_Harddisk|Shrink Virtual Hard Disk Size]]
{{intro| Get more disk space. Increase the size of a virtual disk. Expand virtual machine storage capacity. Possible with Qubes, {{q_project_name_short}}, {{project_name_short}} KVM and {{project_name_short}} VirtualBox. }} = {{q_project_name_short}} = Refer to the [https://www.qubes-os.org/doc/resize-disk-image/ Resizing Disk Image] Qubes OS user documentation. = {{non_q_project_name_short}} = {{Tab |type=controller |content= {{Tab |title= = KVM = |image=[[File:Kvm-new-logo.png|25px]] |addToClass=info-box |active=true |content= '''1.''' Back-up important data. Either move important files via [[KVM#Shared_Folders|shared folders]] or make a full clone of VMs in each snapshot state in case something goes wrong. '''2.''' On the host: Delete all existing snapshots. '''3.''' On the host: Increase the disk size. 1G below should be replaced with the amount of memory to be added in gigabytes. {{CodeSelect|code= qemu-img resize vmdisk.img +1G }} '''4.''' Boot up and check if it is still working. '''5.''' Install GParted in {{project_name_workstation_long}} and resize the filesystem to claim the newly added space. {{CodeSelect|code= sudo apt install gparted }} }} {{Tab |title= = VirtualBox = |image=[[File:Virtualbox_logo.png|25px]] |addToClass=info-box |content= If more disk space is required for virtual hard disks, the good news is this is simple in [[VirtualBox]] -- {{project_name_short}} is nothing special because it is just another VM image. Any suggestions that are found for VirtualBox will similarly work for {{project_name_short}}. [[Self_Support_First_Policy|Self Support First Policy]] applies. '''1.''' On the host: Make a clone of all states of any existing virtual machine in case something goes wrong. '''2.''' On the host: Delete all existing VM snapshots. '''3.''' On the host: Grow the disk. Using the VirtualBox graphical user interface (GUI) (new method): VirtualBoxFileToolsVirtual Media Managerselect virtual hddadjust the size slider Using the command line (old method): Find the folder of the virtual hdd. Run the following command. Notes: * Adjust the filename of the virtual hdd. * Adjust 100000 to for example 200000. {{CodeSelect|code= VBoxManage modifyhd "{{project_name_workstation_short}}-disk1.vdi" --resize 100000 }} '''5.''' Boot up and check if it is still working. '''6.''' Until now only the physical size was increased, but the filesystem has not been changed. Shut down again. '''7.''' Inside VM: It is necessary to boot from a boot CD (Ubuntu Precise *DVD* did work) and use a tool like gparted to grow the filesystem. Start a terminal. {{CodeSelect|code= lxsudo gparted }} This procedure is also likely possible using the command line in [[Recovery|recovery mode]]. [[Undocumented]]. '''8.''' Inside VM: Increase the size of the filesystem. Apply changes and shut down. The procedure is complete. }} }} == Build from Source Code == Refer to [[Dev/Build_Documentation|Build and Update {{project_name_short}} from Source Code]] and utilize this setting: {{CodeSelect|code= --vmsize 200G }} = See Also = * [[Shrink Virtual Harddisk]] {{reflist|close=1}} {{Footer}} [[Category:Documentation]]