Moving ProxMox to another network

Allubz

New Member
May 22, 2020
4
0
1
124
Hi all,

I'm not very versed in the Linux / ProxMox world, but I'm happily running a VM on an AMD Threadripper 3960X.

What I want to do is move the physical system to another location and set it up for the network there. I don't know what I should change, exactly.

I'm afraid that when I change a few network related settings but miss a few as well, the installation will be borked. I only have access to it through the web interface of another rig, so if network transfer fails, the VM becomes inaccessible for me, due to how it's set up with GPU passthrough.

The information I have:
Host
Default Gateway
Current IP address
Hosts file (via Web Interface)
Current DNS / Search Domain (What to do with "search domain"? Our current network has a specified domain xxx.net, but the target network is a home network)

Target
Default Gateway
Preferred IP address


I hope my question and information provided is clear enough to be able to answer the problem. If not, please let me know, and I'll be happy to provide.

All the best!

Al
 
If you have a preferred ip address you also need to know gateway, submask and dns of the target network.

Search domain can be left out for the time beeing, if you dont need dns resolution within the new network.

You can also use a public dns like 1.1.1.1 cloudflare, 8.8.8.8 google, if the target network won't block it.


I assume your vm's also have static ip's configured right now. So you need to start with them.

Prepare your vm's by changing their network settings according to the new network.

After that change your hypervisor settings via proxmox gui or directly in /etc/network/interfaces


We can help you preparing it but we need the configuration details.

On the new target network run "ipconfig /all" on a windows machine or on linux "ip a" and "cat /etc/resolv.conf"

Do the same for your current network and post the output.
 
Thanks for your response! Much appreciated!


Host machine:
- The VM doesn't have special networking settings, it only receives the passed through LAN port, which is then assigned IP and all by the local DHCP.

- "ip addr":
Code:
root@pve:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp69s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr0 state UP group default qlen 1000
    link/ether b4:2e:99:a7:4e:21 brd ff:ff:ff:ff:ff:ff
3: enp70s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b4:2e:99:a7:4e:23 brd ff:ff:ff:ff:ff:ff
4: wlo2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether f8:28:19:6a:15:e5 brd ff:ff:ff:ff:ff:ff
5: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether b4:2e:99:a7:4e:21 brd ff:ff:ff:ff:ff:ff
    inet 172.16.8.78/21 brd 172.16.15.255 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::b62e:99ff:fea7:4e21/64 scope link
       valid_lft forever preferred_lft forever


enp69s0 being the current network adapter for ProxMox, enp70s0 being the passed through adapter for the VM. vmbr0 is unused, wl0 isn't passed through or used at the moment.

- "ip a"
Code:
root@pve:~# cat /etc/resolv.conf
search XXXX.net
nameserver 172.16.15.253
nameserver 8.8.8.8
nameserver 8.8.4.4


Target machine:
- Relevant portion of "ifconfig"

Code:
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=400<CHANNEL_IO>
    ether f0:18:98:24:1e:9b
    inet6 fe80::4a7:be16:9511:89a1%en0 prefixlen 64 secured scopeid 0x6
    inet6 2001:981:2e58:1:1485:e9d2:c3d1:bd2f prefixlen 64 autoconf secured
    inet6 2001:981:2e58:1:d13f:66d7:338d:9bac prefixlen 64 autoconf temporary
    inet 192.168.178.43 netmask 0xffffff00 broadcast 192.168.178.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active


- "ip a"
Code:
domain fritz.box
nameserver 192.168.178.1
nameserver fd00::9ec7:a6ff:fec8:4ed3

- Internal DNS & gateway: 192.168.178.1. Secondary 8.8.8.8
 
Thanks for your response! Much appreciated!


Host machine:
- The VM doesn't have special networking settings, it only receives the passed through LAN port, which is then assigned IP and all by the local DHCP.

- "ip addr":
Code:
root@pve:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp69s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr0 state UP group default qlen 1000
    link/ether b4:2e:99:a7:4e:21 brd ff:ff:ff:ff:ff:ff
3: enp70s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b4:2e:99:a7:4e:23 brd ff:ff:ff:ff:ff:ff
4: wlo2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether f8:28:19:6a:15:e5 brd ff:ff:ff:ff:ff:ff
5: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether b4:2e:99:a7:4e:21 brd ff:ff:ff:ff:ff:ff
    inet 172.16.8.78/21 brd 172.16.15.255 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::b62e:99ff:fea7:4e21/64 scope link
       valid_lft forever preferred_lft forever


