Static IP Address for Bridged OpenVZ VMs?

wnpaul

New Member
Jun 2, 2009
21
0
1
I have been wondering about the fact that when one selects "Bridged" for the network of a new OpenVZ virtual machine, there is no option to specify an IP address in the GUI screen.

Is the assumption that all virtual machines will get their IP information via DHCP?

If so, it would be nice if the GUI creation success message showed the MAC address of the network interface, so one can go and create a static IP address on the DHCP server before powering the machine up.

Of course it would also be nice if there were a way to provide a static address for the new VM through the GUI, instead of having to use the commandline vzctl command.
 
I have been wondering about the fact that when one selects "Bridged" for the network of a new OpenVZ virtual machine, there is no option to specify an IP address in the GUI screen.

Is the assumption that all virtual machines will get their IP information via DHCP?

If so, it would be nice if the GUI creation success message showed the MAC address of the network interface, so one can go and create a static IP address on the DHCP server before powering the machine up.

Of course it would also be nice if there were a way to provide a static address for the new VM through the GUI, instead of having to use the commandline vzctl command.

if you choose bridge you need to configure the network inside the VM - like you configure it on a KVM guest or a physical host.
 
if you choose bridge you need to configure the network inside the VM - like you configure it on a KVM guest or a physical host.

Really? So far, after creating an OpenVZ VM with bridged network I have simply gone to a ssh session on the PVE server and typed,

Code:
vzctl set VMID --ipadd 192.168.0.xxx --save
before starting the VM, and this seems to work just fine.

It seems that if the GUI provided an input field for the IP address, the web app could then execute that same command on the PVE server ...

Anyway, not complaining just suggesting :)
 
Code:
vzctl set VMID --ipadd 192.168.0.xxx --save
before starting the VM, and this seems to work just fine.

That way you mix veth with venet. Above command just configures venet (it does not configure the bridged ethernet device).
 

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!