pimox / pimox7

Proxmox V7 for Raspberry Pi
1.7k stars 157 forks source link

Bug: unable to open file '/etc/network/interfaces.tmp.3239' - No such file or directory #160

Open C-Fu opened 11 months ago

C-Fu commented 11 months ago

I'm installing from Dietpi bullseye, and every single time I reinstall - even with default config.txt dietpi.txt and Automation_Custom_Script.sh files - creating a CT will always result in network interfaces failure.

Formatting '/var/lib/vz/images/100/vm-100-disk-0.raw', fmt=raw size=8589934592 preallocation=off
Creating filesystem with 2097152 4k blocks and 524288 inodes
Filesystem UUID: 1de122a8-cc51-4cae-926c-b2f025beba8c
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
extracting archive '/var/lib/vz/template/cache/Debian11arm64-std-20230830_05:24.tar.xz'
Total bytes read: 344678400 (329MiB, 18MiB/s)
Detected container architecture: arm64
unable to open file '/etc/network/interfaces.tmp.3239' - No such file or directory
TASK ERROR: unable to create CT 100 - error in setup task PVE::LXC::Setup::post_create_hook

I'm using Pi400 btw.

antonionardella commented 9 months ago

I am having the same issue on a rpi4 with dietpi bookworm, although it works fine on rpi3 with bookworm

Have you found any solutions?

First, to create container keep the network settings as static, but do not enter any IP address nor gateway Start the container Login Start dhclient

Then make sure that the lxcfs.service is running on the RPI4 with systemctl restart lxcfs.service

LufyCZ commented 7 months ago

This apparently happens because the container uses systemd-network instead of ifupdown2. Disabling the systemd-network service, installing ifupdown2 and enabling the networking service makes Proxmox configuration work.

grigio commented 4 months ago

@LufyCZ I tried that but I still get

unable to open file '/etc/network/interfaces.tmp.31005' - No such file or directory
TheBossME commented 4 months ago

Create dir /etc/network manually after you've installed the LXC container without dhcp or ip address.

grigio commented 3 months ago

Create dir /etc/network manually after you've installed the LXC container without dhcp or ip address.

Thanks. It seems to work adding manually /etc/network (should it be /etc/networks ?) the container starts but it still doesn't have internet or a LAN IP, I tried both DHCP and manual

TheBossME commented 3 months ago

Start dhclient manually and do apt install ifupdown

grigio commented 3 months ago

Start dhclient manually and do apt install ifupdown

it doesn't give an ip or errors

root@bbbb:~# dhclient eth0
root@bbbb:~# 
root@bbbb:~# ping 1.1.1.1
ping: connect: Network is unreachable
root@bbbb:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: eth0@if47: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether bc:24:11:cb:cd:4e brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::be24:11ff:fecb:cd4e/64 scope link 
       valid_lft forever preferred_lft forever
TheBossME commented 3 months ago

Why 'dhclient eth0' ?

grigio commented 3 months ago

@TheBossME I'd like to get a valid LAN ip for the LXC container

root@bbbb:~# dhclient -v
Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/bc:24:11:cb:cd:4e
Sending on   LPF/eth0/bc:24:11:cb:cd:4e
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
TheBossME commented 3 months ago

please go forward and do learn Linux basics before using Hypervisor like Proxmox etc.

This will help you to understand your installation issues which comes from buggy LXC containers and or Proxmox installations.

Sorry to say that.

try using Ubuntu LXC container for arm64 architecture.

Issue with the missing ifupdown or using systemd networking is debian LXC specific. Proxmox GmbH provides amd64 specific LXC containers for Debian.

Also this pimox 7 is very outdated.

Search for unofficial Proxmox 8.x On GitHub.

Take a look for that. But keep in mind you must have ifupdown or a running networking.

  1. Start debian lxc
  2. enter 'dhclient' without anything in the LXC shell
  3. do 'apt update' && 'apt upgrade'
  4. do 'apt install ifupdown'
  5. change your LXC to dhcp and slaac.
  6. reboot LXC container
  7. login to LXC container shell
  8. type 'ip a'

Then you should have a proper IP address inside container.

And this was my last message here. I will leave, while only noobs here.

grigio commented 3 months ago

@TheBossME I used proxmox x86 in the past and now i'm on proxmox 8 arm64 unofficial.. and i didnt have this issue, however thanks, i'll try other paths