diff --git a/tests/container-copy b/tests/container-copy index 8b2c6e4e8..3317ce050 100644 --- a/tests/container-copy +++ b/tests/container-copy @@ -18,14 +18,19 @@ loopdev="$(losetup --show --find "${loopimg}")" # Begin Test. set -x +echo "==> Wait for the host time to be synchronized with NTP" +for _ in $(seq 6); do + [ "$(timedatectl show --property=NTPSynchronized --value)" = "yes" ] && break + sleep 10 +done + echo "==> Launch a VM which will be the target of the copy" lxc launch "${IMAGE}" target --vm waitInstanceBooted target echo "==> Setup LXD on the target VM" lxc exec target -- snap install lxd --channel "${LXD_SNAP_CHANNEL}" -lxc exec target -- lxd init --auto -lxc exec target -- lxc config set core.https_address=:8443 +lxc exec target -- lxd init --auto --network-address "[::]" --network-port "8443" echo "==> Wait for the target VM time to be synchronized with NTP" for _ in $(seq 6); do