enp69s0 being the current network adapter for ProxMox, enp70s0 being the passed through adapter for the VM. vmbr0 is unused, wl0 isn't passed through or used at the moment.

- "ip a"
Code:
root@pve:~# cat /etc/resolv.conf
search XXXX.net
nameserver 172.16.15.253
nameserver 8.8.8.8
nameserver 8.8.4.4


Target machine:
- Relevant portion of "ifconfig"

Code:
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=400<CHANNEL_IO>
    ether f0:18:98:24:1e:9b
    inet6 fe80::4a7:be16:9511:89a1%en0 prefixlen 64 secured scopeid 0x6
    inet6 2001:981:2e58:1:1485:e9d2:c3d1:bd2f prefixlen 64 autoconf secured
    inet6 2001:981:2e58:1:d13f:66d7:338d:9bac prefixlen 64 autoconf temporary
    inet 192.168.178.43 netmask 0xffffff00 broadcast 192.168.178.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active


- "ip a"
Code:
domain fritz.box
nameserver 192.168.178.1
nameserver fd00::9ec7:a6ff:fec8:4ed3

- Internal DNS & gateway: 192.168.178.1. Secondary 8.8.8.8

Your old subnet was /21, your new subnet is /24, so its smaller.

Your new network also uses ipv6, it is not necesary to use it though.

As your VM's get their ip via DHCP there is not much you have to do.

Your vm's will get a 192.168.178.X ip.


Lets assume your new ip will be 192.168.178.78

Make sure your dhcp will not give out ip's in the range of your server.

Then replace "172.16.8.78/21" with "192.168.178.78/24" in /etc/network/interfaces
And put the following into /etc/resolv.conf:
search fritz.box
nameserver 192.168.178.1
nameserver 8.8.8.8
nameserver 8.8.4.4
 
Thanks! I had to figure out how you knew that the new subnet would be /24, but I found the "netmaks 0xffffff00" hint and folowed that lead ;)

My "/etc/network/interfaces" looks as following:

Code:
  GNU nano 3.2                   /etc/network/interfaces                              

auto lo
iface lo inet loopback

iface enp69s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 172.16.8.78
        netmask 255.255.248.0
        gateway 172.16.15.253
        bridge_ports enp69s0
        bridge_stp off
        bridge_fd 0

iface enp70s0 inet manual

I didn't expect vmbr0 to have information, and the two controllers to be "inet manual"

I don't see a reference to /21 at all, so I'm back asking whether I should take care before I change this IP address. Can I simply changet the IP here, without netmask references?

The resolv.conf file seems updatable given the parameters you supplied, but I'll hold off doing so until I can change both files at once.
 
Thanks! I had to figure out how you knew that the new subnet would be /24, but I found the "netmaks 0xffffff00" hint and folowed that lead ;)

My "/etc/network/interfaces" looks as following:

Code:
  GNU nano 3.2                   /etc/network/interfaces                            

auto lo
iface lo inet loopback

iface enp69s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 172.16.8.78
        netmask 255.255.248.0
        gateway 172.16.15.253
        bridge_ports enp69s0
        bridge_stp off
        bridge_fd 0

iface enp70s0 inet manual

I didn't expect vmbr0 to have information, and the two controllers to be "inet manual"

I don't see a reference to /21 at all, so I'm back asking whether I should take care before I change this IP address. Can I simply changet the IP here, without netmask references?

The resolv.conf file seems updatable given the parameters you supplied, but I'll hold off doing so until I can change both files at once.

/21 is your submask which equals netmask 255.255.248.0
change netmask to 255.255.255.0 for /24
gateway to the fritzbox 192.168.178.1
and address to 192.168.178.78 or whatever

As you have 2 nics but only use 1 it would make sense to bond them given the switch supports it.
 
H4R0 thanks very much for your guidance! I was staring myself blind at the /21 /24 part, and failed to realize they are indications of the netmask. I have updated the files accordingly, and will for now assume this is all that was needed to be done.

At the moment I feel it's better to keep the NICs separated, because in the end they probably will be used for two separate network instances, at least in Windows.

Thanks again!
 

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!