IP of the VM or VZ on Datacerver config

mikysal78

New Member
Mar 22, 2015
1
0
1
I can configure the IP addresses of the KVM OVZ directly on Proxmox?
On my server (proximox) i have this /etc/network/interfaces:

Code:
auto lo
iface lo inet loopback


# device: eth0
auto  eth0
iface eth0 inet static
  address   176.9.18.135
  broadcast 176.9.18.159
  netmask   255.255.255.224
  gateway   176.9.18.129
  # default route to access subnet
  up route add -net 176.9.18.128 netmask 255.255.255.224 gw 176.9.18.129 eth0


iface eth0 inet6 static
  address 2a01:4f8:150:128d::2
  netmask 64
  gateway fe80::1


auto vmbr0
iface vmbr0 inet static
        address  176.9.204.54
        netmask  255.255.255.248
        gateway  176.9.18.135
        bridge_ports none
        bridge_stp off
        bridge_fd 0
up ip route add 176.9.204.48/29 dev vmbr0

On virtual machines use an IP subnet 176.9.204.48/29
But if I change servers and IP addresses with other, I have to configure each virtual machines?
I want to manage the IP of the VM directly proximox, it's possible?











Today I used the repo no subscription.
I want to activate the subscription, if I find the right product for me.











There is a tutorial to configure the firewall from the web interface?

Thanks.
 
if the VM is using an image accessable from the host you can mount it like this,
Code:
 qemu-nbd -c /dev/nbd0 -P 1 vm-100-disk-1.qcow2    mount /dev/nbd0 /some/mount/point
then, when your script is done changing its network config, have it unmount and release the nbd device,
Code:
umount /some/mount/point && qemu-nbd -d /dev/nbd0
if its not directly accessable, you might have to temporarily move the storage to local to modify it. if your scripting all this, the command reference is here, http://pve.proxmox.com/pve2-api-doc/ moving storage is at /nodes/{node}/qemu/{vmid}/move_disk
 
Last edited: