coreos / coreos-xhyve

Container Linux running on xhyve hypervisor
Apache License 2.0
330 stars 42 forks source link

add the ability to set the number of CPUs, now that we can run CoreOS with SMP. #34

Closed AntonioMeireles closed 9 years ago

AntonioMeireles commented 9 years ago

this (and SMP) works now given that this from @xez got merged in plain xhyve upstream tree last night, as en passant it fixed a bunch of acpi woes that were preventing SMP to work with plain CoreOS.

AntonioMeireles commented 9 years ago

also now "With the ACPI fixes in, removing "acpi=off" from the Linux kernel cmdline and running xhyve with -A, idle CPU usage drops to ~ 0.1 - 0.2%, which is inline or below VMware running the same VM."

bakins commented 9 years ago

rebase on current master and I'll merge.

AntonioMeireles commented 9 years ago

just rebased.

bakins commented 9 years ago

This fails for me:

xhyve -m 1024M -c 1 -A -s 0:0,hostbridge -s 31,lpc -l com1,stdio -s 2:0,virtio-net -U FB3D8DDC-9D28-45F0-8D31-4CB8708113C2 -f 'kexec,imgs/alpha.717.0.0.coreos_production_pxe.vmlinuz,imgs/alpha.717.0.0.coreos_production_pxe_image.cpio.gz,earlyprintk=serial console=ttyS0  coreos.autologin cloud-config-url=https://raw.githubusercontent.com/coreos/coreos-xhyve/master/cloud-init/docker-only.txt'
/bin/sh: /usr/sbin/iasl: No such file or directory
                                                  Assertion failed: (error == 0), function main, file src/xhyve.c, line 909.
    ./coreos-xhyve-run: line 47: 12691 Abort trap: 6           ${XHYVE} $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_HDD $UUID -f kexec,imgs/$VMLINUZ,imgs/$INITRD,"$CMDLINE"
AntonioMeireles commented 9 years ago

you're using brew's xhyve i bet (which is at 0.1.0 and hasn't the key patch)... you need, right now, an hand build xhyve, from its tip, (and point XHYVE to it) - (feedback in https://github.com/mist64/xhyve/issues/6 very positive.)

FWIW i requested a while ago for a new version to be tagged :smile: . should be out soonish.

bakins commented 9 years ago

I'm hesitant to merge this as the common use case is probably people using homebrew.

AntonioMeireles commented 9 years ago

@bakins fwiw xhyve's 0.2.0, which has the required funtionality builtin, is out in homebrew already, since last night.

chancez commented 9 years ago

Tested, xhyve 0.2.0 is in homebrew, nprocs in VM returns number of CPUs passed via CPUs variable. Merging.