Openvz NIC problem

  • Thread starter Thread starter nilski
  • Start date Start date
N

nilski

Guest
Yesterday evening I installed PVE once again. It took about the time to drink a cup of coffee to set it up. I am very happy about that!
(Next I installed webmin as I like a webinterface to manage Linux. That also works out of the box.):D

KVM works, and quite fast too! I will probably use KVM most but I wanted to give Openvz a try too.

Unfortunately I only get a prompt after setting up a guest from template. In the log I see that no IP address has been given.:confused:
My onboard NIC is a Realtek 8111C 10/100/1000. Do I need to use another NIC? If so I have an Intel e1000 in there also but not connected yet. Can I simply switch NIC if that's the problem? (have to test it this evening)
 
Yesterday evening I installed PVE once again. It took about the time to drink a cup of coffee to set it up. I am very happy about that!
(Next I installed webmin as I like a webinterface to manage Linux. That also works out of the box.):D

KVM works, and quite fast too! I will probably use KVM most but I wanted to give Openvz a try too.

Unfortunately I only get a prompt after setting up a guest from template. In the log I see that no IP address has been given.:confused:
My onboard NIC is a Realtek 8111C 10/100/1000. Do I need to use another NIC? If so I have an Intel e1000 in there also but not connected yet. Can I simply switch NIC if that's the problem? (have to test it this evening)

more info needed. you set up a container with venet or veth? which template?
 
Well I tried both venet and veth to no avail. The console gives me a prompt and in properties it says IP Address: unknown.
In local templates it had lost the description field so to be sure I downloaded it again. Unfortunately it didn't help.
Any suggestions?

Well, it works now. I used venet and had to set a fixed IP Address.
Should it work like this or should DHCP have worked?
 
Last edited by a moderator:
DHCP only works if you have a DHCP server (there is no default DHCP server).
I have a DHCP Server of course.. KVM machines get an IP Address. Openvz not. I don't see a console but I can go to the webpage (when I configure a static IP address). A link is in the statuspage.
Should there be no console?
 
I have a DHCP Server of course.. KVM machines get an IP Address. Openvz not.

DHCP with OpenVZ only works if you use bridged mode ('veth'). But you also need to configure the network inside the container to use DHCP.

I don't see a console but I can go to the webpage (when I configure a static IP address). A link is in the statuspage.
Should there be no console?

There is an 'Open VNC console' link on the status page (after you start the VM). The red-arrow-down on the virtual mashine list opens a menu, which also contains a link to the console.

- Dietmar
 
DHCP with OpenVZ only works if you use bridged mode ('veth'). But you also need to configure the network inside the container to use DHCP.



There is an 'Open VNC console' link on the status page (after you start the VM). The red-arrow-down on the virtual mashine list opens a menu, which also contains a link to the console.

- Dietmar

Tried that, still no IP. :( What do you mean by configuring the network inside the container?
(And yes, I know where to find the VNC Console button..)
 
Tried that, still no IP. :( What do you mean by configuring the network inside the container?

You need to configure the guest to use DHCP.

(And yes, I know where to find the VNC Console button..)

Obviously I do not understand your question.
 
You need to configure the guest to use DHCP.



Obviously I do not understand your question.

Obviously not. ;)
What I just did;
Installed Zenoss with veth on vbr1 (my LAN with DHCP server)
Next I started the VM.
In the Status page it says: IP Address: unknown
When I open the VNC console I get a prompt with;
"entered into CT 117"
"root@zenoss:/#"
After entering ifconfig it gives me only a loopback address
So I entered next lines in /etc/network/interfaces and rebooted;
"auto eth0"
"iface eth0 inet dhcp"
After reboot I still don't see an IP address in the status console but when I go to the VNC console in ifconfig I see it get's an IP address.
Opening a browser to the IP address gives me nothing (http and https)
Obviously I don't understand how it should be working..:eek:

I created a second VM with venet and a fixed IP address.
In the status page I now see the IP address I gave it. This is a link to the address on port 8080 and.. it works!
When I open a VNC console I get the same prompt, ifconfig gives me a funny looking address..
<strikethrough>I guess venet with a fixed IP is the way to go then.:confused:</strikethrough>

Correction, the first one also works when I connect via http to port 8080.
 
Last edited by a moderator:
After entering ifconfig it gives me only a loopback address
So I entered next lines in /etc/network/interfaces and rebooted;
"auto eth0"
"iface eth0 inet dhcp"

if you just do
Code:
ifup eth0
you can see whats going on.

Whats the content of /etc/network/interfaces on the host?

- Dietmar
 
Re: Openvz NIC problem - "IP Address: unknown"

Why are all CT with veth showing up as

IP Address:unknown ????

If the address is not in the config file then could we add
somthing like
$ip = `/usr/sbin/vzctl exec $veid ifconfig`;
$ip =~ /inet addr:(\S+)/;
$ip = $1

to the code that populates the $vzinfo struct?
 
There is no reliable way to detect the ip address of veth. Exec something inside the container is slow - I dont want to do that.
 

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!