hyperkit icon indicating copy to clipboard operation
hyperkit copied to clipboard

Update xcode build environment to 13.2.1

Open djs55 opened this issue 4 years ago • 7 comments

We're using a deprecated version in the CI. Let's update to latest and see what happens.

djs55 avatar Dec 30 '21 23:12 djs55

Some failures in CI; I'm not familiar with this repo, so don't know if it's related

thaJeztah avatar Dec 31 '21 19:12 thaJeztah

Locally make test works. The CI seem to have failed on extracting the tinylinux initrd or to create a modified initrd from it after massaging it. I've re-kicked CI to see if this may have been a download issue but it failed at the same point.

When running locally I do get warning about:

cpio: .: large inode number truncated: Result too large
cpio: ./proc: large inode number truncated: Result too large
cpio: ./init: large inode number truncated: Result too large

when creating the new initrd.

rn avatar Jan 02 '22 10:01 rn

scrap the above, the cpio message seem to be warning, the real error is:

spawn ../build/hyperkit -A -m 512M -s 0:0,hostbridge -s 31,lpc -l com1,stdio -s 1:0,ahci-hd,/dev/rdisk3 -f kexec,./vmlinuz,./initrd.gz,earlyprintk=serial console=ttyS0 noapic nosmp
hv_vm_create HV_ERROR (unspecified error)
send: spawn id exp6 not open
    while executing
"send "sudo mount /dev/sda1 /mnt/sda1\r\n""
    (file "./test_linux.exp" line 21)
make: *** [test] Error 1

Exited with code exit status 2
CircleCI received exit code 2

so hv_vm_create failed on the CI system

rn avatar Jan 02 '22 11:01 rn

Add a sysctl machdep.cpu to https://github.com/moby/hyperkit/pull/329 and on the CI machine I get:

machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH MMX FXSR SSE SSE2 SS SSE3 PCLMULQDQ MON SSSE3 CX16 SSE4.1 SSE4.2 x2APIC POPCNT AES VMM PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C

This is missing the VMX extension required to run hyperkit.

checking ioreg -l looks like CircleCI is still using VMWare for virtualisation but I suspect they now disabled nested virt

rn avatar Jan 02 '22 11:01 rn

not using the latest CircleCI environment, ie the original 11.3.1, seems to work (fails later with opam errors, but that is separate).

triaging through the xcode versions from https://circleci.com/docs/2.0/testing-ios/

  • 11.3.1, macOS 10.15.1 works
  • 12.4.0, macOS 10.15.5 works
  • 12.5.1, macOS 11.4.0 fails
  • 13.0.0, macOS 11.5.2 fails
  • 13.2.1, macOS 11.6.2 fails

so looks like the xcode environment 12.4.0, Xcode 12.4 (12D4e) macOS 10.15.5 is the last which supports nested virt

rn avatar Jan 02 '22 11:01 rn

Hmm... let me see if I can ask our contacts at CircleCI if they know about this 🤔

thaJeztah avatar Jan 02 '22 13:01 thaJeztah

@thaJeztah @rn @djs55 It may solved if using macos.x86.metal.gen1 resource_class.

This resource class requires a 24-hour minimum lease and runs on Intel-based Mac hardware.

https://circleci.com/docs/2.0/dedicated-hosts-macos

zchee avatar Feb 20 '22 05:02 zchee