proxmox 8.1 vm not using dhcp

cd0101

Member
Jul 17, 2021
5
0
6
59
I installed Proxmox 8.1
This is the network for PVe box. As you can see i have 3 machines, but that is not relevant


1706152839259.png

Another post on this forum said run this on pve shell so vms could access the inet. I did and that worked.
echo 1 > /proc/sys/net/ipv4/ip_forward

https://forum.proxmox.com/threads/the-vms-are-not-assigned-ip-address-by-dhcp-server.125911/

My host could access internet before this command was entered, but new vms could not


I installed debian 12 in a vm

The setup was able to download updates and apparently setup dhcp.

WHen i rebooted after installation, it tried to grab the IP address of the host and could not ping google.com


I had to give it a static address in /etc/network/interfaces:


1706153324621.png


Why do i have to use a static address to get it to work?
I don't recall having to do this in proxmox 7.1, but maybe i forgot something.
 
Hi,

please provide more information.
First, the output of qm config 100 and cat /etc/network/interfaces would be helpful.

Further, how is your DHCP configured (e.g. address range)? Where does it run (externally on a router? built-in SDN?)

How did you then configure the DHCP client in the VM? I guess you are using Debian (12) in the VM? Did you correctly select DHCP configuration during the installation? If not, please have a look here how to configure a DHCP client on Debian.

Another post on this forum said run this on pve shell so vms could access the inet. I did and that worked.
echo 1 > /proc/sys/net/ipv4/ip_forward
This is generally only needed if you have a routed configuration, which you do not - or at least you seem to try to use bridged mode.
 
Here you go.

root@pve:~# qm config 100
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2
ide2: local:iso/debian-12.4.0-amd64-netinst.iso,media=cdrom,size=628M
memory: 2048
meta: creation-qemu=8.1.2,ctime=1706151416
name: k1
net0: virtio=BC:24:11:57:13:D5,bridge=vmbr0
numa: 0
ostype: l26
scsi0: local-lvm:vm-100-disk-0,discard=on,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=727b36bd-3bfd-44cd-9c3e-ef8db536e5c2
sockets: 1
vga: virtio
vmgenid: c0f0e1d1-2a6a-4156-8710-07f9cf0e3fe1



root@pve:~# cat /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
address 10.27.1.2/24
gateway 10.27.1.1
bridge-ports eno1
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094

source /etc/network/interfaces.d/*


The physical box running pve is connected to a dumb switch which is in turn connected to PFsense router. The router tags traffic with vlan 50,

I tried with or without the 50 tag in the vm setup but did not seem to help. Only when i did static address inside vm did i get the connection.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!