all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Port forwarding and `guix system vm`
@ 2020-07-07 18:16 Christopher Lemmer Webber
  2020-07-07 19:59 ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Lemmer Webber @ 2020-07-07 18:16 UTC (permalink / raw)
  To: help-guix

Hello!

I've been trying to figure out how to do port forwarding with
`guix system vm` and have not (alas) yet succeeded.

Here's what I've tried so far:

  # testing forwarding http
  `guix system vm guix-config-dustycloud.scm --share=$HOME/tmp/guix-vm-exchange=/exchange` -nic hostfwd=tcp::8088-:80
  # testing forwarding ssh
  `guix system vm guix-config-dustycloud.scm --share=$HOME/tmp/guix-vm-exchange=/exchange` -nic hostfwd=tcp::10022-:22

In both the case of trying to ssh and trying to access via a web
browser, it just hangs.

I can also add all the rest of the -nic stuff the manual recommends:

  `guix system vm guix-config-dustycloud.scm --share=$HOME/tmp/guix-vm-exchange=/exchange` -nic user,model=virtio-net-pci,hostfwd=tcp::8088-:80

... same problem.  (However, it looks like the script adds the
virtio-net-pci and stuff these days, so I'm not sure that stuff is
necessary...)

Any ideas?

config looks like:

  (operating-system
    (host-name "dustycloud")
    (timezone "America/")
    (locale "en_US.UTF-8")

    ;; TODO: this will need to switch out depending on if this is in a local VM or not
    (bootloader (grub-configuration (target "/dev/sda")))
    (file-systems (cons (file-system
                          (device "/dev/sda1")
                          (mount-point "/")
                          (type "ext4"))
                        %base-file-systems))

    (users (cons (user-account
                  (name "cwebber")
                  (group "users")
                  ;; Adding the account to the "wheel" group
                  ;; makes it a sudoer.
                  (supplementary-groups '("wheel"))
                  (home-directory "/home/cwebber"))
                 %base-user-accounts))

    (packages (cons* tcpdump
                     nss-certs         ;for HTTPS access
                     gnutls
                     git
                     rsync
                     openssh
                     lynx
                     %base-packages))

    (services (cons* (service openssh-service-type
                              (openssh-configuration
                               (password-authentication? #f)
                               (authorized-keys
                                `(("cwebber" ,(local-file "/home/cwebber/.ssh/id_rsa.pub"))))))
                     (service mcron-service-type
                              (mcron-configuration (jobs (list %gc-job))))
                     (service nginx-service-type
                              (nginx-configuration
                               (server-blocks
                                (list (nginx-server-configuration
                                       (server-name '("www.dustycloud.org" "dustycloud.org"))
                                       (root "/srv/http/dustycloud.org")
                                       (listen '("80")))))))
                     %base-services)))


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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-07 18:16 Port forwarding and `guix system vm` Christopher Lemmer Webber
2020-07-07 19:59 ` Jan Nieuwenhuizen
2020-07-07 20:18   ` Christopher Lemmer Webber
2020-07-07 23:21     ` Christopher Lemmer Webber

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.