Closed sc0rp10 closed 4 months ago
Also, please provide a minimally reproducing example of a .pkr.hcl
that reproduces the issue.
The error itself most likely comes from the diskutil apfs resizeContainer
that we run inside of a guest to finalize the partition resizing that you've requested via disk_size_gb
.
Hi, @edigaryev super sorry for not detailed report - literally forgot to post the second message with the details:
Packer plugin:
$ packer plugins installed
/opt/homebrew/bin/github.com/cirruslabs/tart/packer-plugin-tart_v1.11.1_x5.0_darwin_arm64
Tart itself:
$ tart --version
2.9.0
The Host OS:
$ sw_vers
ProductName: macOS
ProductVersion: 14.3.1
BuildVersion: 23D60
The base.pkr.hcl
is completely equivalent to the https://github.com/cirruslabs/macos-image-templates/blob/master/templates/vanilla-sonoma.pkr.hcl
Part related to the disk:
source "tart-cli" "tart" {
from_ipsw = "https://updates.cdn-apple.com/2024WinterFCS/fullrestores/052-77579/4569734E-120C-4F31-AD08-FC1FF825D059/UniversalMac_14.4.1_23E224_Restore.ipsw"
vm_name = "sonoma-base"
cpu_count = 4
memory_gb = 8
disk_size_gb = 20 # here is the base disk size
ssh_password = "admin"
ssh_username = "admin"
ssh_timeout = "120s"
boot_command = [
# skip boot commands
]
create_grace_time = "30s"
}
The xcode.pkr.hcl
:
source "tart-cli" "tart" {
vm_base_name = "ghcr.io/ourteamname/sonoma-base:latest" # extends the previous `base.pkr.hcl`
vm_name = "${var.macos_version}-xcode:${var.xcode_version}"
cpu_count = 4
memory_gb = 8
disk_size_gb = 90 # here is the increased disk size
headless = true
ssh_password = "admin"
ssh_username = "admin"
ssh_timeout = "120s"
}
Should be fixed now as of release 1.12.0
.
Hi! I'm testing the Packer integration with tart to achieve some desired hierarchy of macOS VMs (like the
cirruslabs/macos-image-templates
but in my own way).I created a base image with vanilla Sonoma with
disk_size_gb = 30
, then I extended the base image with few additions like XCode withdisk_size_gb = 90
, but currently I'm unable to build the xcode-containing image due to error:Which part is this error related to? My workstation? Incorrect initialization of base image? How can I solve it?
Thanks!