Assigning IP address to Ubuntu Sever VM

Rubber_Band_IT_Man

New Member
Oct 23, 2026
3
0
1
Hey all, complete and total Proxmox n00b here.
Trying to play around with creating a Ubuntu Server VM, and I've been bashing my head into a wall; I haven't found a way to add an IP address to the thing.
Proxmox itself has an IP address, and pings out. I've given it a static address in my network, and it shows the right address in the settings.
I've installed Ubuntu Server on a container, and the hardware gives a MAC address, however it's not showing on any arp tables, and I've tried binding an IP address to it, but it still isn't grabbing it and it can't ping out anywhere.

I know I'm doing something wrong, I'm just out of my depth.
 
If you have a DHCP server on the network, the LXC at least should grab an address. Make sure the LXC network setting is set to DHCP, otherwise you have to run ' dhclient -v ensp1 ' ( replace with the proper adapter name from ' ip a ' ) or give it an unused static IP and manually define DNS using the in-vm tools.

https://search.brave.com/search?q=u...ersation=09b88a34d662f4a18f1003c4b43f7d9e016f

Honestly for experimenting you'd be better off with straight Debian, it's got an editable /etc/network/interfaces and nmtui for commandline work. Ubuntu made things needlessly complex.

First, Make sure you setup the proxmox host-level network correctly, everything goes thru vmbr0 if you want your VMs to have Internet access. It's markedly different from a standard Linux distro. There are youtube videos on how to do the setup properly.

https://pve.proxmox.com/wiki/Network_Configuration#_default_configuration_using_a_bridge
 
Last edited:
Last edited:
  • Like
Reactions: Rubber_Band_IT_Man
Hi Rubber_Band_IT_Man

Are you able to edit the netplan config file?
The Ubuntu documentation has more information regarding this:
https://ubuntu.com/server/docs/expl...guring-networks/#static-ip-address-assignment

Please let me know if you have any more issues!
Thank you and everyone else who jumped in to help a n00b.
I did assign an IP address when creating the VM, but when I checked the netplan folder, there wasn't any files in it, so I created one with the help of the link you provided.

I created a file like this:
Code:
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses:
        - 10.72.1.25/27
      routes:
        - to: default
        - 10.72.1.1
      nameservers:
            address:
               -10.72.1.1

But when I ran the netplan apply, it gave the following error:
Code:
** (generate:778): WARNING **: 18:54:26.246: Permissions for /etc/netplan/00-network.yaml are too open. Netplan configuration should NOT be accessible by others.
/etc/netplan/00-network.yaml:10:11: Error in network definition: expected mapping (check indentation)
        - 10.72.1.1
          ^

I did grab a different computer (Windows OS), and put the IP address, gateway, and DNS into the machine to make sure I wasn't borking the network info, and it got online just fine. But when I try to put the same IP info into the Ubuntu VM, it can't ping 8.8.8.8, and trying to ping the default gateway returns a "Destination Host Unreachable" error.

Again, thanks for the assistance.
 
You omitted the via: for your route. As for the permissions perhaps something like this makes it happy
Bash:
chmod 600 /etc/netplan/00-network.yaml
Disclaimer: I don't use netplan.
 
Last edited:
@Impact, thanks for catch, I totally missed that; both for the "via" command, and the chmod. Added the via, ran the chmod, and it made the code happy.

To the wider thread, it seems the VM now has an IP address, however it still can't ping anything, not even the default gateway.

Code:
root@Coolify:~# ip address show
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@if33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether bc:24:11:73:cb:81 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.72.1.25/27 brd 10.72.1.31 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::be24:11ff:fe73:cb81/64 scope link
       valid_lft forever preferred_lft forever
root@Coolify:~# ping 10.72.1.1
PING 10.72.1.1 (10.72.1.1) 56(84) bytes of data.
^C
--- 10.72.1.1 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5138ms

root@Coolify:~#
 
Last edited: