-
Notifications
You must be signed in to change notification settings - Fork 881
Introduce QEMU support #2952
Introduce QEMU support #2952
Conversation
|
I can't compile it on my system. First, my default python is diff --git a/stage1/usr_from_kvm/qemu.mk b/stage1/usr_from_kvm/qemu.mk
index 0b4a3cd..ac7160b 100644
--- a/stage1/usr_from_kvm/qemu.mk
+++ b/stage1/usr_from_kvm/qemu.mk
@@ -53,7 +53,7 @@ $(call generate-stamp-rule,$(QEMU_BUILD_STAMP),$(QEMU_CONF_STAMP),, \
$(call generate-stamp-rule,$(QEMU_CONF_STAMP),$(QEMU_CLONE_STAMP),, \
$(call vb,vt,CONFIG EXT,qemu) \
- cd $(QEMU_SRCDIR); ./configure $(QEMU_CONFIGURATOR) $(QEMU_CONFIGURATION_OPTS) $(call vl2,>/dev/null))
+ cd $(QEMU_SRCDIR); ./configure --python=/usr/bin/python2 $(QEMU_CONFIGURATOR) $(QEMU_CONFIGURATION_OPTS) $(call vl2,>/dev/null))
# Generate filelist of qemu directory (this is both srcdir and
# builddir). Can happen after build finished.And then the next failure is: I tried setting up |
|
@iaguis What version of |
|
|
Could You give there produced error string? AFAIR gcc4.9 "does the job". |
|
The error string is mentioned in #2952 (comment): |
|
ack. |
89f9c3f to
bf2d258
Compare
|
Can't reproduce it locally with different versions of |
|
I get the following error when trying to compile it: The error probably comes from But Any ideas? |
|
No idea about inconsistency in check of zlib inside and outside of configure. My zlib packages: |
|
@krnowak solved my issue by installing the package "zlib-static" (zlib and zlib-devel are not enough). |
|
dependencies.md needs to be updated with the zlib-static. Then I have the same issue as #2952 (comment) with "sizeof(size_t)". |
|
@alban Should I add checking zlib-static in rkt |
|
I remember removing all the checks for 3rd party projects like kvm, kernel, etc from configure and writing a note to make sure that all the dependencies are met. Not dure anout mentioning such deps in documentation either. |
|
I could compile it by removing the |
|
If I start an interactive container, pressing Ctrl+C will terminate qemu: |
|
Also, systemd output is printed even though we didn't specify |
bf2d258 to
4008ce8
Compare
|
Added some fixes, TestDiagnostic is passing and there's no reduntant output while starting pod (#2952 (comment)) |
stage1/usr_from_kvm/usr_from_kvm.mk
Outdated
| $(call setup-stamp-file,UFK_CBU_STAMP,cbu) | ||
| $(call setup-tmp-dir,UFK_TMPDIR) | ||
|
|
||
| HV_BUILD_FILE := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may break make clean in a certain scenario (configure with kvm-qemu flavor, make, configure with kvm-lkvm flavor, make, make clean).
I would prefer if you included both lkvm.mk and qemu.mk unconditionally, but instead modify the S1_RF_SECONDARY_STAMPS conditionally, like as follows:
UFK_INCLUDES := \
kernel.mk \
files.mk \
lkvm.mk \
qemu.mk
...
$(call inc-many,$(UFK_INCLUDES))
ifeq ($(KVM_HV_TAG),"hv_lkvm")
S1_RF_SECONDARY_STAMPS += $(LKVM_STAMP)
else ifeq ($(KVM_HV_TAG),"hv_qemu")
S1_RF_SECONDARY_STAMPS += $(QEMU_STAMP)
endif
For this to work, you should also exclude both QEMU_STAMP and LKVM_STAMP from the namespace undefine mechanism. You can do it like so:
in lkvm.mk at the bottom of the file:
$(call undefine-namespaces,LKVM,LKVM_STAMP)
in qemu.mk at the bottom of the file:
$(call undefine-namespaces,QEMU,QEMU_STAMP)
And remove the lines in lkvm.mk and qemu.mk modifying the S1_RF_SECONDARY_STAMPS variable.
|
I agree with @alban, I think that the kvm / qemu should be different flavors. For the formal release process, we're going to want to build and distribute both. |
|
@squeed Same flavor but separate images also allow to build and distribute both. |
|
Are we good to go here? |
|
👍 |
|
Doc files updated 8a17e58 |
|
I still get a compilation error as mentioned in #2952 (comment). |
|
(And by removing |
|
I also suggest to set |
|
I have started a qemu based container, locally, great work @jjlakis ! 👍 👍 So this LGTM modulo the |
|
Binaries built without |
|
FYI: apparently Arch won't include the static libraries for glib2: https://bugs.archlinux.org/task/35758 |
8a17e58 to
035e392
Compare
|
@s-urbaniak @iaguis If qemu static build for Arch is not possible and looks like it won't be, it has to be documented. Or maybe we can recommend using rocket-in-rocket build? Of course I can add rkt configure option for static/non-static qemu build, but it wouldn't be so pretty IMO. |
|
As @iaguis pointed on irc - there is hope also for Arch - https://aur.archlinux.org/packages/glib2-static/ IMO this PR is complete and ready to be merged. |
|
ok, this LGTM then, do you want to create follow-up issues for #2952 (comment), and #2952 (comment), or is this also resolved here already? |
|
So, we can keep the static version for the moment and merge it as-is. This looks still rough around the edges, so a bit more exposure will help finding and fixing more issues. Arch downstream (and anybody else missing some .a) will probably not opt-in for the moment and just use our .aci if they want to play with it. If we have other issues related to linking, we may explore the dynamic linking way as a last resort. As a non-default kvm flavor, LGTM too. Side question: how does https://github.com/01org/qemu-lite relate to this? I see it is not used here, but it is part of the ClearContainers brand. |
|
@lucab when i was still at Intel there was a plan to switch from plain qemu to this qemu-lite, but at the moment this project was unreleased, so this was a goal for future, so the question if if Intel guys have this still in backlog. |
|
Thanks! That was PR of my life 💃 |
This change adds the ability to configure rkt to use qemu-lite (implementing the pc-lite machine) over qemu. This change comprises of two parts: * The build system to retrieve qemu-lite source, configure and build (derived from the exiting qemu.mk) * A fork of the hvqemu package to support the slightly different command line options required for qemu. Signed-off-by: Rob Bradford <[email protected]>
Extending current makefile mechanism to build more than one image for single flavor (with differences in rootfs) and adding QEMU as a hypervisor.
PR contains:
stage1/stage1.mk, more specific: STAGE1_ACI_RULE to accept two parameters (flavor and list of images), instead of just one (flavor). List of images are parsed directly in stage1.mk, common and hv-specific files are done still in usr_from_flavor makefiles. STAGE1_ACI_RULE is now responsible to copy files from common directory and build images (added new rule).stage1/usr_from_kvm/qemu.mk- responsible for cloning sources, building qemu and including its binaries instage1-kvm.aci.stage1/init/kvm/hypervisor/qemu_driver.go- similar to lkvm_driver.go in the form created in KVM: Hypervisor support for KVM flavor #2684none_driver.gois removed.lkvm is still default hypervisor
To build rkt with qemu support, type:
./configure --with-stage1-kvm-hypervisors=qemuTo built rkt with both qemu and lkvm support, type:
./configure --with-stage1-kvm-hypervisors=lkvm,qemuAnd you will get two images:
stage1-kvm-lkvm.acistage1-kvm-qemu.aci(if only one hypervisor is specified, its name will remain as
stage1-kvm.aci)To be clarified / To do
cc @coreos/rkt-kvm-maintainers