machyve / xhyve

xhyve, a lightweight OS X virtualization solution
Other
6.43k stars 353 forks source link

Fixes building under MacOS Big Sur and Xcode 12 #192

Closed vitorpy closed 3 months ago

vitorpy commented 4 years ago

This PR fixes building under MacOS Big Sur and Xcode 12.

alexanderniebuhr commented 3 years ago

@vitorpy awesome work. 👍

I had to disable code signing to make it run in terminal see #191 However I am currently not able to get my script started:

#!/bin/bash

KERNEL="vmlinuz"
INITRD="initrd.img"
CMDLINE="earlyprintk=serial console=ttyS0 acpi=off sshd=1"

MEM="-m 1G"
NET="-s 2:0,virtio-net"
IMG_CD="-s 3,ahci-cd,/Users/alexanderniebuhr/Downloads/CentOS-7-x86_64-Minimal-2003.iso"
IMG_HDD="-s 4,virtio-blk,hdd.img"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
LPC_DEV="-l com1,stdio"

xhyve $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_CD $IMG_HDD -f kexec,$KERNEL,$INITRD,"$CMDLINE"
🕙[ 07:41:48 ] ❯ sudo ./install_centos.sh
Password:
vmx_set_ctlreg: cap_field: 2 bit: 20 unspecified don't care
vmx_init: processor does not support desired secondary processor-based controls
Unable to create VM (22)

Did you experienced something similar? Or does anyone have an idea how to fix this with macOS 11.0 Beta (20A5323l) and Xcode 12.0 beta 3 (12A8169g)

DiegoMagdaleno commented 3 years ago

@alexanderniebuhr I am also experiencing the same issue

❯ ./xhyverun-tinycorelinux.sh
vmx_set_ctlreg: cap_field: 2 bit: 14 unspecified don't care
vmx_init: processor does not support desired secondary processor-based controls
Unable to create VM (22)