Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase available storage with VMDK #169

Closed
nhorvath opened this issue Aug 21, 2018 · 25 comments
Closed

Increase available storage with VMDK #169

nhorvath opened this issue Aug 21, 2018 · 25 comments

Comments

@nhorvath
Copy link

@nhorvath nhorvath commented Aug 21, 2018

How do I add storage to HassOS running in VMware?

@rbray89 rbray89 added the board/ova label Aug 25, 2018
@Brianckramer

This comment has been minimized.

Copy link

@Brianckramer Brianckramer commented Aug 27, 2018

I use VirtualBox and I had to increase the size as well.
@pvizeli can we make the default size larger? It requires a lot of steps to increase it later.

@nhorvath

This comment has been minimized.

Copy link
Author

@nhorvath nhorvath commented Aug 27, 2018

@mihalski

This comment has been minimized.

Copy link

@mihalski mihalski commented Aug 29, 2018

The default size is 6GB right?
With VMware my process is as follows:

  1. Download HassOS image and extract vmdk.
  2. Create new VM in Fusion/Workstation with UEFI boot and the HassOS vmdk.
  3. Edit settings (such as disk size) to my preferences and apply. Note: Disk must be IDE and not SCSI.
  4. Export OVA (NEVER START THE VM).
  5. Upload OVA to VMware ESXi server (could probably also upload via Fusion/Worstation)
  6. Start VM.

If you intend to run in the desktop version of VMware (Fusion/Workstation) then just skip steps 4 and 5.

To move everything to the new install you will need to hassio snapshot your old system setup, download it and restore it on the new instance.

@nhorvath

This comment has been minimized.

Copy link
Author

@nhorvath nhorvath commented Aug 29, 2018

@mihalski

This comment has been minimized.

Copy link

@mihalski mihalski commented Aug 29, 2018

You lose nothing from starting again but potentially days of messing around without success if you try resizing an existing install.

@mihalski

This comment has been minimized.

Copy link

@mihalski mihalski commented Aug 29, 2018

FYI. When you restore a snapshot the add-ons will need to download from their repositories, therefore if you have added a repository and installed an add-on from it, you will first need to re-add the repository to the new install. And don't forget to give the add-ons time to download and re-install.

@nhorvath

This comment has been minimized.

Copy link
Author

@nhorvath nhorvath commented Aug 29, 2018

@mihalski

This comment has been minimized.

Copy link

@mihalski mihalski commented Aug 29, 2018

Before you restore the snapshot, add any repo that you have installed an add-on from. If you are using the included repos then all you have to do is wait for the add-ons to redownload and install. The configs will be preserved. I learnt all this today when following my own instructions.

Now my hassio install is 30GB instead of 6GB.

@nhorvath

This comment has been minimized.

Copy link
Author

@nhorvath nhorvath commented Aug 29, 2018

@mihalski

This comment has been minimized.

Copy link

@mihalski mihalski commented Aug 29, 2018

I've done it before (not in hassos though) and it's always been a major PITA. You need to resize the drive in VMware, then boot off an iso image such as parted-live and shift around partitions.. I don't think it's worth the effort as even if it was supported it would take LONGER than a snapshot and reinstall.

@nhorvath

This comment has been minimized.

Copy link
Author

@nhorvath nhorvath commented Aug 29, 2018

@mihalski

This comment has been minimized.

Copy link

@mihalski mihalski commented Aug 29, 2018

I think there at LEAST 8 partitions, and I doubt the one we want to resize is last. Therefore it's a matter of resizing the extended, moving a lot of partitions and THEN resizing the one we want to enlarge.

@nhorvath

This comment has been minimized.

Copy link
Author

@nhorvath nhorvath commented Aug 29, 2018

@nhorvath

This comment has been minimized.

Copy link
Author

@nhorvath nhorvath commented Aug 29, 2018

@mihalski

This comment has been minimized.

Copy link

@mihalski mihalski commented Aug 29, 2018

That MAY be something that's in the works as using a USB stick on the rpi for data is something that has been hinted at. Could translate just as easily to a virtual machine.

@nhorvath

This comment has been minimized.

Copy link
Author

@nhorvath nhorvath commented Aug 29, 2018

@mihalski

This comment has been minimized.

Copy link

