unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42252: Not possible to reliably port forward with "guix system vm" anymore
@ 2020-07-07 20:40 Christopher Lemmer Webber
  2020-07-07 21:00 ` Christopher Lemmer Webber
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christopher Lemmer Webber @ 2020-07-07 20:40 UTC (permalink / raw)
  To: 42252

In commit 5379392731b52eef22b4936637eb592b93e04318, the following change
was introduced:

  modified   gnu/system/vm.scm
  @@ -941,6 +941,7 @@ with '-virtfs' options for the host file systems listed in SHARED-FS."
               '())
   
        "-no-reboot"
  +     "-nic" "user,model=virtio-net-pci"
        "-object" "rng-random,filename=/dev/urandom,id=guixsd-vm-rng"
        "-device" "virtio-rng-pci,rng=guixsd-vm-rng"

Unfortunately, this means that in our docs where we suggest doing the
following:

  `guix system vm config.scm` -nic user,model=virtio-net-pci,hostfwd=tcp::10022-:22

Since we now provide our own similar "-nic" field this creates a
*second* network interface at the same address and there is a race as in
terms of which handles connections.  Depending on the race result,
connections to the forwarded port may hang indefinitely.

Ironically, this regression was introduced to solve another regression!
From the commit message:

  This fixes a regression introduced in 8e53fe2b91d2776bc1529e7b34967c8f1d9edc32
  where 'guix system vm' would no longer be using virtio.

What's the right solution?  One could be that "guix system vm" itself
could take an argument that sets up port forwarding in the generated
shell script.  Eg:

  guix system vm config.scm --hostfwd=tcp::10022-:22 --hostfwd=tcp::8888-:80

kind of ugly, but it could work.  WDYT?

 - Chris




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-11 21:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-07 20:40 bug#42252: Not possible to reliably port forward with "guix system vm" anymore Christopher Lemmer Webber
2020-07-07 21:00 ` Christopher Lemmer Webber
2020-07-07 22:21   ` Christopher Lemmer Webber
2020-07-08  9:46 ` Bengt Richter
2020-07-11 19:49   ` Christopher Lemmer Webber
2020-07-11 21:38 ` Marius Bakke

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).