From unknown Fri Jun 13 11:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39815: Sharing the store between a host and a guest Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 27 Feb 2020 20:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39815 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 39815@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158283533230237 (code B ref -1); Thu, 27 Feb 2020 20:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Feb 2020 20:28:52 +0000 Received: from localhost ([127.0.0.1]:60326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7Pm8-0007rb-JH for submit@debbugs.gnu.org; Thu, 27 Feb 2020 15:28:52 -0500 Received: from lists.gnu.org ([209.51.188.17]:46387) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7Pm6-0007rU-Ui for submit@debbugs.gnu.org; Thu, 27 Feb 2020 15:28:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57649) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7Pm5-0000oi-7I for bug-guix@gnu.org; Thu, 27 Feb 2020 15:28:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7Pm2-0003FJ-QY for bug-guix@gnu.org; Thu, 27 Feb 2020 15:28:48 -0500 Received: from mail.choca.pics ([80.67.172.235]:56468) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7Pm2-00037Q-Hb for bug-guix@gnu.org; Thu, 27 Feb 2020 15:28:46 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id E23F0181929CF for ; Thu, 27 Feb 2020 21:28:36 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id kO_gZad-Xwnr for ; Thu, 27 Feb 2020 21:28:36 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 6E421181929C9 for ; Thu, 27 Feb 2020 21:28:36 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id D65PjeFDx8fy for ; Thu, 27 Feb 2020 21:28:36 +0100 (CET) Received: from luz4 (57.139.120.78.rev.sfr.net [78.120.139.57]) by mail.choca.pics (Postfix) with ESMTPSA id 27E3F18192B26 for ; Thu, 27 Feb 2020 21:28:36 +0100 (CET) From: Damien Cassou Date: Thu, 27 Feb 2020 21:28:34 +0100 Message-ID: <87k147epvx.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 80.67.172.235 X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Hi, `guix system vm` generates a VM which shares /gnu/store with the host. However, the share is done read-only. The info pages recommends copying the VM image and making it writable. Is it possible/recommended to get a writable and shared /gnu/store in the VM? Best, -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill From unknown Fri Jun 13 11:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39815: Sharing the store between a host and a guest Resent-From: raingloom Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 27 Feb 2020 20:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39815 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 39815@debbugs.gnu.org Received: via spool by 39815-submit@debbugs.gnu.org id=B39815.158283564630975 (code B ref 39815); Thu, 27 Feb 2020 20:35:02 +0000 Received: (at 39815) by debbugs.gnu.org; 27 Feb 2020 20:34:06 +0000 Received: from localhost ([127.0.0.1]:60332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7PrC-00083V-8m for submit@debbugs.gnu.org; Thu, 27 Feb 2020 15:34:06 -0500 Received: from mx1.riseup.net ([198.252.153.129]:42656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7PrA-00083L-W7 for 39815@debbugs.gnu.org; Thu, 27 Feb 2020 15:34:05 -0500 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 48T4C02HW2zFf6S for <39815@debbugs.gnu.org>; Thu, 27 Feb 2020 12:34:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1582835644; bh=7pxYlvnALb/e+Pr81cid8KJLi0c3AvPHMyzCOUcaAgk=; h=Date:From:Subject:To:In-Reply-To:References:From; b=Gvy5wY0c+zPyPYaTmUOesUzS7vpmQsLtNZt/wD4xpmV5PDDnuFTFD+E8oaM1WvyYY Rk6boJ6WUXOzDKpxvHy+LftUFpyyK/SZ4Vz3l7rgYCpHmYCCyWNZ5qPDfl3JEQ8E3N aPJS6d+dfhScTDYc2ng37gKg9eeBbLGxiItxkeXw= X-Riseup-User-ID: EF3DE53F42DC6F00F3AF5208E830E0F513F67DBC718F45546364F24282696D01 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 48T4Bz2J0QzJrTf for <39815@debbugs.gnu.org>; Thu, 27 Feb 2020 12:34:02 -0800 (PST) Date: Thu, 27 Feb 2020 21:33:59 +0100 From: raingloom Message-Id: <1582835639.895.0@riseup.net> In-Reply-To: <87k147epvx.fsf@cassou.me> References: <87k147epvx.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Would have to share the connection with the Guix daemon. The VM would see the changes but it could write to the store directly. But that's effectively what you want. When you use guix as a user, the guix command doesn't write to the store, it tells the daemon to do things. Same deal here. On Thu, Feb 27, 2020 at 21:28, Damien Cassou wrote: > Hi, > > `guix system vm` generates a VM which shares /gnu/store with the > host. However, the share is done read-only. The info pages recommends > copying the VM image and making it writable. > > Is it possible/recommended to get a writable and shared /gnu/store in > the VM? > > Best, > > -- > Damien Cassou > > "Success is the ability to go from one failure to another without > losing enthusiasm." --Winston Churchill > > > From unknown Fri Jun 13 11:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39815: Sharing the store between a host and a guest References: <87k147epvx.fsf@cassou.me> In-Reply-To: <87k147epvx.fsf@cassou.me> Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Feb 2020 06:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39815 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 39815@debbugs.gnu.org Received: via spool by 39815-submit@debbugs.gnu.org id=B39815.158287265213486 (code B ref 39815); Fri, 28 Feb 2020 06:51:02 +0000 Received: (at 39815) by debbugs.gnu.org; 28 Feb 2020 06:50:52 +0000 Received: from localhost ([127.0.0.1]:60562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7ZU4-0003VS-2Z for submit@debbugs.gnu.org; Fri, 28 Feb 2020 01:50:52 -0500 Received: from mail.choca.pics ([80.67.172.235]:55876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7ZU2-0003VJ-6b for 39815@debbugs.gnu.org; Fri, 28 Feb 2020 01:50:50 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 6FE67181929CF for <39815@debbugs.gnu.org>; Fri, 28 Feb 2020 07:50:48 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id rYVxwnLcaija for <39815@debbugs.gnu.org>; Fri, 28 Feb 2020 07:50:48 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id E4FBA181929C9 for <39815@debbugs.gnu.org>; Fri, 28 Feb 2020 07:50:47 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id rq74NV5Kx49l for <39815@debbugs.gnu.org>; Fri, 28 Feb 2020 07:50:47 +0100 (CET) Received: from luz4 (57.139.120.78.rev.sfr.net [78.120.139.57]) by mail.choca.pics (Postfix) with ESMTPSA id A846618192B26 for <39815@debbugs.gnu.org>; Fri, 28 Feb 2020 07:50:47 +0100 (CET) From: Damien Cassou Date: Fri, 28 Feb 2020 07:50:46 +0100 Message-ID: <87eeufdx2x.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, I kept experimenting. I can't manage to install anything in the VM: $ guix pull Updating channel 'guix' from Git repository at 'file:///home/cassou/...' guix pull: error: Git error: failed to mmap. Could not write data: Invalid argument The folder at 'file:///home/cassou/...' contains a git clone of Guix repository and the VM has read-write access to it. $ mount | grep /gnu/store /dev/vda1 on /gnu/store type ext4 (ro,relatime) I don't understand why /gnu/store is mounted read-only. Also, I haven't done that myself. $ cat ./build-vm.sh #!/bin/sh FILE=$(guix system vm-image ./current.scm --save-provenance --image-size=6G --share=/home/cassou=/mnt/host-home) cp -f "$FILE" ./image.qcow2 $ cat ./start-vm.sh #!/bin/sh qemu-system-x86_64 \ -nic user,model=virtio-net-pci \ -enable-kvm \ -m 4G \ -device virtio-blk,drive=myhd \ -drive if=none,file=./image.qcow2,id=myhd \ -virtfs local,path="/home/cassou",security_model=none,mount_tag="host-home" \ -virtfs local,path="./share/home",security_model=none,mount_tag="guest-home" As you can see, I'm not even trying to share the store. Moreover, I think the --share option passed to `guix system vm-image` above doesn't do anything. If it is the case, I would expect the command to complain about the unknown parameter. Can anyone please give me a clue as to what is happening and why? Is there a way I can install applications in my VM? -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill From unknown Fri Jun 13 11:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39815: Sharing the store between a host and a guest Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Feb 2020 21:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39815 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Damien Cassou Cc: 39815@debbugs.gnu.org Received: via spool by 39815-submit@debbugs.gnu.org id=B39815.15829240828079 (code B ref 39815); Fri, 28 Feb 2020 21:09:02 +0000 Received: (at 39815) by debbugs.gnu.org; 28 Feb 2020 21:08:02 +0000 Received: from localhost ([127.0.0.1]:33856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7mrZ-00026A-NV for submit@debbugs.gnu.org; Fri, 28 Feb 2020 16:08:01 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:51297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7mrY-00025s-Qs for 39815@debbugs.gnu.org; Fri, 28 Feb 2020 16:08:01 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 1391DE93; Fri, 28 Feb 2020 16:07:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 28 Feb 2020 16:07:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=mesmtp; bh=N3g5jHKTCPitY2u+9e3wWM1MqX6jU4EIF5LQKa+8628=; b=SYKWIhjUubhj qHqbv4cTg5yhSsV61rE45Zn8mQ7hLaepthXtuAroW5eqf6F9ly0ZWlyTAxnEIrUu D+H/mESRUjvvEg1EKHMg+AkgGPGWYPMTQjHqEYPlLVs+qYEO1fx7B3Vc7KnrShNv YUZqyICJgL6Spnj6h+Xpw0p9qceEFdU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=N3g5jHKTCPitY2u+9e3wWM1MqX6jU4EIF5LQKa+86 28=; b=R9198pW3+UCGBUaFCWOO1JPpVrvPyURNqoPx2ef3JCs/zhBMU43x/pzL4 7zNgP/tzbclUOf2SPZZ2lPpoxlUKGCStWhytvVcEgs+GZqRl/hQMx5OiObWtty9p DLvQUksTnMXUaIUKSx36dLxAhT9as8u198hAjEC8X1+patfqp3mbTjq1MREBMLmo nV2ifA/iycls+nG7xDiIBfROx4x6ROqnzI7TkekEZVvBcdZPx8GZlrAc04Yt6q3S yvSz8a1Hlnf2+5OaMvFrZKdtH/R9uSGDWCJqPyshx4VOaN76mODuklP5CKdJXBLd cIVbAxKMbHUIP/R3QaHUhg5ci7xIg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrleekgddugeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtugfgjgesthekredttddtjeenucfhrhhomhepnfgvohcu hfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecukfhppeejie druddvgedrudefkedrieefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63]) by mail.messagingengine.com (Postfix) with ESMTPA id EF1D83060FD3; Fri, 28 Feb 2020 16:07:53 -0500 (EST) Date: Fri, 28 Feb 2020 16:07:53 -0500 From: Leo Famulari Message-ID: <20200228210753.GA30122@jasmine.lan> References: <87k147epvx.fsf@cassou.me> <87eeufdx2x.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87eeufdx2x.fsf@cassou.me> X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Damien, Currently Guix does not include tools to support your use case of "writable and shared /gnu/store in the VM". `guix system container` might be useful but the isolation guarantees are weaker than with QEMU. However, QEMU is not bulletproof either. The recommended way to get a writeable store in a VM is to use `guix system vm-image`, copy the image out of /gnu/store, make it writeable with `chmod`, and then run it in QEMU. This will not share the store with the host. As you found, what you get with `guix system vm` is read-only. Even though you copied build-vm.sh out of /gnu/store, it is just a shell script that refers to immutable data in the host /gnu/store. In order to share the store with a VM, you would need to also share the store database — at least /var/guix/db if not all of /var/guix — and also use the host's guix-daemon. It would be great to support your use case but I don't think anyone has worked on it yet. Leo From unknown Fri Jun 13 11:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39815: Sharing the store between a host and a guest Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Feb 2020 14:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39815 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Leo Famulari Cc: 39815@debbugs.gnu.org Received: via spool by 39815-submit@debbugs.gnu.org id=B39815.158298550213327 (code B ref 39815); Sat, 29 Feb 2020 14:12:01 +0000 Received: (at 39815) by debbugs.gnu.org; 29 Feb 2020 14:11:42 +0000 Received: from localhost ([127.0.0.1]:34356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j82qE-0003Ss-8S for submit@debbugs.gnu.org; Sat, 29 Feb 2020 09:11:42 -0500 Received: from mail.choca.pics ([80.67.172.235]:55518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j82qB-0003Sj-Ou for 39815@debbugs.gnu.org; Sat, 29 Feb 2020 09:11:40 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id CF08C181929C9; Sat, 29 Feb 2020 15:11:37 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id WyT2KDTlT9PS; Sat, 29 Feb 2020 15:11:37 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 45F51181929CF; Sat, 29 Feb 2020 15:11:37 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id PqwbvD_a9bJn; Sat, 29 Feb 2020 15:11:27 +0100 (CET) Received: from luz4 (57.139.120.78.rev.sfr.net [78.120.139.57]) by mail.choca.pics (Postfix) with ESMTPSA id 470D8181929C9; Sat, 29 Feb 2020 15:11:27 +0100 (CET) From: Damien Cassou In-Reply-To: <20200228210753.GA30122@jasmine.lan> References: <87k147epvx.fsf@cassou.me> <87eeufdx2x.fsf@cassou.me> <20200228210753.GA30122@jasmine.lan> Date: Sat, 29 Feb 2020 15:11:25 +0100 Message-ID: <87ftet32lu.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi L=C3=A9o, Leo Famulari writes: > Currently Guix does not include tools to support your use case of > "writable and shared /gnu/store in the VM" [=E2=80=A6] Thank you very much for your extensive explanation. I understand things better now. --=20 Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill From unknown Fri Jun 13 11:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39815: Sharing the store between a host and a guest Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 08 Mar 2020 22:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39815 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Leo Famulari Cc: Damien Cassou , 39815@debbugs.gnu.org Received: via spool by 39815-submit@debbugs.gnu.org id=B39815.158370579028116 (code B ref 39815); Sun, 08 Mar 2020 22:17:01 +0000 Received: (at 39815) by debbugs.gnu.org; 8 Mar 2020 22:16:30 +0000 Received: from localhost ([127.0.0.1]:49437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jB4Dl-0007JQ-NU for submit@debbugs.gnu.org; Sun, 08 Mar 2020 18:16:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jB4Dh-0007J9-9y for 39815@debbugs.gnu.org; Sun, 08 Mar 2020 18:16:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jB4Db-0001ET-Nh; Sun, 08 Mar 2020 18:16:19 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36954 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jB4Db-0000z8-B7; Sun, 08 Mar 2020 18:16:19 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87k147epvx.fsf@cassou.me> <87eeufdx2x.fsf@cassou.me> <20200228210753.GA30122@jasmine.lan> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 =?UTF-8?Q?Vent=C3=B4se?= an 228 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 08 Mar 2020 23:16:17 +0100 In-Reply-To: <20200228210753.GA30122@jasmine.lan> (Leo Famulari's message of "Fri, 28 Feb 2020 16:07:53 -0500") Message-ID: <87d09m7ary.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi! Leo Famulari skribis: > As you found, what you get with `guix system vm` is read-only. Even > though you copied build-vm.sh out of /gnu/store, it is just a shell > script that refers to immutable data in the host /gnu/store. > > In order to share the store with a VM, you would need to also share the > store database =E2=80=94 at least /var/guix/db if not all of /var/guix = =E2=80=94 and > also use the host's guix-daemon. > > It would be great to support your use case but I don't think anyone has > worked on it yet. Unfortunately, the Unix-domain socket in /var/guix/daemon-socket cannot be shared over 9p AFAICS (with =E2=80=98guix system vm --expose=E2=80=99). However, one thing that could work is to: 1. in the guest, set GUIX_DAEMON_SOCKET=3Dguix://localhost:1234; 2. set up QEMU port forwarding such that the guest=E2=80=99s port 1234 is somehow redirected to a port the host guix-daemon listens to (with =E2=80=98--listen=E2=80=99); 3. share /var/guix with the guest. It would be easier if Unix-domain sockets could be forwarded between the host and the guest, but that doesn=E2=80=99t seem to be the case. :-/ Ludo=E2=80=99. From unknown Fri Jun 13 11:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39815: Sharing the store between a host and a guest Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 09 Mar 2020 13:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39815 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Leo Famulari Cc: 39815@debbugs.gnu.org Received: via spool by 39815-submit@debbugs.gnu.org id=B39815.158375883810478 (code B ref 39815); Mon, 09 Mar 2020 13:01:01 +0000 Received: (at 39815) by debbugs.gnu.org; 9 Mar 2020 13:00:38 +0000 Received: from localhost ([127.0.0.1]:49971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBI1O-0002iu-8Q for submit@debbugs.gnu.org; Mon, 09 Mar 2020 09:00:38 -0400 Received: from mail.choca.pics ([80.67.172.235]:45006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBI1M-0002ik-GL for 39815@debbugs.gnu.org; Mon, 09 Mar 2020 09:00:37 -0400 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 04B9118192B26; Mon, 9 Mar 2020 14:00:35 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id mvGiY7OJM0B3; Mon, 9 Mar 2020 14:00:34 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 14BB9181929C9; Mon, 9 Mar 2020 14:00:34 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id ed-3VK8MZxC3; Mon, 9 Mar 2020 14:00:33 +0100 (CET) Received: from luz4 (lfbn-ren-1-1414-74.w90-27.abo.wanadoo.fr [90.27.133.74]) by mail.choca.pics (Postfix) with ESMTPSA id C2C3618192B26; Mon, 9 Mar 2020 14:00:33 +0100 (CET) From: Damien Cassou In-Reply-To: <87d09m7ary.fsf@gnu.org> References: <87k147epvx.fsf@cassou.me> <87eeufdx2x.fsf@cassou.me> <20200228210753.GA30122@jasmine.lan> <87d09m7ary.fsf@gnu.org> Date: Mon, 09 Mar 2020 14:00:32 +0100 Message-ID: <87mu8plm33.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > However, one thing that could work is to: > > 1. in the guest, set GUIX_DAEMON_SOCKET=3Dguix://localhost:1234; > > 2. set up QEMU port forwarding such that the guest=E2=80=99s port 1234 = is > somehow redirected to a port the host guix-daemon listens to (with > =E2=80=98--listen=E2=80=99); > > 3. share /var/guix with the guest. > > It would be easier if Unix-domain sockets could be forwarded between the > host and the guest, but that doesn=E2=80=99t seem to be the case. :-/ thank you Ludovic. --=20 Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill