{{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 }} [[File: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. }} = Virtual Machines = If more disk space is required for virtual hard disks, the good news is this is simple for {{project_name_short}} VMs. Nothing special, because it is just another VM image. Any suggestions found for your virtualizer will similarly work for {{project_name_short}}. [[Self_Support_First_Policy|Self Support First Policy]] applies. '''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.''' Select your virtualizer. {{Tab |type=controller |content= {{Tab |title= == VirtualBox == |image=[[File:Virtualbox_logo.png|25px]] |addToClass=info-box |active=false |content= '''3.''' On the host: Make a clone of all states of any existing virtual machine in case something goes wrong. '''4.''' On the host: Delete all existing VM snapshots. '''5.''' On the host: Grow the disk. Either, * '''A)''' Using the VirtualBox graphical user interface (GUI): VirtualBoxFileToolsVirtual Media Managerselect virtual hddadjust the size slider or, * '''B)''' Using the command line. See footnote. 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 }} '''6.''' Install a partitioning tool. Note: No longer required for [[Systemcheck#Build_Version|Build Version]] 17.3.9.2 and above.
Build version 17.3.9.2 and below, please press on expand on the right.
Install a tool such as gparted that can grow the filesystem. {{Install_Package|package= gparted }} Start the partitioning tool. Start a terminal. {{CodeSelect|code= lxsudo gparted }} Claim the new space. * Increase the size of the filesystem. * The user probably does not wish to create a new partition. Instead, the existing partition should be expanded.
'''7.''' Partition's type code fix. Note: No longer required for build version 17.4.0.4 and above. (Unreleased at time of writing.)
Build version 17.4.0.4 and below, please press on expand on the right.
This is a fix for [https://forums.whonix.org/t/failed-to-start-systemd-repart-service-repartition-root-disk/21640 Failed to start systemd-repart.service - Repartition Root Disk]. {{CodeSelect|code= sudo sgdisk --typecode='3:4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709' /dev/sda }}
'''9.''' Reboot. '''10.''' Done. The procedure is complete. }} {{Tab |title= == KVM == |image=[[File:Kvm-new-logo.png|25px]] |addToClass=info-box |active=false |content= '''3.''' On the host: Delete all existing snapshots. '''4.''' 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 }} '''5.''' Same instructions as step 6 for VirtualBox and following. }} {{Tab |title= == Qubes == |image=[[File:Qubes-logo-blue.png|25px]] |addToClass=info-box |active=false |content= '''2.''' Refer to the [https://www.qubes-os.org/doc/resize-disk-image/ Resizing Disk Image] Qubes OS user documentation. '''3.''' Done. }} }} = Build from Source Code = Refer to [[Dev/Build_Documentation|Build {{project_name_short}} from Source Code]] and utilize this command line parameter: {{CodeSelect|code= --vmsize 200G }} = See Also = * [[Shrink Virtual Harddisk]] = Footnotes = {{reflist|close=1}} {{Footer}} [[Category:Documentation]]