So I have created a template from a container. Then I made a linked clone and that one fails to start.
My environment:
# pveversion -v
proxmox-ve: 5.2-2 (running kernel: 4.15.17-1-pve)
pve-manager: 5.2-1 (running version: 5.2-1/0fcd7879)
pve-kernel-4.15: 5.2-1
pve-kernel-4.15.17-1-pve: 4.15.17-9
corosync: 2.4.2-pve5
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: not correctly installed
libjs-extjs: 6.0.1-2
libpve-access-control: 5.0-8
libpve-apiclient-perl: 2.0-4
libpve-common-perl: 5.0-31
libpve-guest-common-perl: 2.0-16
libpve-http-server-perl: 2.0-8
libpve-storage-perl: 5.0-23
libqb0: 1.0.1-1
lvm2: 2.02.168-pve6
lxc-pve: 3.0.0-3
lxcfs: 3.0.0-1
novnc-pve: 0.6-4
proxmox-widget-toolkit: 1.0-18
pve-cluster: 5.0-27
pve-container: 2.0-23
pve-docs: 5.2-4
pve-firewall: 3.0-9
pve-firmware: 2.0-4
pve-ha-manager: 2.0-5
pve-i18n: 1.0-5
pve-libspice-server1: 0.12.8-3
pve-qemu-kvm: 2.11.1-5
pve-xtermjs: 1.0-5
qemu-server: 5.0-26
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
Template CT config:
# pct config 201
arch: amd64
cores: 1
hostname: ubuntu18-template
memory: 512
net0: name=eth0,bridge=vmbr0,gw=10.168.0.1,hwaddr=06:1A:3E:15:2B:1B,ip=10.168.0.254/24,type=veth
ostype: ubuntu
rootfs: local:201/base-201-disk-1.raw,size=30G
swap: 512
template: 1
Linked clone CT creation and config:
# pct clone 201 108 --hostname myct108
create linked clone of mount point rootfs (local:201/base-201-disk-1.raw)
clone 201/base-201-disk-1.raw: images, vm-108-disk-1.qcow2, 108 to vm-108-disk-1.qcow2 (base=../201/base-201-disk-1.raw)
Formatting '/var/lib/vz/images/108/vm-108-disk-1.qcow2', fmt=qcow2 size=32212254720 backing_file=../201/base-201-disk-1.raw cluster_size=65536 lazy_refcounts=off refcount_bits=16
# pct config 108
arch: amd64
cores: 1
hostname: myct108
memory: 512
net0: name=eth0,bridge=vmbr0,gw=10.168.0.1,hwaddr=76:A6:6F:E8:69:B9,ip=10.168.0.254/24,type=veth
ostype: ubuntu
rootfs: local:201/base-201-disk-1.raw/108/vm-108-disk-1.qcow2,size=30G
swap: 512
So here is what happens when I start it:
# pct start 108
Job for pve-container@108.service failed because the control process exited with error code.
See "systemctl status pve-container@108.service" and "journalctl -xe" for details.
command 'systemctl start pve-container@108' failed: exit code 1
# lxc-start -n 108 -F -l DEBUG -o /tmp/lxc-108.log
lxc-start: 108: conf.c: run_buffer: 347 Script exited with status 9
lxc-start: 108: start.c: lxc_init: 815 Failed to run lxc.hook.pre-start for container "108"
lxc-start: 108: start.c: __lxc_start: 1849 Failed to initialize container "108"
The container failed to start.
Additional information can be obtained by setting the --logfile and --logpriority options.
#cat /tmp/lxc-108.log
lxc-start 108 20180521181642.803 INFO lxc_lsm - lsm/lsm.c:lsm_init:46 - LSM security driver AppArmor
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .reject_force_umount # comment this to allow umount -f; not recommended
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for reject_force_umount # comment this to allow umount -f; not recommended action 0(kill)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:411 - Setting Seccomp rule to reject force umounts
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for reject_force_umount action 0(kill)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:411 - Setting Seccomp rule to reject force umounts
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:411 - Setting Seccomp rule to reject force umounts
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .[all]
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .kexec_load errno 1
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for kexec_load errno 1 action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for kexec_load action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .open_by_handle_at errno 1
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for open_by_handle_at errno 1 action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for open_by_handle_at action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .init_module errno 1
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for init_module errno 1 action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for init_module action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .finit_module errno 1
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for finit_module errno 1 action 327681(errno)
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for finit_module action 327681(errno)
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .delete_module errno 1
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for delete_module errno 1 action 327681(errno)
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for delete_module action 327681(errno)
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:775 - Merging in the compat Seccomp ctx into the main one
lxc-start 108 20180521181642.804 INFO lxc_conf - conf.c:run_script_argv:368 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "108", config section "lxc"
lxc-start 108 20180521181644.826 DEBUG lxc_conf - conf.c:run_buffer:338 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 108 lxc pre-start with output: unsupported image format 'qcow2'
lxc-start 108 20180521181644.995 ERROR lxc_conf - conf.c:run_buffer:347 - Script exited with status 9
lxc-start 108 20180521181644.996 ERROR lxc_start - start.c:lxc_init:815 - Failed to run lxc.hook.pre-start for container "108"
lxc-start 108 20180521181644.997 ERROR lxc_start - start.c:__lxc_start:1849 - Failed to initialize container "108"
I seem that message "unsupported image format 'qcow2'" is what prevents container from start. Any idea how to fix that?
My environment:
# pveversion -v
proxmox-ve: 5.2-2 (running kernel: 4.15.17-1-pve)
pve-manager: 5.2-1 (running version: 5.2-1/0fcd7879)
pve-kernel-4.15: 5.2-1
pve-kernel-4.15.17-1-pve: 4.15.17-9
corosync: 2.4.2-pve5
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: not correctly installed
libjs-extjs: 6.0.1-2
libpve-access-control: 5.0-8
libpve-apiclient-perl: 2.0-4
libpve-common-perl: 5.0-31
libpve-guest-common-perl: 2.0-16
libpve-http-server-perl: 2.0-8
libpve-storage-perl: 5.0-23
libqb0: 1.0.1-1
lvm2: 2.02.168-pve6
lxc-pve: 3.0.0-3
lxcfs: 3.0.0-1
novnc-pve: 0.6-4
proxmox-widget-toolkit: 1.0-18
pve-cluster: 5.0-27
pve-container: 2.0-23
pve-docs: 5.2-4
pve-firewall: 3.0-9
pve-firmware: 2.0-4
pve-ha-manager: 2.0-5
pve-i18n: 1.0-5
pve-libspice-server1: 0.12.8-3
pve-qemu-kvm: 2.11.1-5
pve-xtermjs: 1.0-5
qemu-server: 5.0-26
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
Template CT config:
# pct config 201
arch: amd64
cores: 1
hostname: ubuntu18-template
memory: 512
net0: name=eth0,bridge=vmbr0,gw=10.168.0.1,hwaddr=06:1A:3E:15:2B:1B,ip=10.168.0.254/24,type=veth
ostype: ubuntu
rootfs: local:201/base-201-disk-1.raw,size=30G
swap: 512
template: 1
Linked clone CT creation and config:
# pct clone 201 108 --hostname myct108
create linked clone of mount point rootfs (local:201/base-201-disk-1.raw)
clone 201/base-201-disk-1.raw: images, vm-108-disk-1.qcow2, 108 to vm-108-disk-1.qcow2 (base=../201/base-201-disk-1.raw)
Formatting '/var/lib/vz/images/108/vm-108-disk-1.qcow2', fmt=qcow2 size=32212254720 backing_file=../201/base-201-disk-1.raw cluster_size=65536 lazy_refcounts=off refcount_bits=16
# pct config 108
arch: amd64
cores: 1
hostname: myct108
memory: 512
net0: name=eth0,bridge=vmbr0,gw=10.168.0.1,hwaddr=76:A6:6F:E8:69:B9,ip=10.168.0.254/24,type=veth
ostype: ubuntu
rootfs: local:201/base-201-disk-1.raw/108/vm-108-disk-1.qcow2,size=30G
swap: 512
So here is what happens when I start it:
# pct start 108
Job for pve-container@108.service failed because the control process exited with error code.
See "systemctl status pve-container@108.service" and "journalctl -xe" for details.
command 'systemctl start pve-container@108' failed: exit code 1
# lxc-start -n 108 -F -l DEBUG -o /tmp/lxc-108.log
lxc-start: 108: conf.c: run_buffer: 347 Script exited with status 9
lxc-start: 108: start.c: lxc_init: 815 Failed to run lxc.hook.pre-start for container "108"
lxc-start: 108: start.c: __lxc_start: 1849 Failed to initialize container "108"
The container failed to start.
Additional information can be obtained by setting the --logfile and --logpriority options.
#cat /tmp/lxc-108.log
lxc-start 108 20180521181642.803 INFO lxc_lsm - lsm/lsm.c:lsm_init:46 - LSM security driver AppArmor
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .reject_force_umount # comment this to allow umount -f; not recommended
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for reject_force_umount # comment this to allow umount -f; not recommended action 0(kill)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:411 - Setting Seccomp rule to reject force umounts
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for reject_force_umount action 0(kill)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:411 - Setting Seccomp rule to reject force umounts
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:411 - Setting Seccomp rule to reject force umounts
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .[all]
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .kexec_load errno 1
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for kexec_load errno 1 action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for kexec_load action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .open_by_handle_at errno 1
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for open_by_handle_at errno 1 action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for open_by_handle_at action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .init_module errno 1
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for init_module errno 1 action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for init_module action 327681(errno)
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .finit_module errno 1
lxc-start 108 20180521181642.803 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for finit_module errno 1 action 327681(errno)
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for finit_module action 327681(errno)
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:585 - processing: .delete_module errno 1
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:761 - Adding native rule for delete_module errno 1 action 327681(errno)
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:765 - Adding compat rule for delete_module action 327681(errno)
lxc-start 108 20180521181642.804 INFO lxc_seccomp - seccomp.carse_config_v2:775 - Merging in the compat Seccomp ctx into the main one
lxc-start 108 20180521181642.804 INFO lxc_conf - conf.c:run_script_argv:368 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "108", config section "lxc"
lxc-start 108 20180521181644.826 DEBUG lxc_conf - conf.c:run_buffer:338 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 108 lxc pre-start with output: unsupported image format 'qcow2'
lxc-start 108 20180521181644.995 ERROR lxc_conf - conf.c:run_buffer:347 - Script exited with status 9
lxc-start 108 20180521181644.996 ERROR lxc_start - start.c:lxc_init:815 - Failed to run lxc.hook.pre-start for container "108"
lxc-start 108 20180521181644.997 ERROR lxc_start - start.c:__lxc_start:1849 - Failed to initialize container "108"
I seem that message "unsupported image format 'qcow2'" is what prevents container from start. Any idea how to fix that?