problems creating veth for ct

c0mputerking

Active Member
Oct 5, 2011
174
5
38
Hello all i am having errors adding a veth device to a container see below, not much to go on am i looking in the right log? vzctrl.log the GUI lets me try to create a veth then nothing happens please help

I need veth for some container to run dhcp server and the like.

Configure veth devices: veth201.0
2012-03-25T21:38:19-0600 vzctl : CT 201 : /usr/sbin/vznetcfg exited with error
2012-03-25T21:38:19-0600 vzctl : CT 201 : No changes in CT configuration, not saving
 
Is that log not saying that it already exists - and that all you need to do is configure the ethernet in your guest os?
 
I suppose it might already exist this machine is from a backup/restore of another machine, but i keep adding an entry for eth0 in my /etc/network/interfaces that looks like this

auto eth0
iface eth0 inet static
address 192.168.1.222
netmask 255.255.255.0
gateway 192.168.1.200

then get the following errrors while restarting networking serviices, and after a reboot of the vm also the etn0 entry disappears from the interfaces file after reboot

/etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces...SIOCDELRT: No such process
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.
done.

Sorry i am a bit lost here do not really know where to look for the vnet stuff or errors relating, and i do not see where it has been created anywhere?

also here is my proxmox host interfaces file not sure how correct this is could it be the problem sort of hacked it together to get routing fomr my IPS (uses DHCP) to work on my internal lan
auto eth0
iface eth0 inet dhcp

#auto eth0
#iface eth0 inet static
# address 68.146.201.249
# netmask 255.255.252.0
# gateway 68.146.200.1

auto eth1
iface eth1 inet static
address 192.168.1.200
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0

auto vmbr0
iface vmbr0 inet static
address 192.168.1.254
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
 
Last edited:
OK i have been playing around with this for a couple days now and cannot get veth to work also i created my first kvm on this machine and the virtual network card does not work inside the kvm either. I have tryed manually adding the veth but get a similar error I am not sure what it means please help

vzctl set 201 --netif_add eth0 --save
Configure veth devices: veth201.0
According to /etc/pve/openvz/201.conf, CT201 has no veth interface configured.
/usr/sbin/vznetcfg exited with error
No changes in CT configuration, not saving
 
Thanks dietmar i feel a bit of a fool now, not just for posting here, but how much time i wasted on something so simple I guess i might need break.
However now that i have a veth and have added an eth0 entry in my /etc/network/interfaces i no longer have any connectivity cannot ping google.ca or even the gateway but it can ping itself.

auto eth0
iface eth0 inet static
address 192.168.1.201
netmask 255.255.255.0
gateway 192.168.1.200

p.s. very tired now hope i am still making sense and not wasting everyones time
 

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!