-
Notifications
You must be signed in to change notification settings - Fork 121
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
Option to change disk size of a VM #17
Comments
Just tried re-sizing the
It's possible to create a second APFS container, but it doesn't seem to be possible to "link" these two together, so that the primary APFS container would re-use free space of the secondary APFS container. |
Just to illustrate better, here's a partition table of a disk above, but:
The |
Funnily enough, the VM seems to boot just fine with the The question now is how to automate this. |
Also we'll need to implement |
Ended up with implementing the disk growing functionality in the Packer plugin. See cirruslabs/packer-plugin-tart#2 |
Closing in favor of the Packer plugin option. One should automate creation of VMs. |
I don't think tart is for only packer, then it should be very helpful if FAQ introduces how to do this using cli. I went through the source code and github to do it.
[... tart run and ssh in to vm]
|
@qbx2 thanks for that info! 🙏 A couple of small remarks for future generations: Doing this in macOS host: # Complains in Sonoma 14.5 and prints out command help:
# truncate ~/.tart/vms/my-vm/disk.img -s 100g
# This works:
truncate -s 100g ~/.tart/vms/my-vm/disk.img Doing this inside macOS VM: # Not sure if this is macOS 15 Sequoia (Beta 2) (vanilla image) or something else,
# but there's no disk0 for some reason – using disk1 worked perfectly.
# To see all partitions – we want the first one (internal, physical).
diskutil list
diskutil repairDisk disk1
diskutil apfs resizeContainer disk1s2 0
df -h ~ |
Hello, I'm somewhat new to tart and also have a few remarks:
At this point I thought that I could even run the |
The following steps worked for me on macOS Ventura 14.5. From the host machine
In the virtual machine running in recovery mode
The disk space has now been increased. |
Be very wary following these steps to resize the VM container. I followed the steps and successfully resized the VM's disk space, but after doing so, I am now unable to update the OS on that VM. When I try I get an error from macOS saying "Unable to personalise the update" and it fails. And then when I tried from the command line, I noticed the actual error:
So while this will enable you to increase the disk space, it results in being unable to update the OS. Is it possible to reinstate the recovery volume? Or will I have to create a new VM? |
@james-rant unless you've installed macOS from ISPW, the recovery volume would be removed from the start, see #889 (comment). So, this is probably unrelated to resizing the disk. |
Need to investigate and option to grew VM's disk size.
The text was updated successfully, but these errors were encountered: