Open telala opened 6 years ago
@telala yes that is the right way. And it depends on hyperd to build the kernel. If you do not have that installed locally, you can change hyperctl
to docker
in https://github.com/hyperhq/hyperstart/blob/master/build/Makefile.am
, and run ./autogen.sh
and ./configure
to create a Makefile that uses docker instead.
@bergwolf got a lot of errors while compiling the kernel while running "make kernel-local". But I can compile the kernel successfully by myself locally.
I changed the dockerfile.x8664 a little as following:
FROM centos:latest MAINTAINER Hyper Developers dev@hyper.sh
RUN yum install -y gcc ncurses-devel make openssl-devel bc perl
ENV KERNEL_VERSION 4.12.4 ENV LOCALVERSION -hyper ENV KERNEL_RELEASE ${KERNEL_VERSION}${LOCALVERSION}
ENV KBUILD_BUILD_USER dev ENV KBUILD_BUILD_HOST hyper.sh ENV KBUILD_BUILD_VERSION 1
RUN mkdir /root/build/ && mkdir /root/build/result/
COPY tkernel2 /root/build/tkernel2
RUN cd /root/build/tkernel2/ && make -j 8 .........
following is the compiling errors:
{standard input}: hAssembler messages: {standard input}:37434: Warning: end of file not at end of a line; newline inserted U{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive 3gcc: internal compiler error: Killed (program cc1) JPlease submit a full bug report, with preprocessed source if appropriate. <See http://bugzilla.redhat.com/bugzilla for instructions. _make[3]: [drivers/scsi/bfa/bfa_ioc.o] Error 4 make[3]: Waiting for unfinished jobs.... make: [net] Error 2 make[2]: _ [drivers/scsi/bfa] Error 2 make[1]: [drivers/scsi] Error 2 make: [drivers] Error 2 hyperctl ERROR: The container '4c7588c1312ac9657808957d513e2e24deef34559e9bfa33a34309d039d51c7d' returned a non-zero code: 2 make: *** [kernel-local] Error 255
there are a lot of compiling errors besides the above. Are there any advise?
gcc: internal compiler error: Killed (program cc1)
@telala it looks like gcc got oom-killed. Are you using hyperd
to build? You might want to try docker
instead. I've given the instructions to use docker to build in the last comment
@bergwolf after replace hyperctl to docker I can build the kernel and initrd successfully. I noticed that a modules.tar file is created too. How to use the modules.tar?
@telala module.tar
is included in the initrd file created by make initrd-local
.
@bergwolf when using the built local kernel to start a container got error: Log file created at: 2018/04/11 19:03:24 Running on machine: localhost Binary: Built with gc go1.8.3 for linux/amd64 Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg E0411 19:03:24.663745 29753 hyperstart.go:410] read tty data failed E0411 19:03:24.664397 29753 hyperstart.go:467] SB[vm-mxBHsSjTaJ] tty socket closed, quit the reading goroutine: EOF E0411 19:03:24.664491 29753 hyperstart.go:150] read init data failed E0411 19:03:24.664531 29753 hyperstart.go:184] SB[vm-mxBHsSjTaJ] error when readVmMessage() for ready message: EOF
any advice?
@telala are you able to run with the kernel and initrd in hyperstart w/o modification? If you can, I'd suspect your kernel config options.
@bergwolf yes. I just tried to use the original initrd and kernel to start runv it worked.
@telala There are certain kernel config options required for the hyperstart guest to boot. Please try to use the kernel config in hyperstart and enable other options you need in your kernel.
@bergwolf I tried to use the default kernel 4.12.4 in the Dockerfile and it worked. The local kernel can be started successfully by runv. It should be the kernel config problem. Thanks very much : )
I am using runv and need to use my own kernel for the vm rather than the default one of hyperstart. Then I tried to build my own kernel using hyperstart.
Is this the right way to build local kernel?