jiangcuo / Proxmox-Arm64

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

Network Issue #55

Closed liberodark closed 1 year ago

liberodark commented 1 year ago

Hi,

Board : Odroid C4 OS : Armbian Kernel : 6.1.50 PVE Packages :

proxmox-ve: 8.0.2 (running kernel: 6.1.50-current-meson64)
pve-manager: 8.0.6 (running version: 8.0.6/5265a2d1a9dce716)
proxmox-kernel-helper: 8.0.3
ceph-fuse: 18.2.0-pve2
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown: not correctly installed
ifupdown2: 3.2.0-1+pmx4
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.4.6
libproxmox-backup-qemu0: 1.4.0
libproxmox-rs-perl: 0.3.1
libpve-access-control: 8.0.5
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.0.9
libpve-guest-common-perl: 5.0.5
libpve-http-server-perl: 5.0.4
libpve-rs-perl: 0.8.5
libpve-storage-perl: 8.0.3
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve3
novnc-pve: 1.4.0-2
proxmox-backup-client: 3.0.2-1
proxmox-backup-file-restore: 3.0.2-1
proxmox-kernel-helper: 8.0.3
proxmox-mail-forward: 0.2.0
proxmox-mini-journalreader: 1.4.0
proxmox-widget-toolkit: 4.0.9
pve-cluster: 8.0.4
pve-container: 5.0.5
pve-docs: 8.0.5
pve-edk2-firmware: 3.20230228-4
pve-firewall: 5.0.3
pve-firmware: not correctly installed
pve-ha-manager: 4.0.2
pve-i18n: 3.0.7
pve-qemu-kvm: 8.0.2-6
pve-xtermjs: 4.16.0-3
qemu-server: 8.0.7
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0

interfaces

auto lo
iface lo inet loopback

iface end0 inet manual

auto vmbr0
iface vmbr0 inet static
        address x.x.x.x/24
        gateway x.x.x.x
        bridge-ports end0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

brctl show

bridge name     bridge id               STP enabled     interfaces
vmbr0           8000.001e06481707       no              end0
                                                        veth101i0
                                                        veth102i0

Have create AlmaLinux CT (101) can ping my PVE but have not internet access and i can't ping my gateway.

101.conf

arch: arm64
cores: 1
hostname: alma8
memory: 512
net0: name=eth0,bridge=vmbr0,gw=x.x.x.x,hwaddr=96:8E:1E:94:A1:6B,ip=x.x.x.x/24,type=veth
ostype: centos
rootfs: local:101/vm-101-disk-0.raw,size=8G
swap: 512

You know if you have specific issue on arm with network ?

Also i cannot create debian CT (200) have :

unable to open file '/etc/network/interfaces.tmp.2766' - No such file or directory

200.conf

arch: arm64
hostname: debian-bookworm
memory: 512
net0: name=eth1,bridge=vmbr0,hwaddr=DA:4B:1D:66:8E:5B,ip=dhcp,type=veth
ostype: debian
rootfs: local:200/vm-200-disk-0.raw,size=10G
swap: 512

Also have try to run cloudinit have network issue too.

Also resolvconf rdnssd is not installed

Best Regards

TheBossME commented 1 year ago

you are using a downstripped lxc image.

Start the lxc without dhcp configuration. Use dhclient to get ip and install the needed packages like ifupdown etc.

It isn't an issue. This is related to your used lxc image.

After you've installed the missed packages, you can use it with dhcp configuration.

liberodark commented 1 year ago

Hi @TheBossME,

Problably you have not check my LXC 101.conf because is in Static IP. DHCP or Static ins't work have only just 1 LXC Server with DHCP for test and all lxc images have : /usr/sbin/dhclient & /usr/sbin/ifdown installed. Have check. Also have installed ifupdown2 on before install PVE. And the LXC image is come from the same place of jiangcuo

My tests from Debian Buster :

dhclient -v -r eth0

Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/2e:1a:cb:fb:b4:45
Sending on   LPF/eth0/2e:1a:cb:fb:b4:45
Sending on   Socket/fallback

dhclient -v eth0

Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/2e:1a:cb:fb:b4:45
Sending on   LPF/eth0/2e:1a:cb:fb:b4:45
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

Other precision same images in AMD64 have been used on my PVE Cluster with dhcp & ip static without any error. I think this is issue from ARM64 version (probably missing something...)

Best Regards

jiangcuo commented 1 year ago

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

TheBossME commented 1 year ago

Is it clear now, that the creation of the lxc needs "NO NETWORK" configuration while in the LXC image is a directory missed /etc/network

  1. do create a first LXC without any network modifications. This allow the proper creation.

  2. start the LXC Container and enter dhclient in the container

  3. check if you have then an IP address received from your dhcp server.

  4. do apt update and apt install ifupdown

  5. stop the LXC and change the network setup to dhcp or a static ip.

  6. restart LXC and check network connection.

  7. shutdown the LXC and make a backup and put this backup into your /var/lib/vz/template/cache directory for future installations, or do anytime the same steps while creating LXC containers. This is the actual work around on LXC's with missed /etc/network directories.

hope this helps a little bit. (actually tested with Debian bookworm and buster and also almalinux 9 images from the nightly build repository)

LXC grabbed from: https://us.lxd.images.canonical.com/images/debian/buster/arm64/default/

And last but not least one option is create /etc/network directory in the container before switching to dhcp or static ip. This could help also.

liberodark commented 1 year ago

Hi, @TheBossME (Thank for your explain)

I think you speak for Debian 11 & 12, have understand your workaround. But in Debian 10 have ifupdown installed : ifupdown/oldoldstable,now 0.8.35 arm64 [installed] and /etc/network :

ls /etc/network
if-down.d  if-post-down.d  if-pre-up.d  if-up.d  interfaces  interfaces.d

And on other LXC AlmaLinux 8 & 9 too. But don't have network access. That my issue.

Best Regards

TheBossME commented 1 year ago

Check your Proxmox hypervisor network (disable vlan aware settings if possible)

Looks like related to your hypervisor kernel. Didn't have that hardware. Try with Debian backport kernels. 6.4.

Looks like you are using armbian kernels from Odroid and not Debian kernels. Compile your own Proxmox kernel if you're able, related to your hardware. But use Debian bookworm repos and the one from jiangcuo the Proxmox unofficial repo. Good luck

liberodark commented 1 year ago

Yes im using kernel by armbian for Odroid C4 im try to switch on kernel 6.4 edge. That fix my issue :D