From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Legoll Subject: Re: how to create and test a new service definition Date: Sun, 14 May 2017 10:44:47 +0200 Message-ID: References: <87vap4zupo.fsf@gnu.org> <878tm0zflx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9p92-0001yV-Bq for guix-devel@gnu.org; Sun, 14 May 2017 04:44:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9p91-0002OD-5t for guix-devel@gnu.org; Sun, 14 May 2017 04:44:52 -0400 In-Reply-To: <878tm0zflx.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel On Sat, May 13, 2017 at 10:06 PM, Ludovic Court=C3=A8s wrote= : > Vincent Legoll skribis: >> ERROR: qemu failed "qemu-system-x86_64" > > What were the lines above this one? This tool tries to use KVM if it > seems available. Maybe in your case it =E2=80=9Cseems=E2=80=9D to be ava= ilable (as in > /dev/kvm exists) but is actually unusable? Formatting '/gnu/store/miyri69r76ji72y6aq5xci8z2j68n5s1-qemu-image', fmt=3Dqcow2 size=3D31457280 encryption=3Doff cluster_size=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 qemu-system-x86_64: error: failed to set MSR 0xd90 to 0x0 qemu-system-x86_64: /tmp/guix-build-qemu-minimal-2.9.0.drv-0/qemu-2.9.0/target/i386/kvm.c:1833: kvm_put_msrs: Assertion `ret =3D=3D cpu->kvm_msr_buf->nmsrs' failed. Backtrace: In ice-9/boot-9.scm: 160: 10 [catch #t # ...] In unknown file: ?: 9 [apply-smob/1 #] In ice-9/boot-9.scm: 66: 8 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 7 [eval # #] In ice-9/boot-9.scm: 2412: 6 [save-module-excursion #] 4089: 5 [#] 1734: 4 [%start-stack load-stack #] 1739: 3 [#] In unknown file: ?: 2 [primitive-load "/gnu/store/rdpki7xkanivgb7jdczvk27kma47rj54-qemu-image-builder"] In ./gnu/build/vm.scm: 126: 1 [load-in-linux-vm "/gnu/store/6mcs53r3ggy3csq7z4hwhx2iccfds3yn-linux-vm-loader" ...] In unknown file: ?: 0 [scm-error misc-error #f "~A ~S" ("qemu failed" "qemu-system-x86_64") #f] ERROR: In procedure scm-error: ERROR: qemu failed "qemu-system-x86_64" environment variable `PATH' set to `/gnu/store/rh3953267ifpb5bpl3l0f9vcmkx6zgl5-qemu-minimal-2.9.0/bin:/gnu/st= ore/6908gy3pws0ccys49ni98idwnicchlr2-coreutils-8.26/bin' builder for `/gnu/store/g2zyq34flqswxaikr0m774aizwbh0xdm-qemu-image.drv' failed with exit code 1 cannot build derivation `/gnu/store/qh5rvmv7rss59w4prb4bwq0r1m0jqwql-run-vm.sh.drv': 1 dependencies couldn't be built guix system: error: build failed: build of `/gnu/store/qh5rvmv7rss59w4prb4bwq0r1m0jqwql-run-vm.sh.drv' failed Looks like kvm is there though, in my qemu guixsd VM: vince@guixsd ~$ l /dev/*kvm* crw-rw---- 1 root kvm 10, 232 May 14 10:36 /dev/kvm Maybe use of qemu without hw assisted kvm would work when already in a virtualized environment... > =E2=80=98GUIX_PACKAGE_PATH=E2=80=99 is documented at > . Yes, that's where I finally found it again, with google's help, I first searched there: > , > . So I think adding something to these pages, maybe only linking to where it = is described would have been sufficient... WDYT ? > There=E2=80=99s probably room for improvement though. What changes/addit= ions > would you suggest? I would suggest having a paragraph or 2 about how to setup a dev environmen= t: - using GUIX_PACKAGE_PATH - setting up a link (where ?) to a local guix checkout I read "8.1 Building from Git" and was frustrated by its avoidance to expla= in how to do it. This is the logical (at least for me) place where this should= be explained. I can try to add something about the env var, but cannot do the link thing,= I think this is what Catonano is speaking about : > George suggested me the trick to link a checked out master branch to > .local/guix/profile (or maybe it's the other way around: it's linking > .local/guix/profile to a checked out master branch) WDYT ? >> guix edit is throwing me : >> E166: Can't open linked file for writing > > This error does not come from =E2=80=98guix edit=E2=80=99, but maybe from= your editor. > As for why the file is read-only, see > . And here is the other place where that variable is talked about, I really fumbled my research... So if something more substantial is put in 8.1, maybe we can= just link to it from there too... Another idea, would be to enhance guix edit, like that: if there's a user writable place for package definitions (either GUIX_PACKAGE_PATH or a link to a local git checkout, or...), then guix edit make a temp copy of the store file, if it is not modified, the copy is thrown away at guix edit exit and if it is modified, kept there... WDYT ? --=20 Vincent Legoll