I have a headless server running Guix/Debian 8.3 on which I would like
to run some guix vms. So far, I have a script (see mkvm.sh, attached)
that runs a single vm. It has some issues:
1) lsh-service hangs waiting for keystrokes on the QEMU console
2) passwords need to be set in the QEMU console
3) on the vm, 'guix package -i' throws an error, e.g.,
(on the console)
v1 login: u1
password: <password>
$ guix package -i
accepted connection from pid 390, user u1
guix package: error: build failed: changing ownership of '/path/store':
Read-only file system
4) I can't log in to the vm like I expected, e.g. 'ssh [email protected]'
times out
5) I would like to have the user 'u1' share read/write access to the
$HOME directory and be able to use $HOME/.ssh credentials
Your suggestions &/or sample configurations would be most welcome.
TIA - George
PS I am running this guix git checkout ...
* master d6e374a gnu: mafft: Update to
7.299.
#!/bin/bash
# make and run a Guix VM
set -x
VMNUM=1
tmpdir=vm$VMNUM
rm -fr $tmpdir
mkdir $tmpdir
# vm.config
cat > "$tmpdir/vm.scm"<<EOF
(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules admin
disk
ssh rsync wget screen
version-control
emacs
xorg certs
graphviz
package-management
)
(operating-system
(host-name "v1")
(timezone "America/New_York")
(locale "en_US.utf8")
(bootloader (grub-configuration (device "/dev/sda")))
(file-systems (cons (file-system
(device "g1sd")
(title 'label)
(mount-point "/")
(type "ext4"))
%base-file-systems))
(users (cons* (user-account
(name "u1")
(comment "u 1")
(group "users")
(supplementary-groups '("wheel"))
(home-directory "/home/u1"))
%base-user-accounts))
(packages
(cons*
glibc-utf8-locales
parted
openssh nss-certs xauth rsync wget git git-manpages
emacs magit screen
graphviz
guix
%base-packages
)
)
(services (cons* (dhcp-client-service)
(lsh-service #:root-login? #t)
%base-services)))
EOF
# show guix version
# guix system --version
(stat $HOME/.config/guix/latest | grep File:)
git -C ~/.config/guix/latest branch -av | grep '* master'
make -C $HOME/.config/guix/latest -s
# make vm & run
# Note: '-k en-us' is a hack to get Mac XQuartz keys to sort of work
$(guix system vm $tmpdir/vm.scm --expose=$HOME --share=$HOME/tmp=/exchange) -k en-us