Re: Running OSTree disk images in systemd-nspawn

On Tue, 2017-02-07 at 15:32 +0000, Philip Withnall wrote:
I’ve been working recently on some changes to systemd-nspawn to get
OSTree disk images running as containers. This hasn’t previously
with images which use the recommended dracut integration (ostree-
prepare-root and sysroot.mount) as systemd-nspawn doesn’t pivot the
user’s chosen OSTree deployment to / in the container’s file system

I’ve added a --pivot-sysroot option to systemd-nspawn which does the
pivot root operation from ostree-prepare-root, so that systemd-nspawn
effectively acts as the initramfs for such a disk image.

What do people think?

It’s been merged to systemd master as --pivot-root, and you now have to
specify the /sysroot, i.e.:

sudo systemd-nspawn -i ~/image.raw \
   --bind +/sysroot/ostree/deploy/$os/var:/var \
   --pivot-root /ostree/deploy/$os/deploy/$checksum.0:/sysroot


Feedback still welcome, as this hasn’t appeared in a systemd release


Attachment: signature.asc
Description: This is a digitally signed message part

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