unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to ssh to a QEMU XFCE desktop vm-image?
@ 2018-02-26  3:37 George myglc2 Clemmer
  2018-02-26 16:51 ` Chris Marusich
  0 siblings, 1 reply; 3+ messages in thread
From: George myglc2 Clemmer @ 2018-02-26  3:37 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]

I have ssh working to a server image ...

nemo:~ $ ssh g1@server02.local
Last login: Sun Feb 25 22:11:42 2018 from fe80::1ccf:c589:7e5f:a21f%eth0

... but not to a similar xFCE desktop VM image ...

nemo:~ $ ssh g1@desktop01.local -vvv
OpenSSH_7.6p1, LibreSSL 2.6.2
debug1: Reading configuration data /Users/glc/.ssh/config
debug1: /Users/glc/.ssh/config line 48: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to desktop01.local port 22.
ssh: connect to host desktop01.local port 22: Connection refused

The VMs are built like this ...

	time guix system vm-image -M 4 -c 4 \
	     --image-size=5GB $VMDIR/$NAME.scm

The server runs this way ...

	sudo qemu-system-x86_64 \
	    -name $NAME \
	    -net tap,ifname=$NAME,script=$PWD/qemu-ifup,downscript=$PWD/qemu-ifdn \
	    -net nic,model=virtio,macaddr=$MACADDR \
	    -enable-kvm \
	    -m 5120 \
	    -daemonize \
	    -display none \
	    $VMDIR/vm.img

I run the desktop this way ...

	sudo qemu-system-x86_64 \
	    -name $NAME \
	    -net tap,ifname=$NAME,script=$PWD/qemu-ifup,downscript=$PWD/qemu-ifdn \
	    -net nic,model=virtio,macaddr=$MACADDR \
	     -enable-kvm \
	     -m 5120 \
	     -k en-us \
	     -vga qxl \
	     -spice addr=127.0.0.1,port=3001,disable-ticketing \
	     -device virtio-serial \
	     -chardev spicevmc,id=vdagent,debug=0,name=vdagent \
	     -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
	     -daemonize \
	     $VMDIR/vm.img

... and can log in using the SPICE remote-viewer.

How do I enable ssh in to the desktop VM?

TIA - George


[-- Attachment #2: desktop --]
[-- Type: application/octet-stream, Size: 1540 bytes --]

;;; desktop v1 config
(use-modules (gnu))
(use-modules (gnu system nss))
(use-service-modules ssh) ; openssh-service-type
(use-service-modules spice)
(use-service-modules desktop)
(use-service-modules networking) ; dhcp-client-service
(use-package-modules
 base                  ; glibc-utf8-locales
 certs                 ; nss-certs
 emacs
 gnome                 ; gvfs
 linux                 ; mdadm
 screen
 ssh                   ; openssh mosh
 xorg
 )
(operating-system
  (host-name "v1")
  (timezone "America/New_York")
  (locale "en_US.utf8")
  (bootloader (grub-configuration (target "/dev/sda")))
  (file-systems (cons (file-system
			(device "g1sd")
			(title 'label)
			(mount-point "/")
			(type "ext4"))
		      %base-file-systems))
  (users (cons*
	  (user-account
	   (name "g1")
	   (group "users")
	   (supplementary-groups '("wheel" "netdev"))
	   (home-directory "/home/g1"))
	  %base-user-accounts))
  (packages
   (cons*
    emacs-no-x-toolkit
    emacs-guix
    gvfs              ;for user mounts
    nss-certs         ;for HTTPS access
    openssh
    screen
    xauth
    %base-packages))
  (services (cons*
	     (service openssh-service-type
		      (openssh-configuration
		       (x11-forwarding? #t)
		       (permit-root-login #t)
		       (authorized-keys
			`(
			  ("g1" ,(local-file "glc.pub"))
			  ("al" ,(local-file "glc.pub"))
			  ("root" ,(local-file "glc.pub"))))))
	     (spice-vdagent-service)
	     (xfce-desktop-service)
	     %desktop-services))
  (name-service-switch %mdns-host-lookup-nss))

