jiangcuo / Proxmox-Arm64

Proxmox VE & PBS unofficial arm64 version
GNU Affero General Public License v3.0
387 stars 41 forks source link

LXC containers stopped working on PVE 8.1 #66

Closed SuperKali closed 11 months ago

SuperKali commented 11 months ago

Hello,

I am trying to run an LXC instance on my NanoPC T6, but I am getting this error:

Formatting '/var/lib/vz/images/103/vm-103-disk-0.raw', fmt=raw size=10737418240 preallocation=off
Creating filesystem with 2621440 4k blocks and 655360 inodes
Filesystem UUID: e04a8139-c0be-4142-85ae-f1361adbeddd
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
extracting archive '/var/lib/vz/template/cache/debian-bookworm-20231124_arm64.tar.xz'
Total bytes read: 452454400 (432MiB, 53MiB/s)
Detected container architecture: arm64
unable to open file '/etc/network/interfaces.tmp.1541833' - No such file or directory
TASK ERROR: unable to create CT 103 - error in setup task PVE::LXC::Setup::post_create_hook

In the previous version it worked, now I don't understand if I'm missing something or if some step needs to be done to make it works.

Regards.

jiangcuo commented 11 months ago

https://github.com/jiangcuo/Proxmox-Port/issues/3

SuperKali commented 11 months ago

The problem is only debian.

TheBossME commented 11 months ago

it's easy to fix.

  1. create a machine with actual Debian 12 template without changing network settings (leave as static).

  2. start the container

  3. run dhclient

  4. apt update & apt upgrade

  5. install ifupdown package

Reboot LXC Container

  1. make a backup (dump directory)

  2. copy and rename or move your ...tar.zst file to the /var/lib/vz/template/cache directory.

Now you are able to push new containers without network setup issue.

Other trick is to create /etc/network directory which doesn't exist. The error message while creating /etc/network/interfaces.tmp.1541833 Said, directory does not exist.

I do prepare LXC templates with the needed packages for future installations