[lxc-users] Fedora 20 template on LVM not working

Michael H. Warfield mhw at WittsEnd.com
Thu May 8 15:06:01 UTC 2014


On Thu, 2014-05-08 at 08:54 +0200, Flo wrote:
> Hi,
> 
> 
> is the Fedora template currently broken? I tried to create a LVM based
> Fedora 20 container but it looks like the template gets confused with
> lvm...
> 
> 
> lxc-create -n ipa01-test -B lvm --vgname=lxc1 --fssize=30G --thinpool thin_pool -t fedora -- --release 20

> Complete!
> Fixing up rpm databases
> Download complete.
> Copy /var/cache/lxc/fedora/x86_64/20/rootfs to /dev/lxc1/ipa01-test ... 
> Copying rootfs to /dev/lxc1/ipa01-test ...mkdir: cannot create directory ‘/dev/lxc1/ipa01-test’: File exists
> rsync: ERROR: cannot stat destination "/dev/lxc1/ipa01-test/": Not a directory (20)
> rsync error: errors selecting input/output files, dirs (code 3) at main.c(652) [Receiver=3.1.0]

Yeah, that can't work.  /dev/lxc1 is the path to the directory for the
vg but it's going to contain symlinks to the devmapper devices, not a
directory that can be copied into.  So that /dev/lxc1/ipa01-test" rootfs
path doesn't make sense...  But that rootfs value is passed to the
template from lxc-create.  In the case that it's not passed (which
should be never) it's an automatically generated path of
$cfg_dir/rootfs, which is obviously not the case here.

Just took a peek at the Ubuntu and the Oracle template and they're doing
the same thing.  The Oracle template has a little bit more in it for
btrfs subvolumes but that's a different story.

I think Serge or Stéphane is going to have to chime in on this because I
don't see how it's suppose to work.  There's something broken in the
setup of that rootfs path but I'm just not seeing it.
> 
> mkdir: cannot create directory ‘/dev/lxc1/ipa01-test’: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 132: /dev/lxc1/ipa01-test/selinux/enforce: Not a directory
> sed: can't read /dev/lxc1/ipa01-test/etc/pam.d/login: Not a directory
> sed: can't read /dev/lxc1/ipa01-test/etc/pam.d/sshd: Not a directory
> cp: failed to access ‘/dev/lxc1/ipa01-test/etc/localtime’: Not a
> directory
> /usr/share/lxc/templates/lxc-fedora: line
> 218: /dev/lxc1/ipa01-test/etc/sysconfig/network-scripts/ifcfg-eth0:
> Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 229: /dev/lxc1/ipa01-test/etc/sysconfig/network: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 236: /dev/lxc1/ipa01-test/etc/hostname: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 240: /dev/lxc1/ipa01-test/etc/hosts: Not a directory
> mkdir: cannot create directory ‘/dev/lxc1/ipa01-test’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-jobs2-prodm/dev/null’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-jobs2-prodm/dev/zero’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-jobs2-prodm/dev/random’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-jobs2-prodm/dev/urandom’: Not a directory
> mkdir: cannot create directory ‘/dev/lxc1/ipa01-test/dev/pts’: Not a
> directory
> mkdir: cannot create directory ‘/dev/lxc1/ipa01-test/dev/shm’: Not a
> directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/tty’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/tty0’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/tty1’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/tty2’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/tty3’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/tty4’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/console’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/full’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/initctl’: Not a directory
> mknod: ‘/dev/lxc1/ipa01-test/dev/ptmx’: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 275: /dev/lxc1/ipa01-test/etc/securetty: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 276: /dev/lxc1/ipa01-test/etc/securetty: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 277: /dev/lxc1/ipa01-test/etc/securetty: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 278: /dev/lxc1/ipa01-test/etc/securetty: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 279: /dev/lxc1/ipa01-test/etc/securetty: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 280: /dev/lxc1/ipa01-test/etc/securetty: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 281: /dev/lxc1/ipa01-test/etc/securetty: Not a directory
> /usr/share/lxc/templates/lxc-fedora: line
> 282: /dev/lxc1/ipa01-test/etc/securetty: Not a directory
> Storing root password in '/var/lib/lxc/ipa01-test/tmp_root_pass'
> chroot: cannot change root directory to /dev/lxc1/ipa01-test: Not a
> directory
> chroot: cannot change root directory to /dev/lxc1/ipa01-test: Not a
> directory
> installing fedora-release package
> mount: mount point /dev/lxc1/ipa01-test/dev is not a directory
> mount: mount point /dev/lxc1/ipa01-test/proc is not a directory
> cp: failed to access ‘/dev/lxc1/ipa01-test/etc/’: Not a directory
> chroot: cannot change root directory to /dev/lxc1/ipa01-test: Not a
> directory
> chroot: cannot change root directory to /dev/lxc1/ipa01-test: Not a
> directory
> chroot: cannot change root directory to /dev/lxc1/ipa01-test: Not a
> directory
> umount: /dev/lxc1/ipa01-test/proc: Not a directory
> umount: /dev/lxc1/ipa01-test/dev: Not a directory
> touch: cannot touch ‘/dev/lxc1/ipa01-test/etc/fstab’: Not a directory
> sed: can't read /dev/lxc1/ipa01-test/etc/sysconfig/init: Not a
> directory
> 
> 
> Container rootfs and config have been created.
> Edit the config file to check/enable networking setup.
> 
> 
> You have successfully built a Fedora container and cache.  This cache
> may
> be used to create future containers of various revisions.  The
> directory
> /var/cache/lxc/fedora/x86_64/bootstrap contains a bootstrap
> which may no longer needed and can be removed.
> 
> 
> A LiveOS directory exists at /var/cache/lxc/fedora/x86_64/LiveOS.
> This is only used in the creation of the bootstrap
> run-time-environment
> and may be removed.
> 
> 
> The temporary root password is stored in:
> 
> 
>         '/var/lib/lxc/ipa01-test/tmp_root_pass'
> 
> 
> 
> 
> The root password is set up as expired and will require it to be
> changed
> at first login, which you should do as soon as possible.  If you lose
> the
> root password or wish to change it without starting the container, you
> can change it from the host by running the following command (which
> will
> also reset the expired flag):
> 
> 
>         chroot /dev/lxc1/ipa01-test passwd
> 
> 
> 
> -- 
> This message has been scanned for viruses and 
> dangerous content by MailScanner, and is 
> believed to be clean. 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140508/800f55b8/attachment.sig>


More information about the lxc-users mailing list