Cannot start container with network interface

danboid

Renowned Member
Jul 5, 2012
16
0
66
I have installed Proxmox 8. I can successfully create and start a container from the command line but only without a network interface. If I create a container with a network interface I get the error:

missing command at /usr/share/perl5/PVE/CLI/pct.pm line 189.

When I try to use `pct exec 100` to enter the container. The following command works fine and I am able to start the container it creates:

pct create 100 local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst -onboot 1 -memory 4096 -cores 2 -rootfs local-zfs:30 --unprivileged 1

I have tried different variations of the next command but always get the above error when trying to use `pct exec 100` to enter the container:

pct create 100 local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst -onboot 1 -memory 4096 -cores 2 -rootfs local-zfs:30 --unprivileged 1 -net0 name=eth0,bridge=vmbr0,ip=dhcp

I have tried specifying the gateway and setting the type to veth with no luck. I don't need to install a DHCP server under proxmox to have DHCP work under containers do I?

I have also tried giving the network interface a static IP but I get the same error when running `pct exec 100` eg:

pct create 100 local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst -onboot 1 -memory 4096 -cores 2 -rootfs local-zfs:30 --unprivileged 1 -net0 name=eth0,bridge=vmbr0,ip=172.20.0.77/21,gw=172.20.0.50
 
Last edited:
missing command at /usr/share/perl5/PVE/CLI/pct.pm line 189.

When I try to use `pct exec 100` to enter the container.
https://pve.proxmox.com/pve-docs/pct.conf.5.html
https://pve.proxmox.com/pve-docs/pct.1.html

pct exec is to run a command inside the container. If you want to enter the container with an interactive shell, the command is pct enter {vmid}.

I hope that helps. To make your posts more readable, please consider the [ICODE][/ICODE] and [CODE][/CODE] tags, which you can also select in the formatting options of the text editor. :)
 
  • Like
Reactions: danboid
Oops!

Yes I was using the wrong subcommand! Great!

When I use the right command it works, whaddya know?

Thanks