I was following along with the FOSSDEM video, but I had also watched the clustering video so I enabled clustering to set up the networking. could this be the problem? That’s the only difference I see in the setup.
lxd box: Ubuntu 18.04
VM that is being transferred: Ubuntu 14.04
Error: Failed to rsync: exit status 2
[Receiver] Invalid dir index: -1 (-101 - -101)
rsync error: protocol incompatibility (code 2) at flist.c(2634) [Receiver=3.1.2]
tried the migration with the script from your blog:
=> Connecting to source server
=> Connecting to destination server
=> Running sanity checks
error: The source server is part of a LXD cluster, this isn’t supported.
so I guess I’m reinstalling lxd from scratch, again
stopped all containers
moved the default storage pool directory to my home dir
apt remove --purge lxd lxd-client liblxc1 lxcfs
snap remove lxd
snap install lxd
re init’d lxd WITHOUT clustering enabled
moved default back to where snap keeps the storage-pool
imported the containers
started the containers
everything seems good and lxd-p2c is cranking away!
I’m seeing the same issue running lxd-p2c here - source is a bionic VMware VM, dest is bionic LXD host on metal. full output here.
I tried purging/reinstalling LXD and setting my default storage to dir (the fs is still btrfs backed, is that ok?) but it fails in the same place each transfer. I’ll go bug the rsync guys too…
You need to make sure your lxd-p2c build isn’t any more recent than the LXD server you’re running it against, otherwise it may be using rsync options that the target LXD server doesn’t understand.
well, I have LXD 3.6 installed from snap, but lxd-p2c is compiled from the gh source, so I guess it’s enough commits ahead that it’s out of whack with the LXD snap binaries?
Yeah, LXD 3.7 introduces a protocol change which adds --delete and --compress=2 to the rsync options, so you were effectively using the 3.7 version of lxd-p2c with a 3.6 version of LXD.
LXD 3.7 is now in the candidate channel, so I’d recommend you switch over to that instead of edge (as edge just auto-updates from git with no real testing before you may get a refresh).