[-- Attachment #3: server --]
[-- Type: application/octet-stream, Size: 1533 bytes --]

;;; server v1 config
(use-modules (gnu))
(use-modules (gnu system nss))
(use-service-modules ssh) ; openssh-service-type
(use-service-modules avahi)
(use-service-modules networking) ; dhcp-client-service
(use-package-modules
 base                  ; glibc-utf8-locales
 certs                 ; nss-certs
 emacs
 gnome                 ; gvfs
 linux                 ; mdadm
 screen
 ssh                   ; openssh mosh
 xorg
 )
(operating-system
  (host-name "v1")
  (timezone "America/New_York")
  (locale "en_US.utf8")
  (bootloader (grub-configuration (target "/dev/sda")))
  (file-systems (cons (file-system
			(device "g1sd")
			(title 'label)
			(mount-point "/")
			(type "ext4"))
		      %base-file-systems))
  (users (cons*
	  (user-account
	   (name "g1")
	   (group "users")
	   (supplementary-groups '("wheel"))
	   (home-directory "/home/g1"))
	  %base-user-accounts))
  (packages
   (cons*
    emacs-no-x-toolkit
    emacs-guix
    glibc-utf8-locales
    gvfs              ;for user mounts
    nss-certs         ;for HTTPS access
    openssh
    screen
    xauth
    %base-packages))
  (services (cons*
  	     (dhcp-client-service)
	     (service openssh-service-type
		      (openssh-configuration
		       (x11-forwarding? #t)
		       (permit-root-login #t)
		       (authorized-keys
			`(
			  ("g1" ,(local-file "glc.pub"))
			  ("al" ,(local-file "glc.pub"))
			  ("root" ,(local-file "glc.pub"))))))
	     (avahi-service)
	     (ntp-service)
	     %base-services))
  (name-service-switch %mdns-host-lookup-nss))

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

* Re: How to ssh to a QEMU XFCE desktop vm-image?
  2018-02-26  3:37 How to ssh to a QEMU XFCE desktop vm-image? George myglc2 Clemmer
@ 2018-02-26 16:51 ` Chris Marusich
  2018-02-26 18:41   ` George myglc2 Clemmer
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Marusich @ 2018-02-26 16:51 UTC (permalink / raw)
  To: George myglc2 Clemmer; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

George myglc2 Clemmer <myglc2@gmail.com> writes:

> I have ssh working to a server image ...
>
> nemo:~ $ ssh g1@server02.local
> Last login: Sun Feb 25 22:11:42 2018 from fe80::1ccf:c589:7e5f:a21f%eth0
>
> ... but not to a similar xFCE desktop VM image ...
>
> nemo:~ $ ssh g1@desktop01.local -vvv
> OpenSSH_7.6p1, LibreSSL 2.6.2
> debug1: Reading configuration data /Users/glc/.ssh/config
> debug1: /Users/glc/.ssh/config line 48: Applying options for *
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: /etc/ssh/ssh_config line 48: Applying options for *
> debug2: ssh_connect_direct: needpriv 0
> debug1: Connecting to desktop01.local port 22.
> ssh: connect to host desktop01.local port 22: Connection refused

Could it be that perhaps ssh daemon failed to start?  Several people
have observed that failure mode, but nobody has been able to reproduce
it consistently in a VM yet, which has made troubleshooting difficult:

https://lists.gnu.org/archive/html/help-guix/2018-02/msg00022.html

Check the logs in /var/log/shepherd.log.  If you're suffering from this
problem, Shepherd will say that it failed to start ssh-daemon.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: How to ssh to a QEMU XFCE desktop vm-image?
  2018-02-26 16:51 ` Chris Marusich
@ 2018-02-26 18:41   ` George myglc2 Clemmer
  0 siblings, 0 replies; 3+ messages in thread
From: George myglc2 Clemmer @ 2018-02-26 18:41 UTC (permalink / raw)
  To: Chris Marusich; +Cc: help-guix


On 02/26/2018 at 16:51 Chris Marusich writes:

> George myglc2 Clemmer <myglc2@gmail.com> writes:
>
>> I have ssh working to a server image ...
>>
>> nemo:~ $ ssh g1@server02.local
>> Last login: Sun Feb 25 22:11:42 2018 from fe80::1ccf:c589:7e5f:a21f%eth0
>>
>> ... but not to a similar xFCE desktop VM image ...
>>
>> nemo:~ $ ssh g1@desktop01.local -vvv
>> OpenSSH_7.6p1, LibreSSL 2.6.2
>> debug1: Reading configuration data /Users/glc/.ssh/config
>> debug1: /Users/glc/.ssh/config line 48: Applying options for *
>> debug1: Reading configuration data /etc/ssh/ssh_config
>> debug1: /etc/ssh/ssh_config line 48: Applying options for *
>> debug2: ssh_connect_direct: needpriv 0
>> debug1: Connecting to desktop01.local port 22.
>> ssh: connect to host desktop01.local port 22: Connection refused
>
> Could it be that perhaps ssh daemon failed to start?  Several people
> have observed that failure mode, but nobody has been able to reproduce
> it consistently in a VM yet, which has made troubleshooting difficult:
>
> https://lists.gnu.org/archive/html/help-guix/2018-02/msg00022.html
>
> Check the logs in /var/log/shepherd.log.  If you're suffering from this
> problem, Shepherd will say that it failed to start ssh-daemon.

Thanks, yes that's it. It looks reproducible. I'll report a bug. -
George

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

end of thread, other threads:[~2018-02-26 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26  3:37 How to ssh to a QEMU XFCE desktop vm-image? George myglc2 Clemmer
2018-02-26 16:51 ` Chris Marusich
2018-02-26 18:41   ` George myglc2 Clemmer

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).