guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to boot GuixSD in LXD


From: David Braun
Subject: How to boot GuixSD in LXD
Date: Sat, 17 Dec 2016 17:49:35 -0500

Hi,

I just discovered GuixSD; it's very exciting!  I want to boot it as a virtual machine in LXD (https://www.ubuntu.com/cloud/lxd).

So far I've created a LXD image by using the GuixSD installer to create a bare bones file system.  Here's my etc/config.scm:

;; This is an operating system configuration template
;; for a "bare bones" setup, with no X11 display server.

(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules admin)

(operating-system
  (host-name "GuixSD")
  (timezone "Etc/UTC")
  (locale "en_US.UTF-8")

  ;; Assuming /dev/sdX is the target hard disk, and "my-root" is
  ;; the label of the target root file system.
  (bootloader (grub-configuration (device "/dev/sda")))
  (file-systems (cons (file-system
                        (device "my-root")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))

  ;; Add services to the baseline: a DHCP client and
  ;; an SSH server.
  (services (cons* (dhcp-client-service)
                   (lsh-service #:port-number 2222)
                   %base-services)))

and my LXD metadata.yaml:

architecture: x86_64
creation_date: 1481846400
properties:
  description: GuixSD 0.11.0 bare bones x86_64
  os: GuixSD
  release: 0.11.0

Now when I attempt to launch the image, LXD fails when it tries to start /sbin/init and can't find it.  I understand that GuixSD uses Shepherd instead of init.  What's the best way for me to configure the image so that LXD can start it?  Perhaps I should create a symlink at /sbin/init that points to shepherd but I'm not sure if I should take the initrd into account as well.

Thanks,
David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]