@mihalski mihalski commented Aug 29, 2018

Or just base it on volume name.

@nhorvath

This comment has been minimized.

Copy link
Author

@nhorvath nhorvath commented Apr 1, 2019

I put this off because I didn't want to risk screwing up addons. I finally did it by resizing following these steps with no issues (instructions for virtualbox, but should translate to other vm hosts):

  1. Go to Hass.io System Tab in web interface and update Hass.io Host System (2.11 at this writing)
  2. After it comes back up, click shutdown.
  3. Resize the virtual disk
cd /opt/virtualbox/HassOS
vboxmanage clonemedium hassos_ova-1.9.vmdk hassos.vdi --format vdi
vboxmanage modifymedium hassos.vdi --resize 51200
vboxmanage clonemedium hassos.vdi hassos.vmdk --format vmdk

Note: change 51200 to some other number if you don't want a 50GB disk. Paths and original filename will vary with your setup.
4. In virtualbox change the hard disk from the original vmdk to the new one.
5. Download gparted live cd from here: https://gparted.org/download.php and mount the iso.
6. Turn on the VM and boot into the gparted live cd.
7. If/When asked at startup if you want to fix the GPT table to use the entire disk say "Fix".
8. Resize partition /dev/sda8 to fill the disk and click apply.
9. Reboot and verify you now see all the storage!
10. Clean up by deleting the old vmdk and intermediate vdi file.

I'd still like to keep this issue open as a feature request to be able to just add another VMDK that gets used as storage, or automatic resizing at boot by just expanding the size of the original VMDK.

@stratplayer

This comment has been minimized.

Copy link

@stratplayer stratplayer commented Apr 5, 2019

@nhorvath thanks for the above, worked a treat. I had the same problem and followed this guide above to fix the issue :-)

@ryanupp

This comment has been minimized.

Copy link

@ryanupp ryanupp commented Apr 9, 2019

Thanks @nhorvath, this worked for me as well, expanded to 40gb without any problems.

For anyone else who ends up here I'm running Hass.io as a VM in ESXi 5.5, and in my case there was no need to go to the intermediate vdi format. I just cloned the vmdk, expanded it, then modified my VM's config to use the new disk and continued with the steps above using gparted.

SSH into ESXi
#cd into your VM's directory
cd /vmfs/volumes/datastore/hassio/
#clone existing vmdk
vmkfstools -i hassio.vmdk hassio_clone.vmdk
#resize cloned vmdk to 40GB
vmkfstools -X 40g hassio_clone.vmdk
#rename vmdk's if desired
vmkfstools -E "originalname.vmdk" "newname.vmdk"

@carloscae

This comment has been minimized.

Copy link

@carloscae carloscae commented Apr 15, 2019

For anyone who's is struggling with step 5 and 6 of @nhorvath instructions above, on how to attach and boot Gparted:

  • After downloading the ISO, go to Virtual Media Manager and load it on the Optical Disk section.
  • Then attach into your Hassio VM in Settings/Storage under Sata Controller.
  • When you boot the Hassio VM it should boot the Partition Manager now.

There will be a couple of straight forward dialogs until you get to the GUI where is pretty simple to resize the partition mentioned above.

Maybe this might seem unnecessary explanation, but since it took me a while to figure out, maybe some people also have the same issue.

Thanks for the solution, @nhorvath :)

PS: Only thing I might add is that is not necessary to convert back and forth VDMK and VDI. If you're using Virtualbox, just use VDI. (I get that the issue here is about resizing VDMK).

@stale

This comment has been minimized.

Copy link

@stale stale bot commented Jun 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 14, 2019
@stale stale bot closed this Jun 21, 2019
@fluppie

This comment has been minimized.

Copy link

@fluppie fluppie commented Mar 6, 2020

I think the default size should be at least 20-25 GB. New installation with some add-ons and I already have a full disk, which gives issues with the log files and unifi controller.

@zeljko-ciric

This comment has been minimized.

Copy link

@zeljko-ciric zeljko-ciric commented Mar 25, 2020

I have same problem. Initial disk was 6GB. Increasing disk size in Hyper V and reboot system solve issue.

@pvizeli

This comment has been minimized.

Copy link
Member

@pvizeli pvizeli commented Mar 25, 2020

Yep, it resize only on reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.