Cloning pc, need to update IPs for LXD

,

Hi,

I’m trying to replicate a virtual machine that is running LXD/LXC and the application isn’t running. In digging through the logs, I found this

Aug 21 08:33:19 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[20566]: => Starting LXD
Aug 21 08:33:19 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[20715]: time=“2024-08-21T08:33:19Z” level=warning msg=" - Couldn’t find the CGroup network priority controller, per-instance network priority will be ignored. Please use per-device limits.priority instead"
Aug 21 08:34:20 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[20715]: time=“2024-08-21T08:34:20Z” level=error msg=“Failed to start the daemon” err=“Bind network address: listen tcp 10.128.0.6:8443: bind: cannot assign requested address”
Aug 21 08:34:20 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[20715]: time=“2024-08-21T08:34:20Z” level=warning msg=“Could not handover member’s responsibilities” err=“Failed to transfer leadership: No online voter found”
Aug 21 08:34:20 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[20715]: Error: Bind network address: listen tcp 10.128.0.6:8443: bind: cannot assign requested address

120.128.0.6 is the IP of the old compute. The new one is 120.128.0.7. I’ve looked everywhere an just about grepped every file on the computer but I can’t find where this is defined to change it. Any pointers would be appreciated.

Hi!

I see that you are running Anbox. The Anbox repository has been archived. Which packages do you use?

I’m using the Anbox Cloud that’s part of the Ubuntu pro offering. I plan on spinning up a new server every time I want a new android VM and just replicating the disk image but I’m running into this config issue. I know they have a cloud deployment scheme as well but that’s yet another level of complexity I don’t want to wrap my head around.

Made some progress. I found this db with the IPs that I updated… /var/snap/lxd/common/lxd/database/local.db:

sqlite> select * from config;
1|cluster.https_address|10.128.0.6:8443
2|core.https_address|10.128.0.6:8443
3|storage.backups_volume|data/backups
4|storage.images_volume|data/images

But now it seems there are other DBs that need updating. I’ve also (via grep) found the old IP in a number of files in /var/snap/lxd/common/lxd/database/global/ but I’m not sure what the file format is

Aug 21 17:54:02 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[392123]: => Starting LXD
Aug 21 17:54:02 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[392458]: time=“2024-08-21T17:54:02Z” level=warning msg=" - Couldn’t find the CGroup network priority controller, per-instance network priority will be ignored. Please use per-device limits.priority instead"
Aug 21 17:54:02 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[392458]: time=“2024-08-21T17:54:02Z” level=error msg=“Failed to start the daemon” err=“Failed to initialize global database: failed to ensure schema: failed to update node version info: updated 0 rows instead of 1”
Aug 21 17:54:02 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[392458]: time=“2024-08-21T17:54:02Z” level=warning msg=“Could not handover member’s responsibilities” err=“No dqlite node has address 10.128.0.7:8443: %!w()”
Aug 21 17:54:02 anbox-child-1.c.festive-idea-424905-v1.internal lxd.daemon[392458]: Error: Failed to initialize global database: failed to ensure schema: failed to update node version info: updated 0 rows instead of 1

You are using Anbox Cloud or the appliance. Those depend on LXD which is no longer supported here anymore.
We support Incus, which is a continuation of LXD.

If you want to run Android in an LXC container, you can use Waydroid (https://waydro.id/). Requires to have a desktop system with Wayland.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.