Public bug reported: Container clones made by lxc-clone is not bootable. New container config misses lxc.rootfs. lxc.network.hwaddr is the same as in original container.
# lsb_release -rd Description: Ubuntu 13.04 Release: 13.04 # apt-cache policy lxc lxc: Installed: 0.9.0-0ubuntu3 Candidate: 0.9.0-0ubuntu3 Version table: *** 0.9.0-0ubuntu3 0 500 http://ru.archive.ubuntu.com/ubuntu/ raring/universe amd64 Packages 100 /var/lib/dpkg/status Steps to reproduce: root@lxc-host:~# lxc-create -n ubuntu -t ubuntu -B lvm --fssize 5gb lxc-create: No config file specified, using the default config /etc/lxc/default.conf Logical volume "ubuntu" created mke2fs 1.42.5 (29-Jul-2012) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 327680 inodes, 1310720 blocks 65536 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1342177280 40 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done Checking cache download in /var/cache/lxc/raring/rootfs-amd64 ... Copy /var/cache/lxc/raring/rootfs-amd64 to /var/lib/lxc/ubuntu/rootfs ... Copying rootfs to /var/lib/lxc/ubuntu/rootfs ... Generating locales... en_US.UTF-8... up-to-date Generation complete. ## # The default user is 'ubuntu' with password 'ubuntu'! # Use the 'sudo' command to run tasks as root in the container. ## 'ubuntu' template installed Unmounting LVM 'ubuntu' created root@lxc-host:~# root@lxc-host:~# lxc-clone -o ubuntu -n ubuntu_clone Tweaking configuration Copying rootfs... Logical volume "ubuntu_clone_snapshot" created mkdir: cannot create directory ‘/dev/lxc/ubuntu_clone_snapshot’: File exists root@lxc-host:~# diff /var/lib/lxc/ubuntu/config /var/lib/lxc/ubuntu_clone/config 9d8 < lxc.mount = /var/lib/lxc/ubuntu/fstab 16d14 < lxc.utsname = ubuntu 52c50,51 < lxc.rootfs = /dev/lxc/ubuntu --- > lxc.utsname = ubuntu_clone > lxc.mount = /var/lib/lxc/ubuntu_clone/fstab If I manually add lxc.rootfs=/dev/lxc/ubuntu_clone_snapshot to /var/lib/lxc/ubuntu_clone/config, container starts normally. ** Affects: lxc (Ubuntu) Importance: Undecided Status: New ** Tags: lvm lxc lxc-clone ** Tags added: lvm ** Description changed: + Container clones made by lxc-clone is not bootable. + New container config misses lxc.rootfs. + lxc.network.hwaddr is the same as in original container. + + # lsb_release -rd Description: Ubuntu 13.04 Release: 13.04 - Container clones made by lxc-clone is not bootable. - New container config misses lxc.rootfs. - lxc.network.hwaddr is the same as in original container. + # apt-cache policy lxc + lxc: + Installed: 0.9.0-0ubuntu3 + Candidate: 0.9.0-0ubuntu3 + Version table: + *** 0.9.0-0ubuntu3 0 + 500 http://ru.archive.ubuntu.com/ubuntu/ raring/universe amd64 Packages + 100 /var/lib/dpkg/status + Steps to reproduce: root@lxc-host:~# lxc-create -n ubuntu -t ubuntu -B lvm --fssize 5gb lxc-create: No config file specified, using the default config /etc/lxc/default.conf - Logical volume "ubuntu" created + Logical volume "ubuntu" created mke2fs 1.42.5 (29-Jul-2012) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 327680 inodes, 1310720 blocks 65536 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1342177280 40 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group - Superblock backups stored on blocks: - 32768, 98304, 163840, 229376, 294912, 819200, 884736 + Superblock backups stored on blocks: + 32768, 98304, 163840, 229376, 294912, 819200, 884736 - Allocating group tables: done - Writing inode tables: done + Allocating group tables: done + Writing inode tables: done Creating journal (32768 blocks): done - Writing superblocks and filesystem accounting information: done + Writing superblocks and filesystem accounting information: done - Checking cache download in /var/cache/lxc/raring/rootfs-amd64 ... - Copy /var/cache/lxc/raring/rootfs-amd64 to /var/lib/lxc/ubuntu/rootfs ... + Checking cache download in /var/cache/lxc/raring/rootfs-amd64 ... + Copy /var/cache/lxc/raring/rootfs-amd64 to /var/lib/lxc/ubuntu/rootfs ... Copying rootfs to /var/lib/lxc/ubuntu/rootfs ... Generating locales... - en_US.UTF-8... up-to-date + en_US.UTF-8... up-to-date Generation complete. ## # The default user is 'ubuntu' with password 'ubuntu'! # Use the 'sudo' command to run tasks as root in the container. ## 'ubuntu' template installed Unmounting LVM 'ubuntu' created - root@lxc-host:~# + root@lxc-host:~# root@lxc-host:~# lxc-clone -o ubuntu -n ubuntu_clone Tweaking configuration Copying rootfs... - Logical volume "ubuntu_clone_snapshot" created + Logical volume "ubuntu_clone_snapshot" created mkdir: cannot create directory ‘/dev/lxc/ubuntu_clone_snapshot’: File exists root@lxc-host:~# diff /var/lib/lxc/ubuntu/config /var/lib/lxc/ubuntu_clone/config 9d8 < lxc.mount = /var/lib/lxc/ubuntu/fstab 16d14 < lxc.utsname = ubuntu 52c50,51 < lxc.rootfs = /dev/lxc/ubuntu --- > lxc.utsname = ubuntu_clone > lxc.mount = /var/lib/lxc/ubuntu_clone/fstab If I manually add lxc.rootfs=/dev/lxc/ubuntu_clone_snapshot to /var/lib/lxc/ubuntu_clone/config, container starts normally. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1183354 Title: lxc-clone makes unbootable clone when using lvm backing store To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1183354/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs