From mboxrd@z Thu Jan 1 00:00:00 1970 From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Subject: Re: Progress on 'guix deploy' Date: Tue, 11 Jun 2019 11:14:39 -0400 Message-ID: <87k1dscfxc.fsf@sdf.lonestar.org> References: <875zpgrjqf.fsf@sdf.lonestar.org> <87h88x7pni.fsf@gnu.org> <871s01l4c2.fsf@sdf.lonestar.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:54333) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1haiVE-00005J-Ju for guix-devel@gnu.org; Tue, 11 Jun 2019 11:16:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1haiVC-0007Tb-8r for guix-devel@gnu.org; Tue, 11 Jun 2019 11:16:00 -0400 In-Reply-To: <871s01l4c2.fsf@sdf.lonestar.org> (Jakob L. Kreuze's message of "Mon, 10 Jun 2019 13:47:57 -0400") 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) writes: > It seems likely that the SSH issue I was dealing was being caused by > the store being read-only. I'll investigate that today and report > back. Sorry it took so long. It took me some significant time yesterday to figure out how the high-level 'virtual-machine' interface actually starts QEMU guests, but I did eventually boot a marionette with an image produced by 'system-qemu-image' and was greeted by the same error, so I suspect that the SSH issue isn't being caused by a read-only store. In a Guile REPL, I created a VM image with something like the following: #+BEGIN_SRC scheme (use-modules ...) (define os (marionette-operating-system (simple-operating-system (service dhcp-client-service-type) (service openssh-service-type (openssh-configuration (permit-root-login #t) (allow-empty-passwords? #t)))))) (with-store store (run-with-store store (mlet* %store-monad ((image (system-qemu-image os #:disk-image-size (* = 3600 (expt 2 20)))) (_ ((store-lift build-derivations) (list image)))) (return (begin (display (derivation->output-path image)) (newline)))))) #+END_SRC I proceeded to start it with 'qemu-sytem-x86_64' to get obtain the system's store path from 'dmesg', created a writeable image with 'qemu-img' =C3=A0 la 'qemu-command/writable-image', and then passed the equivalent of the following as the command for 'make-marionette': #+BEGIN_SRC sh export QEMU=3D/gnu/store/sw2rrqmjij73wcy3ajd47ypvmzh12yz6-qemu-3.1.0/ export SYSTEM=3D/gnu/store/rk5yy9xhxbl9zbqs78kzgxmmxd72zsq0-system/ $QEMU/bin/qemu-system-x86_64 \ -drive file=3D/home/jakob/test.img,if=3Dvirtio \ -kernel $SYSTEMkernel/bzImage \ -initrd $SYSTEM/initrd \ -append "console=3DttyS0 --root=3D/dev/vda1 --system=3D$SYSTEM --load= =3D$SYSTEM/boot" \ -enable-kvm \ -no-reboot \ -net nic,model=3Dvirtio \ -object rng-random,filename=3D/dev/urandom,id=3Dguixsd-vm-rng \ -device virtio-rng-pci,rng=3Dguixsd-vm-rng \ -vga std \ -m 256 \ -net user,hostfwd=3Dtcp::2222-:22 #+END_SRC Where '/home/jakob/test.img' is the writeable image that 'qemu-img' produced. Running 'make check-system TESTS=3Dssh-deploy-os yields the same error: #+BEGIN_SRC ;;; (auth success) ;;; [2019/06/11 10:25:52.727456, 2] channel_open: Creating a channel 43 wit= h 64000 window and 32768 max packet ;;; [2019/06/11 10:25:54.533529, 2] ssh_packet_global_request: Received SSH= _MSG_GLOBAL_REQUEST packet ;;; [2019/06/11 10:25:54.533616, 2] ssh_packet_global_request: UNKNOWN SSH_= MSG_GLOBAL_REQUEST hostkeys-00@openssh.com 0 ;;; [2019/06/11 10:25:54.533638, 1] ssh_packet_process: Couldn't do anythin= g with packet type 80 ;;; [2019/06/11 10:25:54.533739, 2] ssh_packet_channel_open_conf: Received = a CHANNEL_OPEN_CONFIRMATION for channel 43:0 ;;; [2019/06/11 10:25:54.533775, 2] ssh_packet_channel_open_conf: Remote wi= ndow : 0, maxpacket : 32768 ;;; [2019/06/11 10:25:54.534340, 2] channel_rcv_change_window: Adding 20971= 52 bytes to channel (43:0) (from 0 bytes) ;;; [2019/06/11 10:25:54.534378, 2] channel_request: Channel request exec s= uccess ;;; [2019/06/11 10:25:54.593719, 2] grow_window: growing window (channel 43= :0) to 1280000 bytes qemu-system-x86_64: terminating on signal 15 from pid 7454 (/gnu/store/020a= w068yfsq84h6scmnvfrjacmznsgz-profile/bin/guile) ;;; [2019/06/11 10:25:55.074345, 2] channel_open: Creating a channel 44 wit= h 64000 window and 32768 max packet ;;; [2019/06/11 10:25:55.074381, 1] ssh_socket_exception_callback: Socket e= xception callback: 2 (-1) ;;; [2019/06/11 10:25:55.074418, 1] ssh_socket_exception_callback: Socket e= rror: Unknown error -1 ;;; [2019/06/11 10:25:55.074478, 0] channel-open-session: [GSSH ERROR] Sock= et error: Unknown error -1: # Backtrace: 15 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 14 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 13 (_ #(#(#))) In guix/store.scm: 623:10 12 (call-with-store _) In guix/status.scm: 768:4 11 (call-with-status-report _ _) In guix/store.scm: 1794:24 10 (run-with-store _ _ #:guile-for-build _ #:system _ # _) In unknown file: 9 (_ # #<=E2=80= =A6> =E2=80=A6) In guix/monads.scm: 482:9 8 (_ _) In gnu/tests/machine.scm: 323:12 7 (_ _) In gnu/machine.scm: 118:2 6 (_ _) In guix/store.scm: 1690:38 5 (_ #) In guix/ssh.scm: 292:18 4 (send-files # _ _ # _ # =E2= =80=A6) 106:18 3 (inferior-remote-eval (begin (use-modules (guix) # =E2=80=A6) = =E2=80=A6) =E2=80=A6) 99:14 2 (remote-inferior _) In ssh/popen.scm: 64:4 1 (open-remote-pipe _ "guix repl -t machine" "r+") In unknown file: 0 (channel-open-session #) ERROR: In procedure channel-open-session: Throw to key `guile-ssh-error' with args `("channel-open-session" "Socket e= rror: Unknown error -1" # #f)'. make: *** [Makefile:5726: check-system] Error 1 #+END_SRC I was also able to verify that the store was writeable by staring the VM with the same parameters and running 'guix -i hello'. Apologies for not having something more easily reproducible -- a lot of this configuration came about by running the QEMU tools from the shell. If desired, I can clean it up into a proper commit and push it to my feature branch. Regards, Jakob --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAlz/xWAACgkQ9Qb9Fp2P 2VrDYxAAjIkzN6mTys/jInFHltMVrvfZL0TjKMH5sDo0DfFaPbc9Ko9CemBFhDPi a05BUnZuAxrTHO4F4at22nDZOq72aKczzp4ysoG/yVe0CXOka2PsKZHFYtY3ZnM0 aQPofgg+D/8xjikX1wTvAmLA+XyE6iwBbqgwov/xx7pTkFOvkqxFxXqkwGVlFkYM 4WMSm2nWHtK5wbiRCWlKUxEOQQnjN7zs8CJoStMB7XqqQFDIUM+u1Xx0X6m41eDb B6FDoAB70CINhRYjmRJ62HQZboRTJuYR+0gxFVf2bjudJhq6Zi/ocmtGP2J04LJq ewsUMoV8SO1x43LF7WmR9S0iSWySzovdJvV59pG0pXRmcDm9PYeHaJGm6deX7Q1P iLpKUWHwRYa2tuC+ST8RCImcVQEW5gQzfZyswmRgFqPz8BhyM8pUYg7Fc5gDVEL7 k0tZWYsLoCfLq7TX/PMQfKbj8NgamDz1ciLqGyTerNx3fqj+yvyBc9U1VAQe4qSB pd8Vwg5/oQ8PL57tK7uuc301D1ZGOs6vgL8OtQTDlsX1tMvnlNNbvrl2siWhZ9zC RnOly013bdb5MuuvVr6zWm/jpK6tVBnAoi3kGMVblKGPzMNt9ks5K6oD8C0nbbol e+H7+ks/0WV7leGrxMazyjmuz7PjcTnWWEDKYtDgrx+wERx+zG4= =AdRg -----END PGP SIGNATURE----- --=-=-=--