[lxc-users] "error: LXD still not running after 5 minutes" - failed lxd.migrate - how to recover?

Stéphane Graber stgraber at ubuntu.com
Wed Aug 8 20:26:49 UTC 2018


On Wed, Aug 08, 2018 at 09:06:40PM +0200, Tomasz Chmielewski wrote:
> I've tried to migrate from deb to snap on Ubuntu 18.04.
> 
> Unfortunately, lxd.migrate failed with "error: LXD still not running after 5
> minutes":
> 
> root at b1 ~ # lxd.migrate
> => Connecting to source server
> => Connecting to destination server
> => Running sanity checks
> 
> === Source server
> LXD version: 3.0.1
> LXD PID: 2656
> Resources:
>   Containers: 6
>   Images: 4
>   Networks: 1
>   Storage pools: 1
> 
> === Destination server
> LXD version: 3.3
> LXD PID: 12791
> Resources:
>   Containers: 0
>   Images: 0
>   Networks: 0
>   Storage pools: 0
> 
> The migration process will shut down all your containers then move your data
> to the destination LXD.
> Once the data is moved, the destination LXD will start and apply any needed
> updates.
> And finally your containers will be brought back to their previous state,
> completing the migration.
> 
> WARNING: /var/lib/lxd is a mountpoint. You will need to update that mount
> location after the migration.
> 
> Are you ready to proceed (yes/no) [default=no]? yes
> => Shutting down the source LXD
> => Stopping the source LXD units
> => Stopping the destination LXD unit
> => Unmounting source LXD paths
> => Unmounting destination LXD paths
> => Wiping destination LXD clean
> => Backing up the database
> => Moving the /var/lib/lxd mountpoint
> => Updating the storage backends
> => Starting the destination LXD
> => Waiting for LXD to come online
> 
> error: LXD still not running after 5 minutes.
> 
> 
> 
> root at b1 ~ # lxd.migrate
> => Connecting to source server
> error: Unable to connect to the source LXD: Get http://unix.socket/1.0: dial
> unix /var/lib/lxd/unix.socket: connect: no such file or directory
> 
> 
> 
> root at b1 ~ # lxc list
> Error: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket:
> connect: no such file or directory
> 
> 
> 
> Not sure how to recover now? The containers seem intact in /var/lib/lxd/

What do you get if you do "journalctl -u snap.lxd.daemon -n 300" and
anything useful looking in /var/snap/lxd/common/lxd/logs/lxd.log?

It's expected that "systemctl start lxd" won't work anymore since the
data was moved over to the snap which then likely caused your database
to be upgraded, making it unreadable for your older deb version of LXD.

I'd recommend you do:
 - systemctl stop lxd lxd.socket
 - systemctl mask lxd lxd.socket

To prevent any accidental startup of your old LXD until the snap
migration is done and it can be safely removed.

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20180808/eb620059/attachment.sig>


More information about the lxc-users mailing list