├── debian ├── docs ├── source │ ├── format │ └── lintian-overrides ├── triggers ├── rules ├── copyright └── control ├── src ├── test │ ├── snapshot-input │ │ ├── replication.cfg │ │ ├── storage.cfg │ │ ├── commit │ │ │ └── lxc │ │ │ │ ├── 201.conf │ │ │ │ ├── 202.conf │ │ │ │ ├── 203.conf │ │ │ │ ├── 101.conf │ │ │ │ └── 102.conf │ │ ├── prepare │ │ │ └── lxc │ │ │ │ ├── 101.conf │ │ │ │ ├── 202.conf │ │ │ │ ├── 300.conf │ │ │ │ ├── 102.conf │ │ │ │ ├── 201.conf │ │ │ │ └── 200.conf │ │ ├── create │ │ │ └── lxc │ │ │ │ ├── 101.conf │ │ │ │ ├── 201.conf │ │ │ │ ├── 202.conf │ │ │ │ ├── 203.conf │ │ │ │ ├── 204.conf │ │ │ │ ├── 103.conf │ │ │ │ └── 102.conf │ │ ├── delete │ │ │ └── lxc │ │ │ │ ├── 101.conf │ │ │ │ ├── 105.conf │ │ │ │ ├── 201.conf │ │ │ │ ├── 202.conf │ │ │ │ ├── 106.conf │ │ │ │ ├── 203.conf │ │ │ │ ├── 204.conf │ │ │ │ ├── 102.conf │ │ │ │ ├── 103.conf │ │ │ │ └── 104.conf │ │ └── rollback │ │ │ └── lxc │ │ │ ├── 201.conf │ │ │ ├── 206.conf │ │ │ ├── 202.conf │ │ │ ├── 204.conf │ │ │ ├── 203.conf │ │ │ ├── 205.conf │ │ │ ├── 101.conf │ │ │ ├── 105.conf │ │ │ ├── 207.conf │ │ │ ├── 208.conf │ │ │ ├── 209.conf │ │ │ ├── 102.conf │ │ │ ├── 103.conf │ │ │ └── 104.conf │ ├── test-alpine-003 │ │ ├── etc │ │ │ ├── network │ │ │ │ └── interfaces │ │ │ ├── hostname.exp │ │ │ ├── alpine-release │ │ │ ├── hosts │ │ │ ├── hosts.exp │ │ │ └── passwd │ │ ├── roothome │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-centos6-001 │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ ├── network │ │ │ │ ├── network.exp │ │ │ │ └── network-scripts │ │ │ │ │ ├── ifcfg-eth1.exp │ │ │ │ │ └── ifcfg-eth0.exp │ │ │ ├── hostname.exp │ │ │ ├── redhat-release │ │ │ ├── rc.d │ │ │ │ ├── rc.sysinit │ │ │ │ └── rc.sysinit.exp │ │ │ ├── resolv.conf.exp │ │ │ ├── hosts.exp │ │ │ ├── init │ │ │ │ ├── power-status-changed.conf.exp │ │ │ │ ├── tty.conf.exp │ │ │ │ └── start-ttys.conf.exp │ │ │ ├── securetty │ │ │ └── securetty.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-centos6-002 │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ ├── network │ │ │ │ ├── network.exp │ │ │ │ └── network-scripts │ │ │ │ │ ├── route-eth0.exp │ │ │ │ │ ├── route6-eth0.exp │ │ │ │ │ ├── ifcfg-eth1.exp │ │ │ │ │ └── ifcfg-eth0.exp │ │ │ ├── hostname.exp │ │ │ ├── redhat-release │ │ │ ├── rc.d │ │ │ │ └── rc.sysinit │ │ │ └── securetty │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-centos8-001 │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ ├── network │ │ │ │ ├── network.exp │ │ │ │ └── network-scripts │ │ │ │ │ └── ifcfg-eth0.exp │ │ │ ├── hostname.exp │ │ │ ├── locale.conf.exp │ │ │ ├── redhat-release │ │ │ ├── rc.d │ │ │ │ ├── rc.sysinit │ │ │ │ └── rc.sysinit.exp │ │ │ ├── resolv.conf.exp │ │ │ ├── hosts.exp │ │ │ ├── systemd │ │ │ │ └── system-preset │ │ │ │ │ └── 00-pve.preset.exp │ │ │ ├── securetty │ │ │ └── securetty.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-debian-012 │ │ ├── etc │ │ │ ├── .pve-ignore.hosts │ │ │ ├── debian_version │ │ │ ├── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ │ ├── hosts │ │ │ └── hosts.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-fedora-001 │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ ├── hostname.exp │ │ │ ├── redhat-release │ │ │ ├── fedora-release │ │ │ ├── resolv.conf.exp │ │ │ ├── hosts.exp │ │ │ ├── systemd │ │ │ │ ├── network │ │ │ │ │ └── eth0.network.exp │ │ │ │ └── system-preset │ │ │ │ │ └── 00-pve.preset.exp │ │ │ ├── securetty │ │ │ ├── securetty.exp │ │ │ └── os-release │ │ ├── bin │ │ │ ├── sh │ │ │ └── partial-elf-header-amd64 │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-alpine-001 │ │ ├── etc │ │ │ ├── alpine-release │ │ │ ├── hostname.exp │ │ │ ├── hosts.exp │ │ │ ├── shadow │ │ │ ├── shadow.exp │ │ │ ├── passwd │ │ │ ├── passwd.exp │ │ │ └── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ ├── roothome │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-alpine-002 │ │ ├── etc │ │ │ ├── hostname.exp │ │ │ ├── alpine-release │ │ │ ├── hosts.exp │ │ │ ├── shadow │ │ │ ├── shadow.exp │ │ │ ├── passwd │ │ │ ├── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ │ └── passwd.exp │ │ ├── roothome │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-centos10-001 │ │ ├── etc │ │ │ ├── hostname.exp │ │ │ ├── locale.conf.exp │ │ │ ├── redhat-release │ │ │ ├── rc.d │ │ │ │ ├── rc.sysinit │ │ │ │ └── rc.sysinit.exp │ │ │ ├── hosts.exp │ │ │ ├── systemd │ │ │ │ └── system-preset │ │ │ │ │ └── 00-pve.preset.exp │ │ │ ├── securetty │ │ │ ├── NetworkManager │ │ │ │ └── system-connections │ │ │ │ │ └── eth0.nmconnection.exp │ │ │ └── securetty.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-centos10-002 │ │ ├── etc │ │ │ ├── hostname.exp │ │ │ ├── locale.conf.exp │ │ │ ├── redhat-release │ │ │ ├── rc.d │ │ │ │ ├── rc.sysinit │ │ │ │ └── rc.sysinit.exp │ │ │ ├── hosts.exp │ │ │ ├── systemd │ │ │ │ └── system-preset │ │ │ │ │ └── 00-pve.preset.exp │ │ │ ├── securetty │ │ │ ├── NetworkManager │ │ │ │ └── system-connections │ │ │ │ │ ├── eth1.nmconnection.exp │ │ │ │ │ ├── eth2.nmconnection.exp │ │ │ │ │ └── eth0.nmconnection.exp │ │ │ └── securetty.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-debian-001 │ │ ├── config │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── hosts.exp │ │ │ ├── crontab │ │ │ └── crontab.exp │ │ └── root │ │ │ └── .ssh │ │ │ └── authorized_keys.exp │ ├── test-debian-002 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── hosts.exp │ │ │ └── network │ │ │ │ └── interfaces.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-debian-003 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ │ └── hosts.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-debian-004 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ │ └── hosts.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-debian-005 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ └── hosts.exp │ │ ├── config │ │ └── root │ │ │ └── .ssh │ │ │ └── authorized_keys.exp │ ├── test-debian-006 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── hosts.exp │ │ │ └── network │ │ │ │ ├── interfaces.exp │ │ │ │ └── interfaces │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-debian-007 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── resolv.conf │ │ │ ├── resolv.conf.exp │ │ │ └── hosts.exp │ │ ├── config │ │ └── root │ │ │ └── .ssh │ │ │ └── authorized_keys.exp │ ├── test-debian-008 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ │ ├── hosts │ │ │ ├── hosts.exp │ │ │ ├── resolv.conf │ │ │ └── resolv.conf.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-debian-009 │ │ ├── config │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── hosts.exp │ │ │ ├── shadow │ │ │ ├── shadow.exp │ │ │ ├── passwd │ │ │ └── passwd.exp │ │ └── root │ │ │ └── .ssh │ │ │ └── authorized_keys.exp │ ├── test-debian-010 │ │ ├── etc │ │ │ ├── hostname.exp │ │ │ ├── debian_version │ │ │ └── hosts.exp │ │ ├── config │ │ └── root │ │ │ └── .ssh │ │ │ └── authorized_keys.exp │ ├── test-debian-011 │ │ ├── etc │ │ │ ├── debian_version │ │ │ └── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ ├── config │ │ └── root │ │ │ └── .ssh │ │ │ └── authorized_keys.exp │ ├── test-debian-013 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hosts │ │ │ └── hosts.exp │ │ ├── config │ │ └── root │ │ │ └── .ssh │ │ │ └── authorized_keys.exp │ ├── test-debian-014 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── hosts.exp │ │ │ ├── shadow │ │ │ ├── shadow.exp │ │ │ ├── passwd │ │ │ ├── passwd.exp │ │ │ └── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ ├── roothome │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-debian-015 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── hosts.exp │ │ │ ├── os-release │ │ │ ├── shadow │ │ │ ├── shadow.exp │ │ │ ├── passwd │ │ │ ├── passwd.exp │ │ │ └── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ ├── roothome │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-debian-016 │ │ ├── etc │ │ │ ├── debian_version │ │ │ ├── hostname.exp │ │ │ ├── hosts.exp │ │ │ ├── os-release │ │ │ ├── shadow │ │ │ ├── shadow.exp │ │ │ ├── passwd │ │ │ ├── passwd.exp │ │ │ └── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ ├── roothome │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-devuan-001 │ │ ├── etc │ │ │ ├── hostname.exp │ │ │ ├── devuan_version │ │ │ ├── hosts.exp │ │ │ ├── os-release │ │ │ └── network │ │ │ │ └── interfaces.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-devuan-002 │ │ ├── etc │ │ │ ├── devuan_version │ │ │ ├── hostname.exp │ │ │ ├── network │ │ │ │ ├── interfaces │ │ │ │ └── interfaces.exp │ │ │ ├── hosts │ │ │ ├── hosts.exp │ │ │ ├── resolv.conf │ │ │ └── resolv.conf.exp │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-opensuse-001 │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ ├── ifroute-eth1 │ │ │ │ │ ├── ifroute-eth1.exp │ │ │ │ │ ├── ifcfg-eth2.exp │ │ │ │ │ ├── ifcfg-eth3.exp │ │ │ │ │ ├── ifcfg-eth0.exp │ │ │ │ │ ├── ifcfg-eth1.exp │ │ │ │ │ └── ifroute-eth0.exp │ │ │ ├── securetty │ │ │ ├── resolv.conf.exp │ │ │ ├── securetty.exp │ │ │ ├── hosts.exp │ │ │ └── os-release │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ ├── config │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ └── container-getty@.service │ ├── test-opensuse-slowroll-001 │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ ├── ifroute-eth1 │ │ │ │ │ ├── ifroute-eth1.exp │ │ │ │ │ ├── ifcfg-eth2.exp │ │ │ │ │ ├── ifcfg-eth3.exp │ │ │ │ │ ├── ifcfg-eth0.exp │ │ │ │ │ ├── ifcfg-eth1.exp │ │ │ │ │ └── ifroute-eth0.exp │ │ │ ├── securetty │ │ │ ├── resolv.conf.exp │ │ │ ├── securetty.exp │ │ │ ├── hosts.exp │ │ │ └── os-release │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ ├── config │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ └── container-getty@.service │ ├── bad-path.txt │ ├── test-opensuse-003 │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ ├── ifcfg-eth3.exp │ │ │ │ │ ├── ifcfg-eth1.exp │ │ │ │ │ ├── ifcfg-eth2.exp │ │ │ │ │ ├── ifcfg-eth0.exp │ │ │ │ │ └── ifroute-eth0.exp │ │ │ ├── securetty │ │ │ ├── securetty.exp │ │ │ ├── SuSE-release │ │ │ └── os-release │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ ├── config │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ └── container-getty@.service │ ├── test-opensuse-002 │ │ ├── etc │ │ │ ├── securetty │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ ├── ifcfg-eth2.exp │ │ │ │ │ ├── ifcfg-eth0.exp │ │ │ │ │ ├── ifcfg-eth1.exp │ │ │ │ │ ├── ifcfg-eth3.exp │ │ │ │ │ ├── ifroute-eth3.exp │ │ │ │ │ └── ifroute-eth0.exp │ │ │ ├── securetty.exp │ │ │ └── os-release │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ └── config │ ├── test-opensuse-004 │ │ ├── etc │ │ │ ├── securetty │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ ├── ifcfg-eth1.exp │ │ │ │ │ ├── ifcfg-eth0.exp │ │ │ │ │ └── ifroute-eth0.exp │ │ │ ├── securetty.exp │ │ │ └── os-release │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ ├── config │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ └── container-getty@.service │ ├── test-opensuse-005 │ │ ├── etc │ │ │ ├── securetty │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ ├── ifcfg-eth1.exp │ │ │ │ │ ├── ifcfg-eth0.exp │ │ │ │ │ └── ifroute-eth0.exp │ │ │ ├── securetty.exp │ │ │ └── os-release │ │ ├── root │ │ │ └── .ssh │ │ │ │ └── authorized_keys.exp │ │ ├── config │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ └── container-getty@.service │ ├── run_idmap_tests.pl │ ├── snapshot-expected │ │ ├── commit │ │ │ └── lxc │ │ │ │ ├── 201.conf │ │ │ │ ├── 202.conf │ │ │ │ ├── 101.conf │ │ │ │ ├── 203.conf │ │ │ │ └── 102.conf │ │ ├── prepare │ │ │ └── lxc │ │ │ │ ├── 202.conf │ │ │ │ ├── 300.conf │ │ │ │ ├── 201.conf │ │ │ │ ├── 101.conf │ │ │ │ ├── 200.conf │ │ │ │ └── 102.conf │ │ ├── create │ │ │ └── lxc │ │ │ │ ├── 201.conf │ │ │ │ ├── 202.conf │ │ │ │ ├── 203.conf │ │ │ │ ├── 204.conf │ │ │ │ ├── 101.conf │ │ │ │ ├── 103.conf │ │ │ │ └── 102.conf │ │ ├── delete │ │ │ └── lxc │ │ │ │ ├── 101.conf │ │ │ │ ├── 105.conf │ │ │ │ ├── 106.conf │ │ │ │ ├── 102.conf │ │ │ │ ├── 103.conf │ │ │ │ ├── 202.conf │ │ │ │ ├── 201.conf │ │ │ │ ├── 204.conf │ │ │ │ ├── 203.conf │ │ │ │ └── 104.conf │ │ └── rollback │ │ │ └── lxc │ │ │ ├── 201.conf │ │ │ ├── 202.conf │ │ │ ├── 206.conf │ │ │ ├── 204.conf │ │ │ ├── 203.conf │ │ │ ├── 205.conf │ │ │ ├── 101.conf │ │ │ ├── 105.conf │ │ │ ├── 207.conf │ │ │ ├── 209.conf │ │ │ ├── 208.conf │ │ │ ├── 102.conf │ │ │ ├── 103.conf │ │ │ └── 104.conf │ ├── run_snapshot_tests.pl │ └── Makefile ├── pct ├── PVE │ ├── VZDump │ │ └── Makefile │ ├── CLI │ │ └── Makefile │ ├── API2 │ │ ├── Makefile │ │ └── LXC │ │ │ └── Makefile │ ├── Makefile │ └── LXC │ │ ├── Makefile │ │ ├── Setup │ │ ├── Makefile │ │ ├── OpenEuler.pm │ │ ├── NixOS.pm │ │ ├── ArchLinux.pm │ │ ├── Unmanaged.pm │ │ └── Devuan.pm │ │ ├── CGroup.pm │ │ └── Namespaces.pm ├── lxc-pve.conf ├── pve-container-mounthotplug ├── lxc-pve-userns.conf ├── system-pve\x2dcontainer.slice ├── pve-container-stop-wrapper ├── pve-container@.service ├── pve-container-debug@.service ├── 10-pve-ct-inotify-limits.conf └── lxcnetaddbr ├── .gitignore ├── Makefile └── README /debian/docs: -------------------------------------------------------------------------------- 1 | debian/SOURCE 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /src/test/snapshot-input/replication.cfg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/test-alpine-003/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/sysconfig/network: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/sysconfig/network: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/sysconfig/network: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/test-debian-012/etc/.pve-ignore.hosts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/sysconfig/network: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/etc/alpine-release: -------------------------------------------------------------------------------- 1 | 3.8.0 2 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test9 2 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test9 2 | -------------------------------------------------------------------------------- /src/test/test-alpine-003/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test3 2 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test2 2 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-debian-001/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | -------------------------------------------------------------------------------- /src/test/test-debian-001/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-001/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-debian-002/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-002/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-debian-003/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-003/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test3 2 | -------------------------------------------------------------------------------- /src/test/test-debian-004/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-004/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test3 2 | -------------------------------------------------------------------------------- /src/test/test-debian-005/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-005/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-debian-006/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-006/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-debian-007/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-007/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-debian-008/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-008/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | CT102 2 | -------------------------------------------------------------------------------- /src/test/test-debian-009/config: -------------------------------------------------------------------------------- 1 | hostname: test9 2 | -------------------------------------------------------------------------------- /src/test/test-debian-009/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-009/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test9 2 | -------------------------------------------------------------------------------- /src/test/test-debian-010/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test10 2 | -------------------------------------------------------------------------------- /src/test/test-debian-011/etc/debian_version: -------------------------------------------------------------------------------- 1 | 8.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-012/etc/debian_version: -------------------------------------------------------------------------------- 1 | 8.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-013/etc/debian_version: -------------------------------------------------------------------------------- 1 | 8.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-013/etc/hosts: -------------------------------------------------------------------------------- 1 | ../../bad-path.txt -------------------------------------------------------------------------------- /src/test/test-debian-014/etc/debian_version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /src/test/test-debian-014/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test9 2 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/debian_version: -------------------------------------------------------------------------------- 1 | 11.1 2 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test9 2 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/debian_version: -------------------------------------------------------------------------------- 1 | 13.1 2 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test16 2 | -------------------------------------------------------------------------------- /src/test/test-devuan-001/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/etc/devuan_version: -------------------------------------------------------------------------------- 1 | ascii 2 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | CT102 2 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/hostname.exp: -------------------------------------------------------------------------------- 1 | test1 2 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/etc/alpine-release: -------------------------------------------------------------------------------- 1 | 3.13.1 2 | -------------------------------------------------------------------------------- /src/test/test-alpine-003/etc/alpine-release: -------------------------------------------------------------------------------- 1 | 3.13.1 2 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/locale.conf.exp: -------------------------------------------------------------------------------- 1 | LANG=C.utf8 -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/locale.conf.exp: -------------------------------------------------------------------------------- 1 | LANG=C.utf8 -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/locale.conf.exp: -------------------------------------------------------------------------------- 1 | LANG=C.utf8 -------------------------------------------------------------------------------- /src/test/test-debian-010/etc/debian_version: -------------------------------------------------------------------------------- 1 | 6.0.10 2 | -------------------------------------------------------------------------------- /src/test/test-devuan-001/etc/devuan_version: -------------------------------------------------------------------------------- 1 | jessie 2 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/bin/sh: -------------------------------------------------------------------------------- 1 | partial-elf-header-amd64 -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/redhat-release: -------------------------------------------------------------------------------- 1 | fedora-release -------------------------------------------------------------------------------- /src/test/test-debian-005/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | tty: 4 3 | -------------------------------------------------------------------------------- /src/test/test-debian-010/config: -------------------------------------------------------------------------------- 1 | hostname: test10 2 | tty: 4 3 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/redhat-release: -------------------------------------------------------------------------------- 1 | CentOS release 6.3 (Final) 2 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/redhat-release: -------------------------------------------------------------------------------- 1 | CentOS release 6.3 (Final) 2 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/redhat-release: -------------------------------------------------------------------------------- 1 | CentOS release 8.3 (Final) 2 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/fedora-release: -------------------------------------------------------------------------------- 1 | Fedora release 41 (Forty One) 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /*.buildinfo 2 | /*.changes 3 | /*.deb 4 | /pve-container-[0-9]*/ 5 | -------------------------------------------------------------------------------- /src/test/test-debian-007/etc/resolv.conf: -------------------------------------------------------------------------------- 1 | # Existing data 2 | # will be replaced 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/sysconfig/network/ifroute-eth1: -------------------------------------------------------------------------------- 1 | # Nothing else 2 | -------------------------------------------------------------------------------- /debian/triggers: -------------------------------------------------------------------------------- 1 | activate-noawait pve-api-updates 2 | activate-noawait /etc/init.d 3 | -------------------------------------------------------------------------------- /src/test/test-debian-003/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | -------------------------------------------------------------------------------- /src/test/test-debian-004/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | -------------------------------------------------------------------------------- /src/test/test-debian-008/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | -------------------------------------------------------------------------------- /src/test/test-debian-011/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | -------------------------------------------------------------------------------- /src/test/test-debian-012/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/sysconfig/network/ifroute-eth1.exp: -------------------------------------------------------------------------------- 1 | # Nothing else 2 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/redhat-release: -------------------------------------------------------------------------------- 1 | CentOS Stream release 10 (Coughlan) 2 | 3 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/redhat-release: -------------------------------------------------------------------------------- 1 | CentOS Stream release 10 (Coughlan) 2 | 3 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/sysconfig/network.exp: -------------------------------------------------------------------------------- 1 | NETWORKING=yes 2 | HOSTNAME=test1 3 | -------------------------------------------------------------------------------- /src/test/test-debian-013/config: -------------------------------------------------------------------------------- 1 | net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0 2 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1: -------------------------------------------------------------------------------- 1 | # Nothing else 2 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1.exp: -------------------------------------------------------------------------------- 1 | # Nothing else 2 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/sysconfig/network.exp: -------------------------------------------------------------------------------- 1 | NETWORKING_IPV6=yes 2 | HOSTNAME=test1 3 | -------------------------------------------------------------------------------- /src/test/bad-path.txt: -------------------------------------------------------------------------------- 1 | This file should never be able to appear in a testcase's output directory. 2 | -------------------------------------------------------------------------------- /src/test/test-debian-008/etc/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost.localdomain localhost 2 | 127.0.1.1 CT102 3 | -------------------------------------------------------------------------------- /src/test/test-debian-012/etc/hosts: -------------------------------------------------------------------------------- 1 | This is my hosts file. 2 | And you're not allowed to change it! 3 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/etc/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost.localdomain localhost 2 | 127.0.1.1 CT102 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/etc/sysconfig/network/ifcfg-eth3.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=dhcp 3 | -------------------------------------------------------------------------------- /debian/source/lintian-overrides: -------------------------------------------------------------------------------- 1 | source-is-missing [test/test-fedora-001/bin/partial-elf-header-amd64] 2 | -------------------------------------------------------------------------------- /src/test/test-debian-007/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | searchdomain: proxmox.com 3 | nameserver: 8.8.8.8,8.8.8.9 -------------------------------------------------------------------------------- /src/test/test-debian-012/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | This is my hosts file. 2 | And you're not allowed to change it! 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/securetty: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/sysconfig/network/ifcfg-eth2.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=manual 2 | BOOTPROTO=static 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/sysconfig/network/ifcfg-eth3.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=manual 2 | BOOTPROTO=static 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/etc/securetty: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/etc/sysconfig/network/ifcfg-eth2.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=manual 2 | BOOTPROTO=static 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/etc/securetty: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/etc/sysconfig/network/ifcfg-eth1.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=dhcp4 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/etc/sysconfig/network/ifcfg-eth2.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=dhcp6 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-004/etc/securetty: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | -------------------------------------------------------------------------------- /src/test/test-opensuse-004/etc/sysconfig/network/ifcfg-eth1.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=dhcp4 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-005/etc/securetty: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | -------------------------------------------------------------------------------- /src/test/test-opensuse-005/etc/sysconfig/network/ifcfg-eth1.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=dhcp4 3 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/sysconfig/network.exp: -------------------------------------------------------------------------------- 1 | NETWORKING=yes 2 | NETWORKING_IPV6=yes 3 | HOSTNAME=test2 4 | -------------------------------------------------------------------------------- /src/test/test-debian-011/config: -------------------------------------------------------------------------------- 1 | net0: name=eth0,hwaddr=46:6B:2E:6F:B1:13,bridge=vmbr0,ip6=fc00::89:c:1/96 2 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/securetty: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth2.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=manual 2 | BOOTPROTO=static 3 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth3.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=manual 2 | BOOTPROTO=static 3 | -------------------------------------------------------------------------------- /src/test/test-debian-001/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-002/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-003/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-004/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-005/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-006/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-007/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-008/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-009/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-010/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-011/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-012/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-013/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-devuan-001/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/sysconfig/network/ifcfg-eth0.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR=1.2.3.4/24 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/sysconfig/network/ifcfg-eth1.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR=10.2.3.4/24 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/etc/sysconfig/network/ifcfg-eth0.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR=2001:1::/64 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/etc/sysconfig/network/ifcfg-eth1.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR=2001:2::/64 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/etc/sysconfig/network/ifcfg-eth3.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR=2000::1/64 4 | -------------------------------------------------------------------------------- /src/test/snapshot-input/storage.cfg: -------------------------------------------------------------------------------- 1 | dir: local 2 | path /tmp/storage/ 3 | maxfiles 0 4 | content vztmpl,rootdir,iso,images 5 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/roothome/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/roothome/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-alpine-003/roothome/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/rc.d/rc.sysinit: -------------------------------------------------------------------------------- 1 | # just a test 2 | # dummy 3 | 4 | /sbin/start_udev xxxxxxxxxxyyyyyyzzzz 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/rc.d/rc.sysinit: -------------------------------------------------------------------------------- 1 | # just a test 2 | # dummy 3 | 4 | /sbin/start_udev xxxxxxxxxxyyyyyyzzzz 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/rc.d/rc.sysinit: -------------------------------------------------------------------------------- 1 | # just a test 2 | # dummy 3 | 4 | /sbin/start_udev xxxxxxxxxxyyyyyyzzzz 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/rc.d/rc.sysinit: -------------------------------------------------------------------------------- 1 | # just a test 2 | # dummy 3 | 4 | /sbin/start_udev xxxxxxxxxxyyyyyyzzzz 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/rc.d/rc.sysinit: -------------------------------------------------------------------------------- 1 | # just a test 2 | # dummy 3 | 4 | /sbin/start_udev xxxxxxxxxxyyyyyyzzzz 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-014/roothome/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-015/roothome/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-016/roothome/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-004/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-005/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-alpine-003/config: -------------------------------------------------------------------------------- 1 | hostname: test3 2 | net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0,ip=10.0.0.100/32,gw=11.0.0.1 3 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/rc.d/rc.sysinit.exp: -------------------------------------------------------------------------------- 1 | # just a test 2 | # dummy 3 | 4 | #/sbin/start_udev xxxxxxxxxxyyyyyyzzzz 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/rc.d/rc.sysinit.exp: -------------------------------------------------------------------------------- 1 | # just a test 2 | # dummy 3 | 4 | #/sbin/start_udev xxxxxxxxxxyyyyyyzzzz 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/rc.d/rc.sysinit.exp: -------------------------------------------------------------------------------- 1 | # just a test 2 | # dummy 3 | 4 | #/sbin/start_udev xxxxxxxxxxyyyyyyzzzz 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/rc.d/rc.sysinit.exp: -------------------------------------------------------------------------------- 1 | # just a test 2 | # dummy 3 | 4 | #/sbin/start_udev xxxxxxxxxxyyyyyyzzzz 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/resolv.conf.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | search example.com 3 | nameserver 127.0.0.1 4 | # --- END PVE --- 5 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/etc/sysconfig/network/ifroute-eth3.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | default fe80::1 - eth3 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth0.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR=1.2.3.4/24 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth1.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR=10.2.3.4/24 4 | -------------------------------------------------------------------------------- /src/pct: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -T 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use PVE::CLI::pct; 7 | 8 | PVE::CLI::pct->run_cli_handler(); 9 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/resolv.conf.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | search example.com 3 | nameserver 127.0.0.1 4 | # --- END PVE --- 5 | -------------------------------------------------------------------------------- /src/test/test-debian-003/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet manual 6 | 7 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/root/.ssh/authorized_keys.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | ssh-rsa ABCDEFG ABC@DEF 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-alpine-003/etc/hosts: -------------------------------------------------------------------------------- 1 | 127.0.1.1 LXC_NAME 2 | 127.0.0.1 localhost localhost.localdomain 3 | ::1 localhost localhost.localdomain 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/sysconfig/network/ifroute-eth0.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | default 1.2.3.1 0.0.0.0 eth0 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | net0: bridge=vmbr0,name=eth0,ip6=auto 3 | searchdomain: example.com 4 | nameserver: 127.0.0.1 5 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | net0: bridge=vmbr0,name=eth0,ip6=auto 3 | searchdomain: example.com 4 | nameserver: 127.0.0.1 5 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth0.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | default 1.2.3.1 0.0.0.0 eth0 3 | # --- END PVE --- 4 | -------------------------------------------------------------------------------- /src/test/test-debian-006/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | tty: 0 3 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24 4 | net1: bridge=vmbr1,name=eth1,ip6=1234::1/64 5 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/etc/sysconfig/network/ifcfg-eth0.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR_1=1.2.3.4/24 4 | IPADDR_2=2001:1::/64 5 | -------------------------------------------------------------------------------- /src/test/test-opensuse-004/etc/sysconfig/network/ifcfg-eth0.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR_1=1.2.3.4/24 4 | IPADDR_2=2001:1::/64 5 | -------------------------------------------------------------------------------- /src/test/test-opensuse-005/etc/sysconfig/network/ifcfg-eth0.exp: -------------------------------------------------------------------------------- 1 | STARTMODE=onboot 2 | BOOTPROTO=static 3 | IPADDR_1=1.2.3.4/24 4 | IPADDR_2=2001:1::/64 5 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | net0: bridge=vmbr0,name=eth0,ip=dhcp 3 | searchdomain: example.com 4 | nameserver: 127.0.0.1,192.168.0.1 5 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/resolv.conf.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | search proxmox.com 3 | nameserver 8.8.8.8 4 | nameserver 8.8.8.9 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-007/etc/resolv.conf.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | search proxmox.com 3 | nameserver 8.8.8.8 4 | nameserver 8.8.8.9 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/bin/partial-elf-header-amd64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proxmox/pve-container/HEAD/src/test/test-fedora-001/bin/partial-elf-header-amd64 -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/resolv.conf.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | search proxmox.com 3 | nameserver 8.8.8.8 4 | nameserver 8.8.8.9 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/etc/sysconfig/network/ifroute-eth0.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 20ff::1/128 - - eth0 3 | default 20ff::1 - eth0 4 | # --- END PVE --- 5 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/sysconfig/network-scripts/route-eth0.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 4.3.2.1 dev eth0 3 | default via 4.3.2.1 dev eth0 4 | # --- END PVE --- 5 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/sysconfig/network-scripts/route6-eth0.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 20ff::1 dev eth0 3 | default via 20ff::1 dev eth0 4 | # --- END PVE --- 5 | -------------------------------------------------------------------------------- /src/test/test-debian-003/config: -------------------------------------------------------------------------------- 1 | arch: i386 2 | memory: 512 3 | ostype: debian 4 | hostname: test3 5 | net0: bridge=vmbr0,name=eth0,hwaddr=26:2B:CC:E5:7F:F9,ip=manual 6 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/resolv.conf.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | search proxmox.com 3 | nameserver 8.8.8.8 4 | nameserver 8.8.8.9 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-011/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet6 static 6 | address fc00::89:c:1 7 | netmask 96 8 | 9 | -------------------------------------------------------------------------------- /src/test/test-debian-013/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 localhost 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-opensuse-004/config: -------------------------------------------------------------------------------- 1 | hostname: pvesuse1 2 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=4.3.2.1,ip6=2001:1::/64,gw6=2001:1::ffff 3 | net1: bridge=vmbr0,name=eth1,ip=dhcp 4 | -------------------------------------------------------------------------------- /src/test/test-opensuse-005/config: -------------------------------------------------------------------------------- 1 | hostname: pvesuse1 2 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=4.3.2.1,ip6=2001:1::/64,gw6=2001:1::ffff 3 | net1: bridge=vmbr0,name=eth1,ip=dhcp 4 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=1.2.3.1 3 | net1: bridge=vmbr0,name=eth1,ip=10.2.3.4/24 4 | net2: bridge=vmbr0,name=eth2 5 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | lxc/console 9 | lxc/tty1 10 | lxc/tty2 11 | lxc/tty3 12 | lxc/tty4 13 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | lxc/console 9 | lxc/tty1 10 | lxc/tty2 11 | lxc/tty3 12 | lxc/tty4 13 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | lxc/console 9 | lxc/tty1 10 | lxc/tty2 11 | lxc/tty3 12 | lxc/tty4 13 | -------------------------------------------------------------------------------- /src/test/test-opensuse-004/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | lxc/console 9 | lxc/tty1 10 | lxc/tty2 11 | lxc/tty3 12 | lxc/tty4 13 | -------------------------------------------------------------------------------- /src/test/test-opensuse-005/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | lxc/console 9 | lxc/tty1 10 | lxc/tty2 11 | lxc/tty3 12 | lxc/tty4 13 | -------------------------------------------------------------------------------- /src/PVE/VZDump/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: install 3 | install: 4 | install -D -m 0644 LXC.pm $(PERLDIR)/PVE/VZDump/LXC.pm 5 | install -D -m 0644 ConvertOVZ.pm $(PERLDIR)/PVE/VZDump/ConvertOVZ.pm 6 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/config: -------------------------------------------------------------------------------- 1 | hostname: test2 2 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=4.3.2.1,ip6=2000::1/64,gw6=20ff::1 3 | net1: bridge=vmbr0,name=eth1,ip6=2222::1/64,gw6=fe80::1 4 | -------------------------------------------------------------------------------- /src/test/test-debian-004/config: -------------------------------------------------------------------------------- 1 | arch: i386 2 | memory: 512 3 | ostype: debian 4 | hostname: test3.use-fqdn.com 5 | net0: bridge=vmbr0,name=eth0,hwaddr=26:2B:CC:E5:7F:F9,ip=1.2.3.2/24,gw=1.2.3.1 6 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 10.0.0.100 test9.proxmox.com test9 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 10.0.0.100 test9.proxmox.com test9 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 1.2.3.4 test1.proxmox.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 test1.example.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-001/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 test1.proxmox.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-002/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=1.2.3.1 3 | net1: bridge=vmbr0,name=eth1,ip=10.2.3.4/24 4 | net2: bridge=vmbr0,name=eth2,ip=manual 5 | -------------------------------------------------------------------------------- /src/test/test-debian-002/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 1.2.3.4 test1.proxmox.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-003/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 test3.proxmox.com test3 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-004/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 1.2.3.2 test3.use-fqdn.com test3 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-005/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 test1.proxmox.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-006/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 1.2.3.4 test1.proxmox.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-007/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 test1.proxmox.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-009/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 test9.proxmox.com test9 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-014/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 10.0.0.100 test9.proxmox.com test9 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 10.0.0.100 test9.proxmox.com test9 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-devuan-001/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=1.2.3.1 3 | net1: bridge=vmbr0,name=eth1,ip=10.2.3.4/24 4 | net2: bridge=vmbr0,name=eth2,ip=manual 5 | -------------------------------------------------------------------------------- /src/test/test-devuan-001/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 1.2.3.4 test1.proxmox.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 test1.example.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/systemd/network/eth0.network.exp: -------------------------------------------------------------------------------- 1 | [Match] 2 | Name = eth0 3 | 4 | [Network] 5 | Description = Interface eth0 autoconfigured by PVE 6 | DHCP = no 7 | IPv6AcceptRA = true 8 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | tty1 2 | tty2 3 | tty3 4 | tty4 5 | tty5 6 | tty6 7 | console 8 | lxc/console 9 | lxc/tty1 10 | lxc/tty2 11 | lxc/tty3 12 | lxc/tty4 13 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 test1.example.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 10.0.0.100 test1.example.com test1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-010/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 127.0.1.1 test10.proxmox.com test10 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 10.0.0.100 test16.proxmox.com test16 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 1.2.3.4 pvesuse1.proxmox.com pvesuse1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-alpine-003/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost localhost.localdomain 2 | ::1 localhost localhost.localdomain 3 | # --- BEGIN PVE --- 4 | 10.0.0.100 test3.proxmox.com test3 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/init/power-status-changed.conf.exp: -------------------------------------------------------------------------------- 1 | # power-status-changed - shutdown on SIGPWR 2 | # 3 | start on power-status-changed 4 | 5 | exec /sbin/shutdown -h now "SIGPWR received" 6 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/etc/SuSE-release: -------------------------------------------------------------------------------- 1 | openSUSE 42.2 (x86_64) 2 | VERSION = 42.2 3 | CODENAME = Malachite 4 | # /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead 5 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/etc/sysconfig/network/ifroute-eth0.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 4.3.2.1 0.0.0.0 255.255.255.255 eth0 3 | default 4.3.2.1 0.0.0.0 eth0 4 | default 2001:1::ffff - eth0 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-opensuse-004/etc/sysconfig/network/ifroute-eth0.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 4.3.2.1 0.0.0.0 255.255.255.255 eth0 3 | default 4.3.2.1 0.0.0.0 eth0 4 | default 2001:1::ffff - eth0 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-opensuse-005/etc/sysconfig/network/ifroute-eth0.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 4.3.2.1 0.0.0.0 255.255.255.255 eth0 3 | default 4.3.2.1 0.0.0.0 eth0 4 | default 2001:1::ffff - eth0 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/PVE/CLI/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES=pct.pm 2 | 3 | .PHONY: install 4 | install: $(SOURCES) 5 | install -d -m 0755 $(PERLDIR)/PVE/CLI 6 | for i in $(SOURCES); do install -D -m 0644 $$i $(PERLDIR)/PVE/CLI/$$i; done 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/lxc-pve.conf: -------------------------------------------------------------------------------- 1 | lxc.hook.pre-start = /usr/share/lxc/hooks/lxc-pve-prestart-hook 2 | lxc.hook.autodev = /usr/share/lxc/hooks/lxc-pve-autodev-hook 3 | lxc.hook.post-stop = /usr/share/lxc/hooks/lxc-pve-poststop-hook 4 | 5 | -------------------------------------------------------------------------------- /src/test/test-debian-004/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 1.2.3.2 7 | netmask 255.255.255.0 8 | gateway 1.2.3.1 9 | 10 | -------------------------------------------------------------------------------- /src/pve-container-mounthotplug: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | profile pve-container-mounthotplug flags=(attach_disconnected) { 4 | #include 5 | 6 | mount options=(move), 7 | } 8 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | # --- BEGIN PVE --- 2 | 127.0.0.1 localhost.localnet localhost 3 | ::1 localhost.localnet localhost 4 | 1.2.3.4 pvesuseslow1.proxmox.com pvesuseslow1 5 | # --- END PVE --- 6 | -------------------------------------------------------------------------------- /src/test/test-debian-008/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost.localdomain localhost 2 | 127.0.1.1 CT102 3 | # --- BEGIN PVE --- 4 | ::1 localhost.localnet localhost 5 | 192.168.3.102 CT102.proxmox.com CT102 6 | # --- END PVE --- 7 | -------------------------------------------------------------------------------- /src/test/test-debian-008/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 192.168.3.102 7 | netmask 255.255.240.0 8 | gateway 192.168.2.1 9 | 10 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/etc/hosts.exp: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost.localdomain localhost 2 | 127.0.1.1 CT102 3 | # --- BEGIN PVE --- 4 | ::1 localhost.localnet localhost 5 | 192.168.3.102 CT102.proxmox.com CT102 6 | # --- END PVE --- 7 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 192.168.3.102 7 | netmask 255.255.240.0 8 | gateway 192.168.2.1 9 | 10 | -------------------------------------------------------------------------------- /src/test/test-opensuse-005/etc/os-release: -------------------------------------------------------------------------------- 1 | NAME="SLES" 2 | VERSION="12-SP2" 3 | VERSION_ID="12.2" 4 | PRETTY_NAME="SUSE Linux Enterprise Server 12 SP2" 5 | ID="sles" 6 | ANSI_COLOR="0;32" 7 | CPE_NAME="cpe:/o:suse:sles:12:sp2" 8 | -------------------------------------------------------------------------------- /src/PVE/API2/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES=LXC.pm 2 | 3 | .PHONY: install 4 | install: 5 | install -d -m 0755 $(PERLDIR)/PVE/API2 6 | for i in $(SOURCES); do install -D -m 0644 $$i $(PERLDIR)/PVE/API2/$$i; done 7 | make -C LXC install 8 | 9 | -------------------------------------------------------------------------------- /src/test/test-debian-008/etc/resolv.conf: -------------------------------------------------------------------------------- 1 | # Existing data 2 | # Will be kept because there's a PVE section to be replaced 3 | 4 | # --- BEGIN PVE --- 5 | # Stuff gets filled here 6 | # --- END PVE --- 7 | 8 | # This will be kept, too 9 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/etc/resolv.conf: -------------------------------------------------------------------------------- 1 | # Existing data 2 | # Will be kept because there's a PVE section to be replaced 3 | 4 | # --- BEGIN PVE --- 5 | # Stuff gets filled here 6 | # --- END PVE --- 7 | 8 | # This will be kept, too 9 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/config: -------------------------------------------------------------------------------- 1 | hostname: pvesuse1 2 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=1.2.3.1 3 | net1: bridge=vmbr0,name=eth1,ip=10.2.3.4/24 4 | net2: bridge=vmbr0,name=eth2,ip=manual 5 | net3: bridge=vmbr0,name=eth3 6 | -------------------------------------------------------------------------------- /src/lxc-pve-userns.conf: -------------------------------------------------------------------------------- 1 | # Default unified cgroup configuration 2 | 3 | # Reset cgroupv2: 4 | lxc.cgroup2.devices.deny = 5 | lxc.cgroup2.devices.allow = 6 | # For unprivileged contaienrs we make it a deny-list: 7 | lxc.cgroup2.devices.allow = a 8 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/sysconfig/network-scripts/ifcfg-eth0.exp: -------------------------------------------------------------------------------- 1 | DEVICE=eth0 2 | ONBOOT=yes 3 | UUID=00000000-0000-0000-0000-000000000000 4 | BOOTPROTO=none 5 | IPV6INIT=yes 6 | IPV6_AUTOCONF=yes 7 | DNS1=127.0.0.1 8 | DOMAIN=example.com 9 | -------------------------------------------------------------------------------- /src/PVE/API2/LXC/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES=Config.pm Status.pm Snapshot.pm 2 | 3 | .PHONY: install 4 | install: 5 | install -d -m 0755 ${PERLDIR}/PVE/API2/LXC 6 | for i in ${SOURCES}; do install -D -m 0644 $$i ${PERLDIR}/PVE/API2/LXC/$$i; done 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/config: -------------------------------------------------------------------------------- 1 | hostname: pvesuseslow1 2 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=1.2.3.1 3 | net1: bridge=vmbr0,name=eth1,ip=10.2.3.4/24 4 | net2: bridge=vmbr0,name=eth2,ip=manual 5 | net3: bridge=vmbr0,name=eth3 6 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/systemd/system-preset/00-pve.preset.exp: -------------------------------------------------------------------------------- 1 | # Added by PVE at create-time for first-boot configuration. 2 | enable container-getty@.service 3 | disable getty@.service 4 | disable sys-kernel-config.mount 5 | disable sys-kernel-debug.mount 6 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/systemd/system-preset/00-pve.preset.exp: -------------------------------------------------------------------------------- 1 | # Added by PVE at create-time for first-boot configuration. 2 | enable container-getty@.service 3 | disable getty@.service 4 | disable sys-kernel-config.mount 5 | disable sys-kernel-debug.mount 6 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/systemd/system-preset/00-pve.preset.exp: -------------------------------------------------------------------------------- 1 | # Added by PVE at create-time for first-boot configuration. 2 | enable container-getty@.service 3 | disable getty@.service 4 | disable sys-kernel-config.mount 5 | disable sys-kernel-debug.mount 6 | -------------------------------------------------------------------------------- /src/test/run_idmap_tests.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use TAP::Harness; 7 | 8 | my $harness = TAP::Harness->new({ "verbosity" => -2 }); 9 | my $res = $harness->runtests("idmap-test.pm"); 10 | exit -1 if $res->{failed}; 11 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/securetty: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/securetty: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/securetty: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/securetty: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/securetty: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/securetty: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 -------------------------------------------------------------------------------- /src/test/test-opensuse-002/config: -------------------------------------------------------------------------------- 1 | hostname: pvesuse1 2 | net0: bridge=vmbr0,name=eth0,ip6=2001:1::/64,gw6=20ff::1 3 | net1: bridge=vmbr0,name=eth1,ip6=2001:2::/64 4 | net2: bridge=vmbr0,name=eth2,ip6=manual 5 | net3: bridge=vmbr0,name=eth3,ip6=2000::1/64,gw6=fe80::1 6 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/sysconfig/network-scripts/ifcfg-eth1.exp: -------------------------------------------------------------------------------- 1 | DEVICE=eth1 2 | ONBOOT=yes 3 | UUID=00000000-0000-0000-0000-000000000000 4 | BOOTPROTO=none 5 | IPADDR=10.2.3.4 6 | NETMASK=255.255.255.0 7 | DNS1=8.8.8.8 8 | DNS2=8.8.8.9 9 | DOMAIN=proxmox.com 10 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/config: -------------------------------------------------------------------------------- 1 | hostname: pvesuse1 2 | net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=4.3.2.1,ip6=2001:1::/64,gw6=2001:1::ffff 3 | net1: bridge=vmbr0,name=eth1,ip=dhcp 4 | net2: bridge=vmbr0,name=eth2,ip6=dhcp 5 | net3: bridge=vmbr0,name=eth3,ip=dhcp,ip6=dhcp 6 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/commit/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: somestore:somedisk 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/prepare/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: somestore:somedisk 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/prepare/lxc/300.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: somestore:somedisk 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-input/commit/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: somestore:somedisk 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-input/prepare/lxc/101.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: somestore:somedisk 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-input/prepare/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: somestore:somedisk 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-input/prepare/lxc/300.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: somestore:somedisk 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/test-debian-008/etc/resolv.conf.exp: -------------------------------------------------------------------------------- 1 | # Existing data 2 | # Will be kept because there's a PVE section to be replaced 3 | 4 | # --- BEGIN PVE --- 5 | search proxmox.com 6 | nameserver 8.8.8.8 7 | nameserver 8.8.8.9 8 | # --- END PVE --- 9 | 10 | # This will be kept, too 11 | -------------------------------------------------------------------------------- /src/test/test-debian-012/config: -------------------------------------------------------------------------------- 1 | net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0,ip=10.0.0.100/32,gw=11.0.0.1 2 | net1: name=eth1,hwaddr=22:33:44:55:66:77,bridge=vmbr0,ip6=fc00::1/64,gw6=fc00:1::ff 3 | net2: name=eth2,hwaddr=32:44:55:66:77:88,bridge=vmbr2,ip6=fc02::1/64,gw6=fe80::1 4 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/etc/resolv.conf.exp: -------------------------------------------------------------------------------- 1 | # Existing data 2 | # Will be kept because there's a PVE section to be replaced 3 | 4 | # --- BEGIN PVE --- 5 | search proxmox.com 6 | nameserver 8.8.8.8 7 | nameserver 8.8.8.9 8 | # --- END PVE --- 9 | 10 | # This will be kept, too 11 | -------------------------------------------------------------------------------- /src/test/snapshot-input/create/lxc/101.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: local:snapshotable-disk-1 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-input/create/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: local:unsnapshotable-disk-1 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-input/create/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: local:snapshotable-disk-1 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/test-debian-008/config: -------------------------------------------------------------------------------- 1 | arch: i386 2 | cpulimit: 1 3 | memory: 512 4 | swap: 512 5 | ostype: debian 6 | hostname: CT102 7 | nameserver: 8.8.8.8,8.8.8.9 8 | searchdomain: proxmox.com 9 | net0: bridge=vmbr0,name=eth0,hwaddr=2A:31:01:D5:A4:BF,ip=192.168.3.102/20,gw=192.168.2.1 10 | -------------------------------------------------------------------------------- /src/test/test-devuan-002/config: -------------------------------------------------------------------------------- 1 | arch: i386 2 | cpulimit: 1 3 | memory: 512 4 | swap: 512 5 | ostype: devuan 6 | hostname: CT102 7 | nameserver: 8.8.8.8,8.8.8.9 8 | searchdomain: proxmox.com 9 | net0: bridge=vmbr0,name=eth0,hwaddr=2A:31:01:D5:A4:BF,ip=192.168.3.102/20,gw=192.168.2.1 10 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/create/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: local:unsnapshotable-disk-1 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/create/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: local:snapshotable-disk-1 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/101.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: local:snapshotable-disk-1 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/105.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | rootfs: local:snapshotable-disk-1 9 | swap: 512 10 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/config: -------------------------------------------------------------------------------- 1 | hostname: test9 2 | net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0,ip=10.0.0.100/32,gw=11.0.0.1 3 | net1: name=eth1,hwaddr=22:33:44:55:66:77,bridge=vmbr1,ip6=fc00::1/64,gw6=fc00:1::ff 4 | net2: name=eth2,hwaddr=32:44:55:66:77:88,bridge=vmbr2,ip=192.168.0.1/24 5 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/config: -------------------------------------------------------------------------------- 1 | hostname: test9 2 | net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0,ip=10.0.0.100/32,gw=11.0.0.1 3 | net1: name=eth1,hwaddr=22:33:44:55:66:77,bridge=vmbr1,ip6=fc00::1/64,gw6=fc00:1::ff 4 | net2: name=eth2,hwaddr=32:44:55:66:77:88,bridge=vmbr2,ip=192.168.0.1/24 5 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/sysconfig/network-scripts/ifcfg-eth0.exp: -------------------------------------------------------------------------------- 1 | DEVICE=eth0 2 | ONBOOT=yes 3 | UUID=00000000-0000-0000-0000-000000000000 4 | BOOTPROTO=none 5 | IPADDR=1.2.3.4 6 | NETMASK=255.255.255.0 7 | GATEWAY=1.2.3.1 8 | DNS1=8.8.8.8 9 | DNS2=8.8.8.9 10 | DOMAIN=proxmox.com 11 | -------------------------------------------------------------------------------- /src/test/test-debian-014/config: -------------------------------------------------------------------------------- 1 | hostname: test9 2 | net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0,ip=10.0.0.100/32,gw=11.0.0.1 3 | net1: name=eth1,hwaddr=22:33:44:55:66:77,bridge=vmbr1,ip6=fc00::1/64,gw6=fc00:1::ff 4 | net2: name=eth2,hwaddr=32:44:55:66:77:88,bridge=vmbr2,ip=192.168.0.1/24 5 | -------------------------------------------------------------------------------- /src/test/test-debian-015/config: -------------------------------------------------------------------------------- 1 | hostname: test9 2 | net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0,ip=10.0.0.100/32,gw=11.0.0.1 3 | net1: name=eth1,hwaddr=22:33:44:55:66:77,bridge=vmbr1,ip6=fc00::1/64,gw6=fc00:1::ff 4 | net2: name=eth2,hwaddr=32:44:55:66:77:88,bridge=vmbr2,ip=192.168.0.1/24 5 | -------------------------------------------------------------------------------- /src/test/test-debian-016/config: -------------------------------------------------------------------------------- 1 | hostname: test16 2 | net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0,ip=10.0.0.100/32,gw=11.0.0.1 3 | net1: name=eth1,hwaddr=22:33:44:55:66:77,bridge=vmbr1,ip6=fc00::1/64,gw6=fc00:1::ff 4 | net2: name=eth2,hwaddr=32:44:55:66:77:88,bridge=vmbr2,ip=192.168.0.1/24 5 | -------------------------------------------------------------------------------- /src/test/test-devuan-001/etc/os-release: -------------------------------------------------------------------------------- 1 | PRETTY_NAME="Devuan GNU/Linux 1 (jessie)" 2 | NAME="Devuan GNU/Linux" 3 | VERSION_ID="1" 4 | VERSION="1 (jessie)" 5 | ID=devuan 6 | HOME_URL="http://www.devuan.org/" 7 | SUPPORT_URL="http://www.devuan.org/support/" 8 | BUG_REPORT_URL="https://bugs.devuan.org/" -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/systemd/system-preset/00-pve.preset.exp: -------------------------------------------------------------------------------- 1 | # Added by PVE at create-time for first-boot configuration. 2 | enable container-getty@.service 3 | disable getty@.service 4 | disable sys-kernel-config.mount 5 | disable sys-kernel-debug.mount 6 | enable systemd-networkd.service 7 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/commit/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | -------------------------------------------------------------------------------- /src/test/snapshot-input/commit/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | -------------------------------------------------------------------------------- /src/test/run_snapshot_tests.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use TAP::Harness; 7 | 8 | my $harness = TAP::Harness->new({ "verbosity" => -2 }); 9 | my $res = $harness->runtests("snapshot-test.pm"); 10 | system("rm -rf snapshot-working/"); 11 | exit -1 if $res->{failed}; 12 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/NetworkManager/system-connections/eth1.nmconnection.exp: -------------------------------------------------------------------------------- 1 | [connection] 2 | id=eth1 3 | uuid=00000000-0000-0000-0000-000000000000 4 | type=ethernet 5 | interface-name=eth1 6 | [ipv4] 7 | method=disabled 8 | [ipv6] 9 | method=manual 10 | address=fc00::1/64 11 | routes=fc00:1::ff 12 | -------------------------------------------------------------------------------- /src/PVE/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES=LXC.pm 2 | 3 | .PHONY: install 4 | install: $(SOURCES) 5 | install -d -m 0755 $(PERLDIR)/PVE 6 | for i in $(SOURCES); do install -D -m 0644 $$i $(PERLDIR)/PVE/$$i; done 7 | make -C API2 install 8 | make -C LXC install 9 | make -C VZDump install 10 | make -C CLI install 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/sysconfig/network-scripts/ifcfg-eth1.exp: -------------------------------------------------------------------------------- 1 | DEVICE=eth1 2 | ONBOOT=yes 3 | UUID=00000000-0000-0000-0000-000000000000 4 | BOOTPROTO=none 5 | IPV6INIT=yes 6 | IPV6ADDR=2222::1/64 7 | IPV6_AUTOCONF=no 8 | IPV6_DEFAULTGW=fe80::1 9 | DNS1=8.8.8.8 10 | DNS2=8.8.8.9 11 | DOMAIN=proxmox.com 12 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/NetworkManager/system-connections/eth0.nmconnection.exp: -------------------------------------------------------------------------------- 1 | [connection] 2 | id=eth0 3 | uuid=00000000-0000-0000-0000-000000000000 4 | type=ethernet 5 | interface-name=eth0 6 | [ipv4] 7 | method=auto 8 | dns=127.0.0.1;192.168.0.1 9 | dns-search=example.com 10 | [ipv6] 11 | method=disabled 12 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/etc/os-release: -------------------------------------------------------------------------------- 1 | NAME="openSUSE Leap" 2 | VERSION="42.2" 3 | ID=opensuse 4 | ID_LIKE="suse" 5 | VERSION_ID="42.2" 6 | PRETTY_NAME="openSUSE Leap 42.2" 7 | ANSI_COLOR="0;32" 8 | CPE_NAME="cpe:/o:opensuse:leap:42.2" 9 | BUG_REPORT_URL="https://bugs.opensuse.org" 10 | HOME_URL="https://www.opensuse.org/ 11 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/NetworkManager/system-connections/eth2.nmconnection.exp: -------------------------------------------------------------------------------- 1 | [connection] 2 | id=eth2 3 | uuid=00000000-0000-0000-0000-000000000000 4 | type=ethernet 5 | interface-name=eth2 6 | [ipv4] 7 | method=manual 8 | addresses=192.168.0.1/24 9 | dns=127.0.0.1 10 | dns-search=example.com 11 | [ipv6] 12 | method=disabled 13 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/os-release: -------------------------------------------------------------------------------- 1 | PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" 2 | NAME="Debian GNU/Linux" 3 | VERSION_ID="11" 4 | VERSION="11 (bullseye)" 5 | VERSION_CODENAME=bullseye 6 | ID=debian 7 | HOME_URL="https://www.debian.org/" 8 | SUPPORT_URL="https://www.debian.org/support" 9 | BUG_REPORT_URL="https://bugs.debian.org/" 10 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 24 | lxc/console 25 | lxc/tty1 26 | lxc/tty2 27 | lxc/tty3 28 | lxc/tty4 29 | -------------------------------------------------------------------------------- /src/test/snapshot-input/create/lxc/203.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | -------------------------------------------------------------------------------- /src/test/snapshot-input/create/lxc/204.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | -------------------------------------------------------------------------------- /src/test/test-centos10-001/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 24 | lxc/console 25 | lxc/tty1 26 | lxc/tty2 27 | lxc/tty3 28 | lxc/tty4 29 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 24 | lxc/console 25 | lxc/tty1 26 | lxc/tty2 27 | lxc/tty3 28 | lxc/tty4 29 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 24 | lxc/console 25 | lxc/tty1 26 | lxc/tty2 27 | lxc/tty3 28 | lxc/tty4 29 | -------------------------------------------------------------------------------- /src/test/test-centos8-001/etc/securetty.exp: -------------------------------------------------------------------------------- 1 | console 2 | vc/1 3 | vc/2 4 | vc/3 5 | vc/4 6 | vc/5 7 | vc/6 8 | vc/7 9 | vc/8 10 | vc/9 11 | vc/10 12 | vc/11 13 | tty1 14 | tty2 15 | tty3 16 | tty4 17 | tty5 18 | tty6 19 | tty7 20 | tty8 21 | tty9 22 | tty10 23 | tty11 24 | lxc/console 25 | lxc/tty1 26 | lxc/tty2 27 | lxc/tty3 28 | lxc/tty4 29 | -------------------------------------------------------------------------------- /src/test/test-opensuse-002/etc/os-release: -------------------------------------------------------------------------------- 1 | NAME=openSUSE 2 | VERSION="13.1 (Bottle)" 3 | VERSION_ID="13.1" 4 | PRETTY_NAME="openSUSE 13.1 (Bottle) (x86_64)" 5 | ID=opensuse 6 | ANSI_COLOR="0;32" 7 | CPE_NAME="cpe:/o:opensuse:opensuse:13.1" 8 | BUG_REPORT_URL="https://bugs.opensuse.org" 9 | HOME_URL="https://opensuse.org/" 10 | ID_LIKE="suse" 11 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/create/lxc/203.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/create/lxc/204.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/106.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/config: -------------------------------------------------------------------------------- 1 | hostname: test1 2 | net0: name=eth0,hwaddr=12:22:33:44:55:66,bridge=vmbr0,ip=10.0.0.100/32,gw=11.0.0.1 3 | net1: name=eth1,hwaddr=22:33:44:55:66:77,bridge=vmbr1,ip6=fc00::1/64,gw6=fc00:1::ff 4 | net2: name=eth2,hwaddr=32:44:55:66:77:88,bridge=vmbr2,ip=192.168.0.1/24 5 | searchdomain: example.com 6 | nameserver: 127.0.0.1 7 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/etc/os-release: -------------------------------------------------------------------------------- 1 | NAME=openSUSE 2 | VERSION="13.2 (Harlequin)" 3 | VERSION_ID="13.2" 4 | PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)" 5 | ID=opensuse 6 | ANSI_COLOR="0;32" 7 | CPE_NAME="cpe:/o:opensuse:opensuse:13.2" 8 | BUG_REPORT_URL="https://bugs.opensuse.org" 9 | HOME_URL="https://opensuse.org/" 10 | ID_LIKE="suse" 11 | -------------------------------------------------------------------------------- /src/test/test-centos6-002/etc/sysconfig/network-scripts/ifcfg-eth0.exp: -------------------------------------------------------------------------------- 1 | DEVICE=eth0 2 | ONBOOT=yes 3 | UUID=00000000-0000-0000-0000-000000000000 4 | BOOTPROTO=none 5 | IPADDR=1.2.3.4 6 | NETMASK=255.255.255.0 7 | GATEWAY=4.3.2.1 8 | IPV6INIT=yes 9 | IPV6ADDR=2000::1/64 10 | IPV6_AUTOCONF=no 11 | DNS1=8.8.8.8 12 | DNS2=8.8.8.9 13 | DOMAIN=proxmox.com 14 | -------------------------------------------------------------------------------- /src/test/test-opensuse-004/etc/os-release: -------------------------------------------------------------------------------- 1 | NAME="openSUSE Tumbleweed" 2 | # VERSION="20170729" 3 | ID=opensuse 4 | ID_LIKE="suse" 5 | VERSION_ID="20170729" 6 | PRETTY_NAME="openSUSE Tumbleweed" 7 | ANSI_COLOR="0;32" 8 | CPE_NAME="cpe:/o:opensuse:tumbleweed:20170729" 9 | BUG_REPORT_URL="https://bugs.opensuse.org" 10 | HOME_URL="https://www.opensuse.org/" 11 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/os-release: -------------------------------------------------------------------------------- 1 | PRETTY_NAME="Debian GNU/Linux 13 (trixie)" 2 | NAME="Debian GNU/Linux" 3 | VERSION_ID="13" 4 | VERSION="13 (trixie)" 5 | VERSION_CODENAME=trixie 6 | DEBIAN_VERSION_FULL=13.1 7 | ID=debian 8 | HOME_URL="https://www.debian.org/" 9 | SUPPORT_URL="https://www.debian.org/support" 10 | BUG_REPORT_URL="https://bugs.debian.org/" 11 | -------------------------------------------------------------------------------- /src/test/test-centos10-002/etc/NetworkManager/system-connections/eth0.nmconnection.exp: -------------------------------------------------------------------------------- 1 | [connection] 2 | id=eth0 3 | uuid=00000000-0000-0000-0000-000000000000 4 | type=ethernet 5 | interface-name=eth0 6 | [ipv4] 7 | method=manual 8 | addresses=10.0.0.100/32 9 | gateway=11.0.0.1 10 | routes=11.0.0.1 11 | dns=127.0.0.1 12 | dns-search=example.com 13 | [ipv6] 14 | method=disabled 15 | -------------------------------------------------------------------------------- /src/test/test-debian-002/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | iface lo inet6 loopback 4 | 5 | auto eth0 6 | iface eth0 inet static 7 | address 1.2.3.4 8 | netmask 255.255.255.0 9 | gateway 1.2.3.1 10 | 11 | auto eth1 12 | iface eth1 inet static 13 | address 10.2.3.4 14 | netmask 255.255.255.0 15 | 16 | auto eth2 17 | iface eth2 inet manual 18 | 19 | -------------------------------------------------------------------------------- /src/test/test-devuan-001/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | iface lo inet6 loopback 4 | 5 | auto eth0 6 | iface eth0 inet static 7 | address 1.2.3.4 8 | netmask 255.255.255.0 9 | gateway 1.2.3.1 10 | 11 | auto eth1 12 | iface eth1 inet static 13 | address 10.2.3.4 14 | netmask 255.255.255.0 15 | 16 | auto eth2 17 | iface eth2 inet manual 18 | 19 | -------------------------------------------------------------------------------- /src/test/snapshot-input/create/lxc/103.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 7 | mp1: local:snapshotable-disk-3,mp=/invalid/mp1 8 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 9 | ostype: redhat 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | -------------------------------------------------------------------------------- /src/system-pve\x2dcontainer.slice: -------------------------------------------------------------------------------- 1 | # needed because instances of template service units automatically 2 | # get their own slice with DefaultDependencies=yes, regardless of 3 | # the DefaultDependencies value of the template unit 4 | # 5 | # see man systemd.service and pve-container@.service 6 | [Unit] 7 | Description=PVE LXC Container Slice 8 | DefaultDependencies=No 9 | Documentation=man:pct 10 | -------------------------------------------------------------------------------- /src/PVE/LXC/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES= \ 2 | CGroup.pm \ 3 | Command.pm \ 4 | Config.pm \ 5 | Create.pm \ 6 | Migrate.pm \ 7 | Monitor.pm \ 8 | Namespaces.pm \ 9 | Setup.pm \ 10 | Tools.pm 11 | 12 | .PHONY: install 13 | install: $(SOURCES) 14 | install -d -m 0755 $(PERLDIR)/PVE/LXC 15 | for i in $(SOURCES); do install -D -m 0644 $$i $(PERLDIR)/PVE/LXC/$$i; done 16 | make -C Setup install 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/test-debian-006/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | iface lo inet6 loopback 4 | 5 | # Scenario: 6 | # An address was previously configured but then removed. 7 | 8 | # ipv6 removed 9 | auto eth0 10 | iface eth0 inet static 11 | address 1.2.3.4 12 | netmask 255.255.255.0 13 | 14 | # ipv4 removed 15 | auto eth1 16 | iface eth1 inet6 static 17 | address 1234::1 18 | netmask 64 19 | 20 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/init/tty.conf.exp: -------------------------------------------------------------------------------- 1 | # tty - getty 2 | # 3 | # This service maintains a getty on the specified device. 4 | # 5 | # Do not edit this file directly. If you want to change the behaviour, 6 | # please create a file tty.override and put your changes there. 7 | 8 | stop on runlevel [S016] 9 | 10 | respawn 11 | instance $TTY 12 | exec /sbin/mingetty --nohangup $TTY 13 | usage 'tty TTY=/dev/ttyX - where X is console id' 14 | -------------------------------------------------------------------------------- /src/test/test-debian-006/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | # Scenario: 2 | # An address was previously configured but then removed. 3 | 4 | # ipv6 removed 5 | auto eth0 6 | iface eth0 inet static 7 | address 1.2.3.4 8 | netmask 255.255.255.0 9 | 10 | iface eth0 inet6 static 11 | address fc00::1 12 | netmask 64 13 | 14 | # ipv4 removed 15 | auto eth1 16 | iface eth1 inet static 17 | address 2.3.4.5 18 | netmask 255.255.255.0 19 | 20 | iface eth1 inet6 static 21 | address 1234::1 22 | netmask 64 23 | 24 | -------------------------------------------------------------------------------- /src/PVE/LXC/Setup/Makefile: -------------------------------------------------------------------------------- 1 | SOURCES=\ 2 | Plugin.pm \ 3 | Base.pm \ 4 | Alpine.pm \ 5 | ArchLinux.pm \ 6 | CentOS.pm \ 7 | Debian.pm \ 8 | Devuan.pm \ 9 | Fedora.pm \ 10 | Gentoo.pm \ 11 | SUSE.pm \ 12 | Ubuntu.pm \ 13 | NixOS.pm \ 14 | OpenEuler.pm \ 15 | Unmanaged.pm \ 16 | 17 | .PHONY: install 18 | install: 19 | install -d -m 0755 ${PERLDIR}/PVE/LXC/Setup 20 | for i in ${SOURCES}; do install -D -m 0644 $$i ${PERLDIR}/PVE/LXC/Setup/$$i; done 21 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/commit/lxc/101.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/commit/lxc/203.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/prepare/lxc/102.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/prepare/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/commit/lxc/203.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/prepare/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/create/lxc/101.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/102.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/create/lxc/102.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/101.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/105.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:unsnapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:unsnapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/206.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/103.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test2 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test2] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:unsnapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:unsnapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/206.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:unsnapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:unsnapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | -------------------------------------------------------------------------------- /src/test/snapshot-input/commit/lxc/101.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snapstate: prepare 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/snapshot-input/prepare/lxc/200.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snapstate: prepare 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/test-opensuse-001/usr/lib/systemd/system/container-getty@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Container Getty on /dev/lxc/tty%I 3 | Documentation=man:agetty(8) man:machinectl(1) 4 | After=systemd-user-sessions.service plymouth-quit-wait.service 5 | After=rc-local.service 6 | Before=getty.target 7 | IgnoreOnIsolate=yes 8 | 9 | [Service] 10 | ExecStart=-/sbin/agetty --noclear --keep-baud lxc/tty%I 115200,38400,9600 $TERM 11 | Type=idle 12 | Restart=always 13 | RestartSec=0 14 | UtmpIdentifier=%I 15 | TTYPath=/dev/%I 16 | TTYReset=yes 17 | TTYVHangup=yes 18 | KillMode=process 19 | IgnoreSIGPIPE=no 20 | SendSIGHUP=yes 21 | -------------------------------------------------------------------------------- /src/test/test-opensuse-003/usr/lib/systemd/system/container-getty@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Container Getty on /dev/lxc/tty%I 3 | Documentation=man:agetty(8) man:machinectl(1) 4 | After=systemd-user-sessions.service plymouth-quit-wait.service 5 | After=rc-local.service 6 | Before=getty.target 7 | IgnoreOnIsolate=yes 8 | 9 | [Service] 10 | ExecStart=-/sbin/agetty --noclear --keep-baud lxc/tty%I 115200,38400,9600 $TERM 11 | Type=idle 12 | Restart=always 13 | RestartSec=0 14 | UtmpIdentifier=%I 15 | TTYPath=/dev/%I 16 | TTYReset=yes 17 | TTYVHangup=yes 18 | KillMode=process 19 | IgnoreSIGPIPE=no 20 | SendSIGHUP=yes 21 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/prepare/lxc/101.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snapstate: prepare 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/prepare/lxc/200.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snapstate: prepare 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: backup 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | rootfs: local:snapshotable-disk-1 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/202.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: backup 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | rootfs: local:snapshotable-disk-1 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/204.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: backup 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | rootfs: local:snapshotable-disk-1 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/204.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: backup 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | rootfs: local:snapshotable-disk-1 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/usr/lib/systemd/system/container-getty@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Container Getty on /dev/lxc/tty%I 3 | Documentation=man:agetty(8) man:machinectl(1) 4 | After=systemd-user-sessions.service plymouth-quit-wait.service 5 | After=rc-local.service 6 | Before=getty.target 7 | IgnoreOnIsolate=yes 8 | 9 | [Service] 10 | ExecStart=-/sbin/agetty --noclear --keep-baud lxc/tty%I 115200,38400,9600 $TERM 11 | Type=idle 12 | Restart=always 13 | RestartSec=0 14 | UtmpIdentifier=%I 15 | TTYPath=/dev/%I 16 | TTYReset=yes 17 | TTYVHangup=yes 18 | KillMode=process 19 | IgnoreSIGPIPE=no 20 | SendSIGHUP=yes 21 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/203.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snapstate: delete 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/203.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snapstate: delete 23 | snaptime: 1234567890 24 | swap: 512 25 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/205.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | vmstate: not-implemented 25 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/205.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | vmstate: not-implemented 25 | -------------------------------------------------------------------------------- /src/test/test-centos6-001/etc/init/start-ttys.conf.exp: -------------------------------------------------------------------------------- 1 | # 2 | # This service starts the configured number of gettys. 3 | # 4 | # Do not edit this file directly. If you want to change the behaviour, 5 | # please create a file start-ttys.override and put your changes there. 6 | 7 | start on stopped rc RUNLEVEL=[2345] 8 | 9 | env ACTIVE_CONSOLES=/dev/tty[1-6] 10 | env X_TTY=/dev/tty1 11 | task 12 | script 13 | . /etc/sysconfig/init 14 | for tty in $(echo $ACTIVE_CONSOLES) ; do 15 | [ "$RUNLEVEL" = "5" -a "$tty" = "$X_TTY" ] && continue 16 | initctl start tty TTY=$tty 17 | done 18 | end script 19 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/201.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot-delete 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | rootfs: local:unsnapshotable-disk-1 23 | snapstate: delete 24 | snaptime: 1234567890 25 | swap: 512 26 | -------------------------------------------------------------------------------- /src/test/test-opensuse-slowroll-001/etc/os-release: -------------------------------------------------------------------------------- 1 | NAME="openSUSE Tumbleweed-Slowroll" 2 | # VERSION="20240901" 3 | ID="opensuse-slowroll" 4 | ID_LIKE="opensuse suse" 5 | VERSION_ID="20240901" 6 | PRETTY_NAME="openSUSE Tumbleweed-Slowroll" 7 | ANSI_COLOR="0;32" 8 | # CPE 2.3 format, boo#1217921 9 | CPE_NAME="cpe:2.3:o:opensuse:slowroll:20240901:*:*:*:*:*:*:*" 10 | #CPE 2.2 format 11 | #CPE_NAME="cpe:/o:opensuse:slowroll:20240901" 12 | BUG_REPORT_URL="https://bugzilla.opensuse.org" 13 | SUPPORT_URL="https://bugs.opensuse.org" 14 | HOME_URL="https://www.opensuse.org" 15 | DOCUMENTATION_URL="https://en.opensuse.org/openSUSE:Slowroll" 16 | LOGO="distributor-logo-Slowroll" 17 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/etc/shadow: -------------------------------------------------------------------------------- 1 | root:!*:15908:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/etc/shadow: -------------------------------------------------------------------------------- 1 | root:!*:15908:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-debian-009/etc/shadow: -------------------------------------------------------------------------------- 1 | root:!*:15908:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-debian-014/etc/shadow: -------------------------------------------------------------------------------- 1 | root:!*:15908:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/shadow: -------------------------------------------------------------------------------- 1 | root:!*:15908:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/shadow: -------------------------------------------------------------------------------- 1 | root:!*:15908:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/101.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | unused0: preserved:some-disk-1 13 | 14 | [test] 15 | # should be thrown away 16 | arch: amd64 17 | cpulimit: 2 18 | cpuunits: 2048 19 | hostname: test2 20 | memory: 4096 21 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 22 | ostype: redhat 23 | rootfs: local:snapshotable-disk-1 24 | snaptime: 1234567890 25 | swap: 1024 26 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/101.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 2 4 | cpuunits: 2048 5 | hostname: test2 6 | memory: 4096 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 1024 12 | unused0: preserved:some-disk-1 13 | 14 | [test] 15 | # should be thrown away 16 | arch: amd64 17 | cpulimit: 2 18 | cpuunits: 2048 19 | hostname: test2 20 | memory: 4096 21 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 22 | ostype: redhat 23 | rootfs: local:snapshotable-disk-1 24 | snaptime: 1234567890 25 | swap: 1024 26 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/etc/shadow.exp: -------------------------------------------------------------------------------- 1 | root:$5$SALT$PASS:@DAYS@:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/etc/shadow.exp: -------------------------------------------------------------------------------- 1 | root:$5$SALT$PASS:@DAYS@:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-debian-009/etc/shadow.exp: -------------------------------------------------------------------------------- 1 | root:$5$SALT$PASS:@DAYS@:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-debian-014/etc/shadow.exp: -------------------------------------------------------------------------------- 1 | root:$5$SALT$PASS:@DAYS@:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/shadow.exp: -------------------------------------------------------------------------------- 1 | root:$5$SALT$PASS:@DAYS@:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/shadow.exp: -------------------------------------------------------------------------------- 1 | root:$5$SALT$PASS:@DAYS@:0:99999:7::: 2 | daemon:*:15908:0:99999:7::: 3 | bin:*:15908:0:99999:7::: 4 | sys:*:15908:0:99999:7::: 5 | sync:*:15908:0:99999:7::: 6 | games:*:15908:0:99999:7::: 7 | man:*:15908:0:99999:7::: 8 | lp:*:15908:0:99999:7::: 9 | mail:*:15908:0:99999:7::: 10 | news:*:15908:0:99999:7::: 11 | uucp:*:15908:0:99999:7::: 12 | proxy:*:15908:0:99999:7::: 13 | www-data:*:15908:0:99999:7::: 14 | backup:*:15908:0:99999:7::: 15 | list:*:15908:0:99999:7::: 16 | irc:*:15908:0:99999:7::: 17 | gnats:*:15908:0:99999:7::: 18 | nobody:*:15908:0:99999:7::: 19 | libuuid:!:15908:0:99999:7::: 20 | postfix:*:15908:0:99999:7::: 21 | sshd:*:15908:0:99999:7::: 22 | -------------------------------------------------------------------------------- /src/pve-container-stop-wrapper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | # sanity checks 7 | my $vmid = $ARGV[0] or exit(1); 8 | exit(0) if $vmid !~ /^\d+$/; 9 | exit(0) if !-e "/etc/pve/lxc/${vmid}.conf"; 10 | 11 | if (unlink("/var/lib/lxc/$vmid/reboot")) { 12 | # restart if rebooted from within container 13 | exec {'systemctl'} 'systemctl', '--no-block', 'restart', "pve-container\@${vmid}.service"; 14 | } elsif (!defined($ENV{EXIT_CODE}) || $ENV{EXIT_CODE} ne "exited") { 15 | # stop if called via "systemctl stop lxc@ID" 16 | exec {'lxc-stop'} 'lxc-stop', '-n', $vmid; 17 | } else { 18 | # just exit if container was shutdown from within or via lxc-stop 19 | exit(0); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/106.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 21 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 22 | ostype: redhat 23 | rootfs: local:snapshotable-disk-1 24 | snaptime: 1234567890 25 | swap: 512 26 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/203.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 21 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 22 | ostype: redhat 23 | rootfs: local:snapshotable-disk-1 24 | snaptime: 1234567890 25 | swap: 512 26 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/204.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 21 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 22 | ostype: redhat 23 | rootfs: local:snapshotable-disk-1 24 | snaptime: 1234567890 25 | swap: 512 26 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/204.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 21 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 22 | ostype: redhat 23 | rootfs: local:snapshotable-disk-1 24 | snaptime: 1234567890 25 | swap: 512 26 | -------------------------------------------------------------------------------- /src/pve-container@.service: -------------------------------------------------------------------------------- 1 | # based on lxc@.service, but without an install section because 2 | # starting and stopping should be initiated by PVE code, not 3 | # systemd. 4 | [Unit] 5 | Description=PVE LXC Container: %i 6 | DefaultDependencies=No 7 | After=lxc.service 8 | Wants=lxc.service 9 | Documentation=man:lxc-start man:lxc man:pct 10 | 11 | [Service] 12 | Type=simple 13 | Delegate=yes 14 | KillMode=mixed 15 | TimeoutStopSec=120s 16 | ExecStart=/usr/bin/lxc-start -F -n %i 17 | ExecStop=/usr/share/lxc/pve-container-stop-wrapper %i 18 | # Environment=BOOTUP=serial 19 | # Environment=CONSOLETYPE=serial 20 | # Prevent container init from putting all its output into the journal 21 | StandardOutput=null 22 | StandardError=file:/run/pve/ct-%i.stderr 23 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | %: 13 | dh $@ 14 | 15 | override_dh_installsystemd: 16 | dh_installsystemd -ppve-container --no-start --no-enable --no-restart-after-upgrade -r 'system-pve\x2dcontainer.slice' 17 | 18 | override_dh_install: 19 | dh_apparmor -p pve-container --profile-name=pve-container-mounthotplug 20 | -------------------------------------------------------------------------------- /src/test/Makefile: -------------------------------------------------------------------------------- 1 | RUN_USERNS := lxc-usernsexec -m "u:0:`id -u`:1" -m "g:0:`id -g`:1" -- 2 | 3 | all: test 4 | 5 | test: test_setup test_snapshot test_bindmount test_idmap 6 | 7 | test_setup: run_setup_tests.pl 8 | if test -e /run/lock/sbuild; then \ 9 | echo skipping userns tests in sbuild environment ; \ 10 | else \ 11 | $(RUN_USERNS) ./run_setup_tests.pl ; \ 12 | fi 13 | 14 | test_snapshot: run_snapshot_tests.pl 15 | ./run_snapshot_tests.pl 16 | 17 | test_bindmount: bindmount_test.pl 18 | if test -e /run/lock/sbuild; then \ 19 | echo skipping userns tests in sbuild environment ; \ 20 | else \ 21 | $(RUN_USERNS) ./bindmount_test.pl ; \ 22 | fi 23 | 24 | test_idmap: run_idmap_tests.pl 25 | ./run_idmap_tests.pl 26 | 27 | clean: 28 | rm -rf tmprootfs 29 | -------------------------------------------------------------------------------- /src/pve-container-debug@.service: -------------------------------------------------------------------------------- 1 | # based on lxc@.service, but without an install section because 2 | # starting and stopping should be initiated by PVE code, not 3 | # systemd. 4 | [Unit] 5 | Description=PVE LXC Container: %i 6 | DefaultDependencies=No 7 | After=lxc.service 8 | Wants=lxc.service 9 | Documentation=man:lxc-start man:lxc man:pct 10 | 11 | [Service] 12 | Type=simple 13 | Delegate=yes 14 | KillMode=mixed 15 | TimeoutStopSec=120s 16 | ExecStart=/usr/bin/lxc-start -F -n %i -o /dev/stderr -l DEBUG 17 | ExecStop=/usr/share/lxc/pve-container-stop-wrapper %i 18 | # Environment=BOOTUP=serial 19 | # Environment=CONSOLETYPE=serial 20 | # Prevent container init from putting all its output into the journal 21 | StandardOutput=null 22 | StandardError=file:/run/pve/ct-%i.stderr 23 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/203.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot-delete 6 | memory: 2048 7 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 8 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 9 | ostype: redhat 10 | parent: test 11 | rootfs: local:snapshotable-disk-1 12 | swap: 512 13 | 14 | [test] 15 | #test comment 16 | arch: amd64 17 | cpulimit: 1 18 | cpuunits: 1024 19 | hostname: test 20 | memory: 2048 21 | mp0: local:unsnapshotable-disk-1,mp=/invalid/mountpoint 22 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 23 | ostype: redhat 24 | snapstate: delete 25 | snaptime: 1234567890 26 | swap: 512 27 | unused0: local:snapshotable-disk-1 28 | -------------------------------------------------------------------------------- /src/test/test-debian-001/etc/crontab: -------------------------------------------------------------------------------- 1 | # /etc/crontab: system-wide crontab 2 | # Unlike any other crontab you don't have to run the `crontab' 3 | # command to install the new version when you edit this file 4 | # and files in /etc/cron.d. These files also have username fields, 5 | # that none of the other crontabs do. 6 | 7 | SHELL=/bin/sh 8 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 9 | 10 | # m h dom mon dow user command 11 | 17 * * * * root cd / && run-parts --report /etc/cron.hourly 12 | 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 13 | 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 14 | 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) 15 | # 16 | -------------------------------------------------------------------------------- /src/test/test-debian-001/etc/crontab.exp: -------------------------------------------------------------------------------- 1 | # /etc/crontab: system-wide crontab 2 | # Unlike any other crontab you don't have to run the `crontab' 3 | # command to install the new version when you edit this file 4 | # and files in /etc/cron.d. These files also have username fields, 5 | # that none of the other crontabs do. 6 | 7 | SHELL=/bin/sh 8 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 9 | 10 | # m h dom mon dow user command 11 | 10 * * * * root cd / && run-parts --report /etc/cron.hourly 12 | 44 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 13 | 5 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 14 | 51 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) 15 | # 16 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/create/lxc/103.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 7 | mp1: local:snapshotable-disk-3,mp=/invalid/mp1 8 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 9 | ostype: redhat 10 | parent: test 11 | rootfs: local:snapshotable-disk-1 12 | swap: 512 13 | 14 | [test] 15 | #test comment 16 | arch: amd64 17 | cpulimit: 1 18 | cpuunits: 1024 19 | hostname: test 20 | memory: 2048 21 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 22 | mp1: local:snapshotable-disk-3,mp=/invalid/mp1 23 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 24 | ostype: redhat 25 | rootfs: local:snapshotable-disk-1 26 | snaptime: 1234567890 27 | swap: 512 28 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright (C) 2015 - 2024 Proxmox Server Solutions GmbH 2 | 3 | This software is written by Proxmox Server Solutions GmbH 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Affero General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Affero General Public License for more details. 14 | 15 | You should have received a copy of the GNU Affero General Public License 16 | along with this program. If not, see . 17 | -------------------------------------------------------------------------------- /src/test/test-opensuse-004/usr/lib/systemd/system/container-getty@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Container Getty on /dev/pts/%I 3 | Documentation=man:agetty(8) man:machinectl(1) 4 | After=systemd-user-sessions.service plymouth-quit-wait.service 5 | After=rc-local.service 6 | Before=getty.target 7 | IgnoreOnIsolate=yes 8 | ConditionPathExists=/dev/pts/%I 9 | 10 | [Service] 11 | # The '-o' option value tells agetty to replace 'login' arguments with an 12 | # option to preserve environment (-p), followed by '--' for safety, and then 13 | # the entered username. 14 | ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud pts/%I 115200,38400,9600 $TERM 15 | Type=idle 16 | Restart=always 17 | RestartSec=0 18 | UtmpIdentifier=pts/%I 19 | TTYPath=/dev/pts/%I 20 | TTYReset=yes 21 | TTYVHangup=yes 22 | KillMode=process 23 | IgnoreSIGPIPE=no 24 | SendSIGHUP=yes 25 | -------------------------------------------------------------------------------- /src/test/test-opensuse-005/usr/lib/systemd/system/container-getty@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Container Getty on /dev/pts/%I 3 | Documentation=man:agetty(8) man:machinectl(1) 4 | After=systemd-user-sessions.service plymouth-quit-wait.service 5 | After=rc-local.service 6 | Before=getty.target 7 | IgnoreOnIsolate=yes 8 | ConditionPathExists=/dev/pts/%I 9 | 10 | [Service] 11 | # The '-o' option value tells agetty to replace 'login' arguments with an 12 | # option to preserve environment (-p), followed by '--' for safety, and then 13 | # the entered username. 14 | ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud pts/%I 115200,38400,9600 $TERM 15 | Type=idle 16 | Restart=always 17 | RestartSec=0 18 | UtmpIdentifier=pts/%I 19 | TTYPath=/dev/pts/%I 20 | TTYReset=yes 21 | TTYVHangup=yes 22 | KillMode=process 23 | IgnoreSIGPIPE=no 24 | SendSIGHUP=yes 25 | -------------------------------------------------------------------------------- /src/test/test-fedora-001/etc/os-release: -------------------------------------------------------------------------------- 1 | NAME="Fedora Linux" 2 | VERSION="41 (Container Image Prerelease)" 3 | ID=fedora 4 | VERSION_ID=41 5 | VERSION_CODENAME="" 6 | PLATFORM_ID="platform:f41" 7 | PRETTY_NAME="Fedora Linux 41 (Container Image Prerelease)" 8 | ANSI_COLOR="0;38;2;60;110;180" 9 | LOGO=fedora-logo-icon 10 | CPE_NAME="cpe:/o:fedoraproject:fedora:41" 11 | DEFAULT_HOSTNAME="fedora" 12 | HOME_URL="https://fedoraproject.org/" 13 | DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f41/system-administrators-guide/" 14 | SUPPORT_URL="https://ask.fedoraproject.org/" 15 | BUG_REPORT_URL="https://bugzilla.redhat.com/" 16 | REDHAT_BUGZILLA_PRODUCT="Fedora" 17 | REDHAT_BUGZILLA_PRODUCT_VERSION=41 18 | REDHAT_SUPPORT_PRODUCT="Fedora" 19 | REDHAT_SUPPORT_PRODUCT_VERSION=41 20 | SUPPORT_END=2025-05-13 21 | VARIANT="Container Image" 22 | VARIANT_ID=container 23 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/105.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | memory: 2048 7 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 8 | mp1: local:snapshotable-disk-3,mp=/invalid/mp1 9 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 10 | ostype: redhat 11 | parent: test 12 | rootfs: local:snapshotable-disk-1 13 | swap: 512 14 | unused0: preserved:some-disk-1 15 | 16 | [test] 17 | # should be thrown away 18 | arch: amd64 19 | cpulimit: 2 20 | cpuunits: 2048 21 | hostname: test2 22 | memory: 4096 23 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 24 | mp1: local:snapshotable-disk-3,mp=/invalid/mp1 25 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 26 | ostype: redhat 27 | rootfs: local:snapshotable-disk-1 28 | snaptime: 1234567890 29 | swap: 1024 30 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/207.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | memory: 2048 7 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 8 | mp1: local:unsnapshotable-disk-1,mp=/invalid/mp1 9 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 10 | ostype: redhat 11 | parent: test 12 | rootfs: local:snapshotable-disk-1 13 | swap: 512 14 | unused0: preserved:some-disk-1 15 | 16 | [test] 17 | # should be thrown away 18 | arch: amd64 19 | cpulimit: 2 20 | cpuunits: 2048 21 | hostname: test2 22 | memory: 4096 23 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 24 | mp1: local:unsnapshotable-disk-1,mp=/invalid/mp1 25 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 26 | ostype: redhat 27 | rootfs: local:snapshotable-disk-1 28 | snaptime: 1234567890 29 | swap: 1024 30 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/208.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | memory: 2048 7 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 8 | mp1: local:unsnapshotable-disk-1,mp=/invalid/mp1 9 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 10 | ostype: redhat 11 | parent: test 12 | rootfs: local:snapshotable-disk-1 13 | swap: 512 14 | unused0: preserved:some-disk-1 15 | 16 | [test] 17 | # should be thrown away 18 | arch: amd64 19 | cpulimit: 2 20 | cpuunits: 2048 21 | hostname: test2 22 | memory: 4096 23 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 24 | mp1: local:snapshotable-disk-4,mp=/invalid/mp1 25 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 26 | ostype: redhat 27 | rootfs: local:snapshotable-disk-1 28 | snaptime: 1234567890 29 | swap: 1024 30 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/209.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | memory: 2048 7 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 8 | mp1: local:unsnapshotable-disk-1,mp=/invalid/mp1 9 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 10 | ostype: redhat 11 | parent: test 12 | rootfs: local:snapshotable-disk-1 13 | swap: 512 14 | unused0: preserved:some-disk-1 15 | 16 | [test] 17 | # should be thrown away 18 | arch: amd64 19 | cpulimit: 2 20 | cpuunits: 2048 21 | hostname: test2 22 | memory: 4096 23 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 24 | mp1: local:snapshotable-disk-4,mp=/invalid/mp1 25 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 26 | ostype: redhat 27 | rootfs: local:snapshotable-disk-1 28 | snaptime: 1234567890 29 | swap: 1024 30 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/105.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 2 4 | cpuunits: 2048 5 | hostname: test2 6 | memory: 4096 7 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 8 | mp1: local:snapshotable-disk-3,mp=/invalid/mp1 9 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 10 | ostype: redhat 11 | parent: test 12 | rootfs: local:snapshotable-disk-1 13 | swap: 1024 14 | unused0: preserved:some-disk-1 15 | 16 | [test] 17 | # should be thrown away 18 | arch: amd64 19 | cpulimit: 2 20 | cpuunits: 2048 21 | hostname: test2 22 | memory: 4096 23 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 24 | mp1: local:snapshotable-disk-3,mp=/invalid/mp1 25 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 26 | ostype: redhat 27 | rootfs: local:snapshotable-disk-1 28 | snaptime: 1234567890 29 | swap: 1024 30 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/207.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | memory: 2048 7 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 8 | mp1: local:unsnapshotable-disk-1,mp=/invalid/mp1 9 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 10 | ostype: redhat 11 | parent: test 12 | rootfs: local:snapshotable-disk-1 13 | swap: 512 14 | unused0: preserved:some-disk-1 15 | 16 | [test] 17 | # should be thrown away 18 | arch: amd64 19 | cpulimit: 2 20 | cpuunits: 2048 21 | hostname: test2 22 | memory: 4096 23 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 24 | mp1: local:unsnapshotable-disk-1,mp=/invalid/mp1 25 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 26 | ostype: redhat 27 | rootfs: local:snapshotable-disk-1 28 | snaptime: 1234567890 29 | swap: 1024 30 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/209.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | memory: 2048 7 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 8 | mp1: local:unsnapshotable-disk-1,mp=/invalid/mp1 9 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 10 | ostype: redhat 11 | parent: test 12 | rootfs: local:snapshotable-disk-1 13 | swap: 512 14 | unused0: preserved:some-disk-1 15 | 16 | [test] 17 | # should be thrown away 18 | arch: amd64 19 | cpulimit: 2 20 | cpuunits: 2048 21 | hostname: test2 22 | memory: 4096 23 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 24 | mp1: local:snapshotable-disk-4,mp=/invalid/mp1 25 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 26 | ostype: redhat 27 | rootfs: local:snapshotable-disk-1 28 | snaptime: 1234567890 29 | swap: 1024 30 | -------------------------------------------------------------------------------- /src/test/test-debian-012/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100 7 | netmask 255.255.255.255 8 | # --- BEGIN PVE --- 9 | post-up ip route add 11.0.0.1 dev eth0 10 | post-up ip route add default via 11.0.0.1 dev eth0 11 | pre-down ip route del default via 11.0.0.1 dev eth0 12 | pre-down ip route del 11.0.0.1 dev eth0 13 | # --- END PVE --- 14 | 15 | auto eth1 16 | iface eth1 inet6 static 17 | address fc00::1 18 | netmask 64 19 | # --- BEGIN PVE --- 20 | post-up ip route add fc00:1::ff dev eth1 21 | post-up ip route add default via fc00:1::ff dev eth1 22 | pre-down ip route del default via fc00:1::ff dev eth1 23 | pre-down ip route del fc00:1::ff dev eth1 24 | # --- END PVE --- 25 | 26 | auto eth2 27 | iface eth2 inet6 static 28 | address fc02::1 29 | netmask 64 30 | gateway fe80::1 31 | 32 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/208.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | lock: rollback 7 | memory: 2048 8 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 9 | mp1: local:unsnapshotable-disk-1,mp=/invalid/mp1 10 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 11 | ostype: redhat 12 | parent: test 13 | rootfs: local:snapshotable-disk-1 14 | swap: 512 15 | unused0: preserved:some-disk-1 16 | 17 | [test] 18 | # should be thrown away 19 | arch: amd64 20 | cpulimit: 2 21 | cpuunits: 2048 22 | hostname: test2 23 | memory: 4096 24 | mp0: local:snapshotable-disk-2,mp=/invalid/mp0 25 | mp1: local:snapshotable-disk-4,mp=/invalid/mp1 26 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 27 | ostype: redhat 28 | rootfs: local:snapshotable-disk-1 29 | snaptime: 1234567890 30 | swap: 1024 31 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/commit/lxc/102.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test2 9 | rootfs: somestore:somedisk 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: somestore:somedisk 22 | snaptime: 1234567890 23 | swap: 512 24 | 25 | [test2] 26 | #test comment 27 | arch: amd64 28 | cpulimit: 1 29 | cpuunits: 1024 30 | hostname: test 31 | memory: 2048 32 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 33 | ostype: redhat 34 | parent: test 35 | rootfs: somestore:somedisk 36 | snaptime: 1234567890 37 | swap: 512 38 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/create/lxc/102.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test2 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | 25 | [test2] 26 | #test comment 27 | arch: amd64 28 | cpulimit: 1 29 | cpuunits: 1024 30 | hostname: test 31 | memory: 2048 32 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 33 | ostype: redhat 34 | parent: test 35 | rootfs: local:snapshotable-disk-1 36 | snaptime: 1234567890 37 | swap: 512 38 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/delete/lxc/104.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test3 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | 25 | [test3] 26 | #test comment 27 | arch: amd64 28 | cpulimit: 1 29 | cpuunits: 1024 30 | hostname: test 31 | memory: 2048 32 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 33 | ostype: redhat 34 | parent: test 35 | rootfs: local:snapshotable-disk-1 36 | snaptime: 1234567890 37 | swap: 512 38 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/102.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test2 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | 25 | [test2] 26 | #test comment 27 | arch: amd64 28 | cpulimit: 1 29 | cpuunits: 1024 30 | hostname: test 31 | memory: 2048 32 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 33 | ostype: redhat 34 | parent: test 35 | rootfs: local:snapshotable-disk-1 36 | snaptime: 1234567890 37 | swap: 512 38 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/103.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test2 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | 25 | [test2] 26 | #test comment 27 | arch: amd64 28 | cpulimit: 1 29 | cpuunits: 1024 30 | hostname: test 31 | memory: 2048 32 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 33 | ostype: redhat 34 | parent: test 35 | rootfs: local:snapshotable-disk-1 36 | snaptime: 1234567890 37 | swap: 512 38 | -------------------------------------------------------------------------------- /src/test/snapshot-input/commit/lxc/102.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: somestore:somedisk 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | rootfs: somestore:somedisk 23 | snaptime: 1234567890 24 | swap: 512 25 | 26 | [test2] 27 | #test comment 28 | arch: amd64 29 | cpulimit: 1 30 | cpuunits: 1024 31 | hostname: test 32 | memory: 2048 33 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 34 | ostype: redhat 35 | parent: test 36 | rootfs: somestore:somedisk 37 | snapstate: prepare 38 | snaptime: 1234567890 39 | swap: 512 40 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/prepare/lxc/102.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | lock: snapshot 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: somestore:somedisk 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | rootfs: somestore:somedisk 23 | snaptime: 1234567890 24 | swap: 512 25 | 26 | [test2] 27 | #test comment 28 | arch: amd64 29 | cpulimit: 1 30 | cpuunits: 1024 31 | hostname: test 32 | memory: 2048 33 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 34 | ostype: redhat 35 | parent: test 36 | rootfs: somestore:somedisk 37 | snapstate: prepare 38 | snaptime: 1234567890 39 | swap: 512 40 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/102.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 2 4 | cpuunits: 2048 5 | hostname: test 6 | memory: 4096 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test2 10 | rootfs: local:snapshotable-disk-1 11 | swap: 1024 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | rootfs: local:snapshotable-disk-1 23 | snaptime: 1234567890 24 | swap: 512 25 | 26 | [test2] 27 | #test comment 28 | arch: amd64 29 | cpulimit: 2 30 | cpuunits: 2048 31 | hostname: test 32 | memory: 4096 33 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 34 | ostype: redhat 35 | parent: test 36 | rootfs: local:snapshotable-disk-1 37 | snaptime: 1234567890 38 | swap: 1024 39 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/102.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test2 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 1 17 | cpuunits: 1024 18 | hostname: test 19 | memory: 2048 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | rootfs: local:snapshotable-disk-1 23 | snaptime: 1234567890 24 | swap: 512 25 | 26 | [test2] 27 | #test comment 28 | arch: amd64 29 | cpulimit: 2 30 | cpuunits: 2048 31 | hostname: test 32 | memory: 4096 33 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 34 | ostype: redhat 35 | parent: test 36 | rootfs: local:snapshotable-disk-1 37 | snaptime: 1234567890 38 | swap: 1024 39 | -------------------------------------------------------------------------------- /src/test/test-debian-009/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/root:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-alpine-003/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-debian-009/etc/passwd.exp: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/root:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-debian-014/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/103.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 1 4 | cpuunits: 1024 5 | hostname: test 6 | memory: 2048 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test2 10 | rootfs: local:snapshotable-disk-1 11 | swap: 512 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 2 17 | cpuunits: 2048 18 | hostname: test 19 | memory: 4096 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | parent: test 23 | rootfs: local:snapshotable-disk-1 24 | snaptime: 1234567890 25 | swap: 1024 26 | 27 | [test2] 28 | #test comment 29 | arch: amd64 30 | cpulimit: 1 31 | cpuunits: 1024 32 | hostname: test 33 | memory: 2048 34 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 35 | ostype: redhat 36 | parent: test 37 | rootfs: local:snapshotable-disk-1 38 | snaptime: 1234567890 39 | swap: 512 40 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/etc/passwd.exp: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100/32 7 | post-up ip route add 11.0.0.1 dev eth0 8 | post-up ip route add default via 11.0.0.1 dev eth0 9 | pre-down ip route del default via 11.0.0.1 dev eth0 10 | pre-down ip route del 11.0.0.1 dev eth0 11 | 12 | auto eth1 13 | iface eth1 inet6 static 14 | address fc00::1/64 15 | post-up ip route add fc00:1::ff/64 dev eth1 16 | post-up ip route add default via fc00:1::ff dev eth1 17 | pre-down ip route del default via fc00:1::ff/64 dev eth1 18 | pre-down ip route del fc00:1::ff dev eth1 19 | 20 | auto eth2 21 | iface eth2 inet static 22 | address 192.168.0.1/24 23 | post-up ip route add 192.168.1.1 dev eth2 table internal 24 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 25 | pre-down ip rule add from 192.168.0.128/25 table internal 26 | pre-down ip rule add to 192.168.0.128/25 table internal 27 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/etc/passwd.exp: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-debian-014/etc/passwd.exp: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/passwd.exp: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/passwd.exp: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/roothome:/bin/bash 2 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 | bin:x:2:2:bin:/bin:/bin/sh 4 | sys:x:3:3:sys:/dev:/bin/sh 5 | sync:x:4:65534:sync:/bin:/bin/sync 6 | games:x:5:60:games:/usr/games:/bin/sh 7 | man:x:6:12:man:/var/cache/man:/bin/sh 8 | lp:x:7:7:lp:/var/spool/lpd:/bin/sh 9 | mail:x:8:8:mail:/var/mail:/bin/sh 10 | news:x:9:9:news:/var/spool/news:/bin/sh 11 | uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh 12 | proxy:x:13:13:proxy:/bin:/bin/sh 13 | www-data:x:33:33:www-data:/var/www:/bin/sh 14 | backup:x:34:34:backup:/var/backups:/bin/sh 15 | list:x:38:38:Mailing List Manager:/var/list:/bin/sh 16 | irc:x:39:39:ircd:/var/run/ircd:/bin/sh 17 | gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh 18 | nobody:x:65534:65534:nobody:/nonexistent:/bin/sh 19 | libuuid:x:100:101::/var/lib/libuuid:/bin/sh 20 | postfix:x:101:104::/var/spool/postfix:/bin/false 21 | sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin 22 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/103.conf: -------------------------------------------------------------------------------- 1 | # should be preserved 2 | arch: amd64 3 | cpulimit: 2 4 | cpuunits: 2048 5 | hostname: test 6 | memory: 4096 7 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 8 | ostype: redhat 9 | parent: test 10 | rootfs: local:snapshotable-disk-1 11 | swap: 1024 12 | 13 | [test] 14 | #test comment 15 | arch: amd64 16 | cpulimit: 2 17 | cpuunits: 2048 18 | hostname: test 19 | memory: 4096 20 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 21 | ostype: redhat 22 | parent: test 23 | rootfs: local:snapshotable-disk-1 24 | snaptime: 1234567890 25 | swap: 1024 26 | 27 | [test2] 28 | #test comment 29 | arch: amd64 30 | cpulimit: 1 31 | cpuunits: 1024 32 | hostname: test 33 | memory: 2048 34 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 35 | ostype: redhat 36 | parent: test 37 | rootfs: local:snapshotable-disk-1 38 | snaptime: 1234567890 39 | swap: 512 40 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100 7 | netmask 255.255.255.255 8 | post-up ip route add 11.0.0.1 dev eth0 9 | post-up ip route add default via 11.0.0.1 dev eth0 10 | pre-down ip route del default via 11.0.0.1 dev eth0 11 | pre-down ip route del 11.0.0.1 dev eth0 12 | 13 | auto eth1 14 | iface eth1 inet6 static 15 | address fc00::1 16 | netmask 64 17 | post-up ip route add fc00:1::ff/64 dev eth1 18 | post-up ip route add default via fc00:1::ff dev eth1 19 | pre-down ip route del default via fc00:1::ff/64 dev eth1 20 | pre-down ip route del fc00:1::ff dev eth1 21 | 22 | auto eth2 23 | iface eth2 inet static 24 | address 192.168.0.1 25 | netmask 255.255.255.0 26 | post-up ip route add 192.168.1.1 dev eth2 table internal 27 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 28 | pre-down ip rule add from 192.168.0.128/25 table internal 29 | pre-down ip rule add to 192.168.0.128/25 table internal 30 | -------------------------------------------------------------------------------- /src/test/test-debian-014/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100 7 | netmask 255.255.255.255 8 | post-up ip route add 11.0.0.1 dev eth0 9 | post-up ip route add default via 11.0.0.1 dev eth0 10 | pre-down ip route del default via 11.0.0.1 dev eth0 11 | pre-down ip route del 11.0.0.1 dev eth0 12 | 13 | auto eth1 14 | iface eth1 inet6 static 15 | address fc00::1 16 | netmask 64 17 | post-up ip route add fc00:1::ff/64 dev eth1 18 | post-up ip route add default via fc00:1::ff dev eth1 19 | pre-down ip route del default via fc00:1::ff/64 dev eth1 20 | pre-down ip route del fc00:1::ff dev eth1 21 | 22 | auto eth2 23 | iface eth2 inet static 24 | address 192.168.0.1 25 | netmask 255.255.255.0 26 | post-up ip route add 192.168.1.1 dev eth2 table internal 27 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 28 | pre-down ip rule add from 192.168.0.128/25 table internal 29 | pre-down ip rule add to 192.168.0.128/25 table internal 30 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100 7 | netmask 255.255.255.255 8 | post-up ip route add 11.0.0.1 dev eth0 9 | post-up ip route add default via 11.0.0.1 dev eth0 10 | pre-down ip route del default via 11.0.0.1 dev eth0 11 | pre-down ip route del 11.0.0.1 dev eth0 12 | 13 | auto eth1 14 | iface eth1 inet6 static 15 | address fc00::1 16 | netmask 64 17 | post-up ip route add fc00:1::ff/64 dev eth1 18 | post-up ip route add default via fc00:1::ff dev eth1 19 | pre-down ip route del default via fc00:1::ff/64 dev eth1 20 | pre-down ip route del fc00:1::ff dev eth1 21 | 22 | auto eth2 23 | iface eth2 inet static 24 | address 192.168.0.1 25 | netmask 255.255.255.0 26 | post-up ip route add 192.168.1.1 dev eth2 table internal 27 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 28 | pre-down ip rule add from 192.168.0.128/25 table internal 29 | pre-down ip rule add to 192.168.0.128/25 table internal 30 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100 7 | netmask 255.255.255.255 8 | post-up ip route add 11.0.0.1 dev eth0 9 | post-up ip route add default via 11.0.0.1 dev eth0 10 | pre-down ip route del default via 11.0.0.1 dev eth0 11 | pre-down ip route del 11.0.0.1 dev eth0 12 | 13 | auto eth1 14 | iface eth1 inet6 static 15 | address fc00::1 16 | netmask 64 17 | post-up ip route add fc00:1::ff/64 dev eth1 18 | post-up ip route add default via fc00:1::ff dev eth1 19 | pre-down ip route del default via fc00:1::ff/64 dev eth1 20 | pre-down ip route del fc00:1::ff dev eth1 21 | 22 | auto eth2 23 | iface eth2 inet static 24 | address 192.168.0.1 25 | netmask 255.255.255.0 26 | post-up ip route add 192.168.1.1 dev eth2 table internal 27 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 28 | pre-down ip rule add from 192.168.0.128/25 table internal 29 | pre-down ip rule add to 192.168.0.128/25 table internal 30 | -------------------------------------------------------------------------------- /src/PVE/LXC/Setup/OpenEuler.pm: -------------------------------------------------------------------------------- 1 | package PVE::LXC::Setup::OpenEuler; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use PVE::LXC::Setup::CentOS; 7 | use base qw(PVE::LXC::Setup::CentOS); 8 | 9 | sub new { 10 | my ($class, $conf, $rootdir, $os_release) = @_; 11 | 12 | my $version = $os_release->{VERSION_ID}; 13 | # we cannot really win anything by actively dying on newer versions so only check lower boundary. 14 | die "unsupported openEuler release '$version'\n" if !defined($version) || $version < 24; 15 | 16 | my $self = { conf => $conf, rootdir => $rootdir, version => $version }; 17 | 18 | $conf->{ostype} = "openeuler"; 19 | 20 | return bless $self, $class; 21 | } 22 | 23 | sub template_fixup { 24 | my ($self, $conf) = @_; 25 | 26 | $self->remove_lxc_name_from_etc_hosts(); 27 | $self->setup_systemd_disable_static_units(['dev-mqueue.mount']); 28 | } 29 | 30 | sub setup_init { 31 | my ($self, $conf) = @_; 32 | $self->setup_container_getty_service($conf); 33 | $self->setup_systemd_preset(); 34 | } 35 | 36 | 1; 37 | -------------------------------------------------------------------------------- /src/test/snapshot-input/delete/lxc/104.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test3 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | 25 | [test2] 26 | #test comment 27 | arch: amd64 28 | cpulimit: 1 29 | cpuunits: 1024 30 | hostname: test 31 | memory: 2048 32 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 33 | ostype: redhat 34 | parent: test 35 | rootfs: local:snapshotable-disk-1 36 | snaptime: 1234567890 37 | swap: 512 38 | 39 | [test3] 40 | #test comment 41 | arch: amd64 42 | cpulimit: 1 43 | cpuunits: 1024 44 | hostname: test 45 | memory: 2048 46 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 47 | ostype: redhat 48 | parent: test2 49 | rootfs: local:snapshotable-disk-1 50 | snaptime: 1234567890 51 | swap: 512 52 | -------------------------------------------------------------------------------- /src/test/snapshot-input/rollback/lxc/104.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 1 3 | cpuunits: 1024 4 | hostname: test 5 | memory: 2048 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test3 9 | rootfs: local:snapshotable-disk-1 10 | swap: 512 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | 25 | [test2] 26 | #test comment 27 | arch: amd64 28 | cpulimit: 2 29 | cpuunits: 2048 30 | hostname: test 31 | memory: 4096 32 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 33 | ostype: redhat 34 | parent: test 35 | rootfs: local:snapshotable-disk-1 36 | snaptime: 1234567890 37 | swap: 1024 38 | 39 | [test3] 40 | #test comment 41 | arch: amd64 42 | cpulimit: 1 43 | cpuunits: 1024 44 | hostname: test 45 | memory: 2048 46 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 47 | ostype: redhat 48 | parent: test2 49 | rootfs: local:snapshotable-disk-1 50 | snaptime: 1234567890 51 | swap: 512 52 | -------------------------------------------------------------------------------- /src/test/snapshot-expected/rollback/lxc/104.conf: -------------------------------------------------------------------------------- 1 | arch: amd64 2 | cpulimit: 2 3 | cpuunits: 2048 4 | hostname: test 5 | memory: 4096 6 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 7 | ostype: redhat 8 | parent: test2 9 | rootfs: local:snapshotable-disk-1 10 | swap: 1024 11 | 12 | [test] 13 | #test comment 14 | arch: amd64 15 | cpulimit: 1 16 | cpuunits: 1024 17 | hostname: test 18 | memory: 2048 19 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 20 | ostype: redhat 21 | rootfs: local:snapshotable-disk-1 22 | snaptime: 1234567890 23 | swap: 512 24 | 25 | [test2] 26 | #test comment 27 | arch: amd64 28 | cpulimit: 2 29 | cpuunits: 2048 30 | hostname: test 31 | memory: 4096 32 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 33 | ostype: redhat 34 | parent: test 35 | rootfs: local:snapshotable-disk-1 36 | snaptime: 1234567890 37 | swap: 1024 38 | 39 | [test3] 40 | #test comment 41 | arch: amd64 42 | cpulimit: 1 43 | cpuunits: 1024 44 | hostname: test 45 | memory: 2048 46 | net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth 47 | ostype: redhat 48 | parent: test2 49 | rootfs: local:snapshotable-disk-1 50 | snaptime: 1234567890 51 | swap: 512 52 | -------------------------------------------------------------------------------- /src/test/test-alpine-002/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100/32 7 | # --- BEGIN PVE --- 8 | post-up ip route add 11.0.0.1 dev eth0 9 | post-up ip route add default via 11.0.0.1 dev eth0 10 | pre-down ip route del default via 11.0.0.1 dev eth0 11 | pre-down ip route del 11.0.0.1 dev eth0 12 | # --- END PVE --- 13 | 14 | auto eth1 15 | iface eth1 inet6 static 16 | address fc00::1/64 17 | # --- BEGIN PVE --- 18 | post-up ip route add fc00:1::ff dev eth1 19 | post-up ip route add default via fc00:1::ff dev eth1 20 | pre-down ip route del default via fc00:1::ff dev eth1 21 | pre-down ip route del fc00:1::ff dev eth1 22 | # --- END PVE --- 23 | post-up ip route add fc00:1::ff/64 dev eth1 24 | post-up ip route add default via fc00:1::ff dev eth1 25 | pre-down ip route del default via fc00:1::ff/64 dev eth1 26 | pre-down ip route del fc00:1::ff dev eth1 27 | 28 | auto eth2 29 | iface eth2 inet static 30 | address 192.168.0.1/24 31 | post-up ip route add 192.168.1.1 dev eth2 table internal 32 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 33 | pre-down ip rule add from 192.168.0.128/25 table internal 34 | pre-down ip rule add to 192.168.0.128/25 table internal 35 | 36 | -------------------------------------------------------------------------------- /src/test/test-debian-015/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100/32 7 | # --- BEGIN PVE --- 8 | post-up ip route add 11.0.0.1 dev eth0 9 | post-up ip route add default via 11.0.0.1 dev eth0 10 | pre-down ip route del default via 11.0.0.1 dev eth0 11 | pre-down ip route del 11.0.0.1 dev eth0 12 | # --- END PVE --- 13 | 14 | auto eth1 15 | iface eth1 inet6 static 16 | address fc00::1/64 17 | # --- BEGIN PVE --- 18 | post-up ip route add fc00:1::ff dev eth1 19 | post-up ip route add default via fc00:1::ff dev eth1 20 | pre-down ip route del default via fc00:1::ff dev eth1 21 | pre-down ip route del fc00:1::ff dev eth1 22 | # --- END PVE --- 23 | post-up ip route add fc00:1::ff/64 dev eth1 24 | post-up ip route add default via fc00:1::ff dev eth1 25 | pre-down ip route del default via fc00:1::ff/64 dev eth1 26 | pre-down ip route del fc00:1::ff dev eth1 27 | 28 | auto eth2 29 | iface eth2 inet static 30 | address 192.168.0.1/24 31 | post-up ip route add 192.168.1.1 dev eth2 table internal 32 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 33 | pre-down ip rule add from 192.168.0.128/25 table internal 34 | pre-down ip rule add to 192.168.0.128/25 table internal 35 | 36 | -------------------------------------------------------------------------------- /src/test/test-debian-016/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100/32 7 | # --- BEGIN PVE --- 8 | post-up ip route add 11.0.0.1 dev eth0 9 | post-up ip route add default via 11.0.0.1 dev eth0 10 | pre-down ip route del default via 11.0.0.1 dev eth0 11 | pre-down ip route del 11.0.0.1 dev eth0 12 | # --- END PVE --- 13 | 14 | auto eth1 15 | iface eth1 inet6 static 16 | address fc00::1/64 17 | # --- BEGIN PVE --- 18 | post-up ip route add fc00:1::ff dev eth1 19 | post-up ip route add default via fc00:1::ff dev eth1 20 | pre-down ip route del default via fc00:1::ff dev eth1 21 | pre-down ip route del fc00:1::ff dev eth1 22 | # --- END PVE --- 23 | post-up ip route add fc00:1::ff/64 dev eth1 24 | post-up ip route add default via fc00:1::ff dev eth1 25 | pre-down ip route del default via fc00:1::ff/64 dev eth1 26 | pre-down ip route del fc00:1::ff dev eth1 27 | 28 | auto eth2 29 | iface eth2 inet static 30 | address 192.168.0.1/24 31 | post-up ip route add 192.168.1.1 dev eth2 table internal 32 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 33 | pre-down ip rule add from 192.168.0.128/25 table internal 34 | pre-down ip rule add to 192.168.0.128/25 table internal 35 | 36 | -------------------------------------------------------------------------------- /src/test/test-alpine-001/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100 7 | netmask 255.255.255.255 8 | # --- BEGIN PVE --- 9 | post-up ip route add 11.0.0.1 dev eth0 10 | post-up ip route add default via 11.0.0.1 dev eth0 11 | pre-down ip route del default via 11.0.0.1 dev eth0 12 | pre-down ip route del 11.0.0.1 dev eth0 13 | # --- END PVE --- 14 | 15 | auto eth1 16 | iface eth1 inet6 static 17 | address fc00::1 18 | netmask 64 19 | # --- BEGIN PVE --- 20 | post-up ip route add fc00:1::ff dev eth1 21 | post-up ip route add default via fc00:1::ff dev eth1 22 | pre-down ip route del default via fc00:1::ff dev eth1 23 | pre-down ip route del fc00:1::ff dev eth1 24 | # --- END PVE --- 25 | post-up ip route add fc00:1::ff/64 dev eth1 26 | post-up ip route add default via fc00:1::ff dev eth1 27 | pre-down ip route del default via fc00:1::ff/64 dev eth1 28 | pre-down ip route del fc00:1::ff dev eth1 29 | 30 | auto eth2 31 | iface eth2 inet static 32 | address 192.168.0.1 33 | netmask 255.255.255.0 34 | post-up ip route add 192.168.1.1 dev eth2 table internal 35 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 36 | pre-down ip rule add from 192.168.0.128/25 table internal 37 | pre-down ip rule add to 192.168.0.128/25 table internal 38 | 39 | -------------------------------------------------------------------------------- /src/test/test-debian-014/etc/network/interfaces.exp: -------------------------------------------------------------------------------- 1 | auto lo 2 | iface lo inet loopback 3 | 4 | auto eth0 5 | iface eth0 inet static 6 | address 10.0.0.100 7 | netmask 255.255.255.255 8 | # --- BEGIN PVE --- 9 | post-up ip route add 11.0.0.1 dev eth0 10 | post-up ip route add default via 11.0.0.1 dev eth0 11 | pre-down ip route del default via 11.0.0.1 dev eth0 12 | pre-down ip route del 11.0.0.1 dev eth0 13 | # --- END PVE --- 14 | 15 | auto eth1 16 | iface eth1 inet6 static 17 | address fc00::1 18 | netmask 64 19 | # --- BEGIN PVE --- 20 | post-up ip route add fc00:1::ff dev eth1 21 | post-up ip route add default via fc00:1::ff dev eth1 22 | pre-down ip route del default via fc00:1::ff dev eth1 23 | pre-down ip route del fc00:1::ff dev eth1 24 | # --- END PVE --- 25 | post-up ip route add fc00:1::ff/64 dev eth1 26 | post-up ip route add default via fc00:1::ff dev eth1 27 | pre-down ip route del default via fc00:1::ff/64 dev eth1 28 | pre-down ip route del fc00:1::ff dev eth1 29 | 30 | auto eth2 31 | iface eth2 inet static 32 | address 192.168.0.1 33 | netmask 255.255.255.0 34 | post-up ip route add 192.168.1.1 dev eth2 table internal 35 | post-up ip route add default via 192.168.1.1 dev eth2 table internal 36 | pre-down ip rule add from 192.168.0.128/25 table internal 37 | pre-down ip rule add to 192.168.0.128/25 table internal 38 | 39 | -------------------------------------------------------------------------------- /src/10-pve-ct-inotify-limits.conf: -------------------------------------------------------------------------------- 1 | # increase kernel hardcoded defaults by a factor of 512 to allow running more 2 | # than a very limited count of inotfiy hungry CTs (i.e., those with newer 3 | # systemd >= 240). This can be done as the memory used by the queued events and 4 | # watches is accounted to the respective memory CGroup. 5 | # One can override this by using a /etc/sysctl.d/*.conf file 6 | 7 | # 2^23 8 | fs.inotify.max_queued_events = 8388608 9 | # 2^16 10 | fs.inotify.max_user_instances = 65536 11 | # 2^22 12 | fs.inotify.max_user_watches = 4194304 13 | 14 | # This file contains the maximum number of memory map areas a process may have. 15 | # Memory map areas are used as a side-effect of calling malloc, directly by 16 | # mmap and mprotect, and also when loading shared libraries. 17 | vm.max_map_count = 262144 18 | 19 | # This is the maximum number of entries in ARP table (IPv4). You should 20 | # increase this if you create over 1024 containers. Otherwise, you will get the 21 | # error neighbour: ndisc_cache: neighbor table overflow! when the ARP table 22 | # gets full and those containers will not be able to get a network 23 | # configuration. 24 | net.ipv4.neigh.default.gc_thresh3 = 8192 25 | net.ipv6.neigh.default.gc_thresh3 = 8192 26 | 27 | # This is the maximum number of keys a non-root user can use, should be higher 28 | # than the number of containers 29 | kernel.keys.maxkeys = 2000 30 | -------------------------------------------------------------------------------- /src/PVE/LXC/Setup/NixOS.pm: -------------------------------------------------------------------------------- 1 | package PVE::LXC::Setup::NixOS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use File::Path 'make_path'; 7 | 8 | use PVE::LXC::Setup::Base; 9 | use PVE::LXC::Tools; 10 | 11 | use base qw(PVE::LXC::Setup::Base); 12 | 13 | sub new { 14 | my ($class, $conf, $rootdir) = @_; 15 | 16 | my $self = { conf => $conf, rootdir => $rootdir, version => 0 }; 17 | 18 | $conf->{ostype} = "nixos"; 19 | 20 | return bless $self, $class; 21 | } 22 | 23 | sub template_fixup { 24 | my ($self, $conf) = @_; 25 | } 26 | 27 | sub setup_network { 28 | my ($self, $conf) = @_; 29 | 30 | $self->setup_systemd_networkd($conf); 31 | } 32 | 33 | sub set_timezone { 34 | my ($self, $conf) = @_; 35 | } 36 | 37 | sub setup_init { 38 | my ($self, $conf) = @_; 39 | } 40 | 41 | sub detect_architecture { 42 | my ($self) = @_; 43 | 44 | # /bin/sh only exists as a symlink after the initial system activaction on first boot. 45 | # To detect the actual architecture of the system, examine the shebang line of the /sbin/init 46 | # script, which has the full path to the system shell. 47 | my $init_path = '/sbin/init'; 48 | open(my $fh, '<', $init_path) or die "open '$init_path' failed: $!\n"; 49 | 50 | if (<$fh> =~ /^#! ?(\S*)/) { 51 | return PVE::LXC::Tools::detect_elf_architecture($1); 52 | } 53 | 54 | die "could not find a shell\n"; 55 | } 56 | 57 | 1; 58 | -------------------------------------------------------------------------------- /src/PVE/LXC/Setup/ArchLinux.pm: -------------------------------------------------------------------------------- 1 | package PVE::LXC::Setup::ArchLinux; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use File::Path 'make_path'; 7 | 8 | use PVE::LXC::Setup::Base; 9 | 10 | use base qw(PVE::LXC::Setup::Base); 11 | 12 | sub new { 13 | my ($class, $conf, $rootdir) = @_; 14 | 15 | # /etc/arch-release exists, but it's empty 16 | #my $release = PVE::Tools::file_read_firstline("$rootdir/etc/arch-release"); 17 | #die "unable to read version info\n" if !defined($release); 18 | 19 | my $self = { conf => $conf, rootdir => $rootdir, version => 0 }; 20 | 21 | $conf->{ostype} = "archlinux"; 22 | 23 | return bless $self, $class; 24 | } 25 | 26 | sub template_fixup { 27 | my ($self, $conf) = @_; 28 | 29 | # edit /etc/securetty (enable login on console) 30 | $self->setup_securetty($conf); 31 | 32 | $self->remove_lxc_name_from_etc_hosts(); 33 | } 34 | 35 | sub setup_init { 36 | my ($self, $conf) = @_; 37 | 38 | $self->setup_systemd_preset({ 39 | # ArchLinux doesn't come with any particular predefined and enabled 40 | # networking, so it probably makes sense to do the equivalent of 41 | # 'systemctl enable systemd-networkd', since that's what we're configuring 42 | # in setup_network 43 | 'systemd-networkd.service' => 1, 44 | }); 45 | 46 | $self->setup_container_getty_service($conf); 47 | } 48 | 49 | sub setup_network { 50 | my ($self, $conf) = @_; 51 | 52 | $self->setup_systemd_networkd($conf); 53 | } 54 | 55 | 1; 56 | -------------------------------------------------------------------------------- /src/PVE/LXC/Setup/Unmanaged.pm: -------------------------------------------------------------------------------- 1 | package PVE::LXC::Setup::Unmanaged; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use PVE::LXC::Setup::Plugin; 7 | use base qw(PVE::LXC::Setup::Plugin); 8 | 9 | sub new { 10 | my ($class, $conf, $rootdir) = @_; 11 | 12 | my $self = { conf => $conf, rootdir => $rootdir }; 13 | 14 | $conf->{ostype} = "unmanaged"; 15 | 16 | return bless $self, $class; 17 | } 18 | 19 | sub template_fixup { 20 | my ($self, $conf) = @_; 21 | } 22 | 23 | sub setup_network { 24 | my ($self, $conf) = @_; 25 | } 26 | 27 | sub set_hostname { 28 | my ($self, $conf) = @_; 29 | } 30 | 31 | sub set_dns { 32 | my ($self, $conf) = @_; 33 | } 34 | 35 | sub set_timezone { 36 | my ($self, $conf) = @_; 37 | } 38 | 39 | sub setup_init { 40 | my ($self, $conf) = @_; 41 | } 42 | 43 | sub set_user_password { 44 | my ($self, $conf, $user, $opt_password) = @_; 45 | } 46 | 47 | sub unified_cgroupv2_support { 48 | my ($self, $init) = @_; 49 | return 1; # faking it won't normally hurt ;-) 50 | } 51 | 52 | sub get_ct_init_path { 53 | my ($self) = @_; 54 | return '/sbin/init'; # only passed to unified_cgroupv2_support for now 55 | } 56 | 57 | sub ssh_host_key_types_to_generate { 58 | my ($self) = @_; 59 | return; 60 | } 61 | 62 | # hooks 63 | 64 | sub pre_start_hook { 65 | my ($self, $conf) = @_; 66 | } 67 | 68 | sub post_clone_hook { 69 | my ($self, $conf) = @_; 70 | } 71 | 72 | sub post_create_hook { 73 | my ($self, $conf, $root_password, $ssh_keys) = @_; 74 | } 75 | 76 | 1; 77 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: pve-container 2 | Section: perl 3 | Priority: extra 4 | Maintainer: Proxmox Support Team 5 | Build-Depends: debhelper-compat (= 13), 6 | dh-apparmor, 7 | libpve-access-control (>= 8.0.0~), 8 | libpve-cluster-perl, 9 | libpve-common-perl (>= 8.1.0), 10 | libpve-guest-common-perl (>= 5.1.0), 11 | libpve-rs-perl (>= 0.11~), 12 | libpve-storage-perl, 13 | libtest-mockmodule-perl, 14 | lxc-pve (>= 4.0.9-2) | lxc (>= 4.0.9), 15 | pve-cluster (>= 4.0-8), 16 | pve-doc-generator (>= 5.3-3), 17 | pve-firewall, 18 | Standards-Version: 4.6.2 19 | 20 | Package: pve-container 21 | Section: perl 22 | Priority: optional 23 | Architecture: all 24 | Depends: binutils, 25 | file, 26 | isc-dhcp-client, 27 | libpve-access-control (>= 8.0.0~), 28 | libpve-cluster-perl, 29 | libpve-common-perl (>= 8.1.0), 30 | libpve-guest-common-perl (>= 5.1.3), 31 | libpve-rs-perl (>= 0.11~), 32 | libpve-storage-perl (>= 8.3.5), 33 | lxc-pve (>= 6.0.5-3~~), 34 | pve-cluster (>= 4.0-8), 35 | pve-firewall (>= 6.0.1), 36 | pve-ha-manager (>= 5.0.3), 37 | pve-lxc-syscalld, 38 | proxmox-backup-client (>= 3.2.3-1), 39 | xz-utils, 40 | ${misc:Depends}, 41 | ${perl:Depends}, 42 | Recommends: libpve-network-perl (>= 0.8.3), 43 | Description: Proxmox VE Container management tool 44 | Tool to manage Linux Containers on Proxmox VE. 45 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include /usr/share/dpkg/pkg-info.mk 2 | 3 | PACKAGE=pve-container 4 | 5 | GITVERSION:=$(shell git rev-parse HEAD) 6 | BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM) 7 | 8 | DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb 9 | DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc 10 | 11 | all: $(DEB) 12 | 13 | .PHONY: tidy 14 | tidy: 15 | git ls-files ':*.p[ml]'| xargs -n4 -P0 proxmox-perltidy 16 | cd src; proxmox-perltidy lxc-pve-autodev-hook lxc-pve-poststop-hook lxc-pve-prestart-hook lxcnetaddbr pct pve-container-stop-wrapper 17 | 18 | .PHONY: dinstall 19 | dinstall: $(DEB) 20 | dpkg -i $(DEB) 21 | 22 | $(BUILDDIR): src debian 23 | rm -rf $(BUILDDIR) $(BUILDDIR).tmp; mkdir $(BUILDDIR).tmp 24 | cp -t $(BUILDDIR).tmp -a debian src/* 25 | echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout $(GITVERSION)" >$(BUILDDIR).tmp/debian/SOURCE 26 | mv $(BUILDDIR).tmp $(BUILDDIR) 27 | 28 | .PHONY: deb 29 | deb: $(DEB) 30 | $(DEB): $(BUILDDIR) 31 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc 32 | lintian $(DEB) 33 | 34 | 35 | .PHONY: dsc 36 | dsc: $(DSC) 37 | $(DSC): $(BUILDDIR) 38 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d 39 | lintian $(DSC) 40 | 41 | .PHONY: sbuild 42 | sbuild: $(DSC) 43 | sbuild $(DSC) 44 | 45 | .PHONY: clean 46 | clean: 47 | $(MAKE) -C src clean 48 | rm -rf $(PACKAGE)-[0-9]*/ 49 | rm -f *.deb *.changes *.build *.buildinfo *.dsc $(PACKAGE)*.tar* 50 | 51 | .PHONY: distclean 52 | distclean: clean 53 | 54 | .PHONY: upload 55 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) 56 | upload: $(DEB) 57 | tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) 58 | -------------------------------------------------------------------------------- /src/PVE/LXC/Setup/Devuan.pm: -------------------------------------------------------------------------------- 1 | package PVE::LXC::Setup::Devuan; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use PVE::Tools qw($IPV6RE); 7 | 8 | use PVE::LXC::Setup::Debian; 9 | use base qw(PVE::LXC::Setup::Debian); 10 | 11 | sub new { 12 | my ($class, $conf, $rootdir) = @_; 13 | 14 | my $version = PVE::Tools::file_read_firstline("$rootdir/etc/devuan_version"); 15 | 16 | die "unable to read version info\n" if !defined($version); 17 | $version = lc($version); 18 | 19 | # map to Debian version, we sometimes check that 20 | my $version_map = { 21 | 'jessie' => 8, # Devuan 1.0 22 | 'ascii' => 9, # Devuan 2.0 23 | 'ascii/ceres' => 9, 24 | 'beowulf' => 10, # Devuan 3.0 25 | 'beowulf/ceres' => 10, 26 | 'chimaera' => 11, # Devuan 4.0 27 | 'chimaera/ceres' => 11, 28 | 'daedalus' => 12, 29 | 'daedalus/ceres' => 12, 30 | 'excalibur' => 13, 31 | 'excalibur/ceres' => 13, 32 | }; 33 | die "unsupported Devuan version '$version'\n" if !exists($version_map->{$version}); 34 | 35 | my $self = { 36 | conf => $conf, 37 | rootdir => $rootdir, 38 | version => $version_map->{$version}, 39 | devuan_version => $version, 40 | }; 41 | 42 | $conf->{ostype} = "devuan"; 43 | 44 | return bless $self, $class; 45 | } 46 | 47 | # non systemd based containers work with pure cgroupv2 48 | sub unified_cgroupv2_support { 49 | my ($self, $init) = @_; 50 | 51 | return 1; 52 | } 53 | 54 | # the rest gets handled by the Debian plugin, which is compatible with older 55 | # non-systemd Debian versions for now. 56 | 57 | 1; 58 | -------------------------------------------------------------------------------- /src/PVE/LXC/CGroup.pm: -------------------------------------------------------------------------------- 1 | # cgroup handler 2 | # 3 | # This package should deal with figuring out the right cgroup path for a 4 | # container (via the command socket), reading and writing cgroup values, and 5 | # handling cgroup v1 & v2 differences. 6 | # 7 | # Note that the long term plan is to have resource manage functions instead of 8 | # dealing with cgroup files on the outside. 9 | 10 | package PVE::LXC::CGroup; 11 | 12 | use strict; 13 | use warnings; 14 | 15 | use PVE::LXC::Command; 16 | use PVE::CGroup; 17 | use base('PVE::CGroup'); 18 | 19 | # Get a subdirectory (without the cgroup mount point) for a controller. 20 | # 21 | # If `$controller` is `undef`, get the unified (cgroupv2) path. 22 | # 23 | # Note that in cgroup v2, lxc uses the activated controller names 24 | # (`cgroup.controllers` file) as list of controllers for the unified hierarchy, 25 | # so this returns a result when a `controller` is provided even when using 26 | # a pure cgroupv2 setup. 27 | sub get_subdir { 28 | my ($self, $controller, $limiting) = @_; 29 | 30 | my $entry_name = $controller || 'unified'; 31 | my $entry = ($self->{controllers}->{$entry_name} //= {}); 32 | 33 | my $kind = $limiting ? 'limit' : 'ns'; 34 | my $path = $entry->{$kind}; 35 | 36 | return $path if defined $path; 37 | 38 | $path = PVE::LXC::Command::get_cgroup_path( 39 | $self->{vmid}, $controller, $limiting, 40 | ) or return undef; 41 | 42 | # untaint: 43 | if ($path =~ /\.\./) { 44 | die "lxc returned suspicious path: '$path'\n"; 45 | } 46 | ($path) = ($path =~ /^(.*)$/s); 47 | 48 | $entry->{$kind} = $path; 49 | 50 | return $path; 51 | } 52 | 53 | 1; 54 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | = Info for developers = 2 | 3 | == Command Line Tool == 4 | 5 | Example: 6 | 7 | # pct create 200 debian-7.0-standard_7.0-2_i386.tar.gz 8 | # pct start 200 9 | # pct enter 200 10 | # pct stop 200 11 | # pct destroy 200 12 | 13 | You can get detailed help with: 14 | 15 | # pct help -v 16 | 17 | == Container names == 18 | 19 | We use integers values for container names (and do not allow to use 20 | arbitrary names for containers). 21 | 22 | == LXC Configuration == 23 | 24 | We store LXC container configurations on the cluster file system: 25 | 26 | /etc/pve/nodes/lxc/.conf 27 | 28 | There is a symbolic link for the local node at 29 | 30 | /etc/pve/lxc => /etc/pve/nodes//lxc 31 | 32 | see man pct.conf for syntax details. 33 | 34 | == CRIU == 35 | 36 | CRIU (1.5.2) does not work well with kernel 3.10.0, so checkpoint/restore 37 | and live migration does not work. 38 | 39 | = FAQ = 40 | 41 | * Why not LXD 42 | 43 | - LXD uses a local database to store configuration files, which simply 44 | does not work with our distributed configuration file system 45 | (pmxcfs) 46 | 47 | - We want to use our existing libraries (i.e. Storage). Also see: 48 | https://lists.linuxcontainers.org/pipermail/lxc-users/2015-June/009441.html 49 | where they write: "Lxd will not be as flexible as lxc in many ways, 50 | including with respect to backing stores." 51 | 52 | We have a different goal, and want to support many new storage technologies 53 | like zfs, ceph, ... 54 | 55 | - It is a wrapper around LXC, and only provides a REST API and new CLI 56 | tool. But Proxmox VE already provides a full featured API, and CLI tools 57 | are automatically generated from that API. 58 | -------------------------------------------------------------------------------- /src/lxcnetaddbr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | exit 0 if $ENV{LXC_NAME} && $ENV{LXC_NAME} !~ /^\d+$/; 7 | 8 | use PVE::LXC; 9 | use PVE::Tools qw(run_command); 10 | use PVE::ProcFSTools; 11 | 12 | die "got unexpected argument count\n" if scalar(@ARGV) != 5; 13 | 14 | my ($vmid, $arg2, $arg3, $type, $iface) = @ARGV; 15 | 16 | die "got unexpected argument ($arg2 != net)\n" if $arg2 ne 'net'; 17 | die "got unexpected argument ($arg3 != up)\n" if $arg3 ne 'up'; 18 | 19 | die "got unexpected argument ($type != veth)\n" if $type ne 'veth'; 20 | 21 | die "got unexpected environment" if $vmid ne $ENV{LXC_NAME}; 22 | 23 | die "missing vmid parameter\n" if !$vmid; 24 | die "missing iface parameter\n" if !$iface; 25 | 26 | my $conf = PVE::LXC::Config->load_config($vmid); 27 | 28 | my $netconf; 29 | if ($iface =~ m/^veth(\d+)i(\d+)$/) { 30 | die "got unexpected interface name '$iface'\n" if $1 ne $vmid; 31 | $netconf = $conf->{"net$2"}; 32 | } 33 | 34 | die "unable to find network definition for interface '$iface'\n" 35 | if !defined($netconf); 36 | 37 | my $net = PVE::LXC::Config->parse_lxc_network($netconf); 38 | 39 | my $bridge = $net->{bridge}; 40 | die "missing bridge configuration" if !$bridge; 41 | 42 | if (-d "/sys/class/net/$iface") { 43 | 44 | my $bridgemtu = PVE::Tools::file_read_firstline("/sys/class/net/$bridge/mtu"); 45 | die "bridge '$bridge' does not exist\n" if !$bridgemtu; 46 | #avoid insecure dependency; 47 | ($bridgemtu) = $bridgemtu =~ /(\d+)/; 48 | 49 | PVE::Tools::run_command("/sbin/ip link set dev $iface up mtu $bridgemtu"); 50 | PVE::Tools::run_command("/sbin/ip addr add 0.0.0.0/0 dev $iface"); 51 | PVE::LXC::net_tap_plug($iface, $net); 52 | } 53 | 54 | exit 0; 55 | -------------------------------------------------------------------------------- /src/PVE/LXC/Namespaces.pm: -------------------------------------------------------------------------------- 1 | package PVE::LXC::Namespaces; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use Fcntl qw(O_WRONLY); 7 | use Socket; 8 | 9 | use PVE::Tools qw(CLONE_NEWNS CLONE_NEWUSER); 10 | 11 | my sub set_id_map($$) { 12 | my ($pid, $id_map) = @_; 13 | 14 | my @gid_args = (); 15 | my @uid_args = (); 16 | 17 | for my $map ($id_map->@*) { 18 | my ($type, $ct, $host, $length) = $map->@*; 19 | 20 | push @gid_args, $ct, $host, $length if $type eq 'g'; 21 | push @uid_args, $ct, $host, $length if $type eq 'u'; 22 | } 23 | 24 | PVE::Tools::run_command(['newgidmap', $pid, @gid_args]) if scalar(@gid_args); 25 | PVE::Tools::run_command(['newuidmap', $pid, @uid_args]) if scalar(@uid_args); 26 | } 27 | 28 | sub run_in_userns(&;$) { 29 | my ($code, $id_map) = @_; 30 | socketpair(my $sp, my $sc, AF_UNIX, SOCK_STREAM, PF_UNSPEC) 31 | or die "socketpair: $!\n"; 32 | my $child = sub { 33 | close($sp); 34 | PVE::Tools::unshare(CLONE_NEWUSER | CLONE_NEWNS) or die "unshare(NEWUSER|NEWNS): $!\n"; 35 | syswrite($sc, "1\n") == 2 or die "write: $!\n"; 36 | shutdown($sc, 1); 37 | my $two = <$sc>; 38 | die "failed to sync with parent process\n" if $two ne "2\n"; 39 | close($sc); 40 | $! = undef; 41 | ($(, $)) = (0, 0); 42 | die "$!\n" if $!; 43 | ($<, $>) = (0, 0); 44 | die "$!\n" if $!; 45 | return $code->(); 46 | }; 47 | my $parent = sub { 48 | my ($pid) = @_; 49 | close($sc); 50 | my $one = <$sp>; 51 | die "failed to sync with userprocess\n" if $one ne "1\n"; 52 | set_id_map($pid, $id_map); 53 | syswrite($sp, "2\n") == 2 or die "write: $!\n"; 54 | close($sp); 55 | }; 56 | PVE::Tools::run_fork($child, { afterfork => $parent }); 57 | } 58 | 59 | 1; 60 | --------------------------------------------------------------------------------