Note that bridge networking already links the host OS to each of the guest OS'.
The local area network ip of webvm is 10.0.0.6 and the network ip of datavm is 10.0.0.5. The connection string from a typical web app hosted on webvm is:
You can see that localhost refers to webvm. How do I change the connection string to refer to datavm? I hesitate We apparently need to useset up a NEW, second bridge network with 10.1.1.x addresses, so that the connection string would become jdbc:mysql://10.01.01.51:3306/somedb?autoReconnect=true because I do not want data transactions traveling across the network?
Also note that bridge networking already links the host OS to each of the guest OS'. So I don't want to do anything to mess up the host/guest bridge. The code that was used on the HOST to set up bridge networking with the guests is:
//Before creating vms
# nmcli con show (shows network connections before)
# nmcli con add type bridge ifname br0 (adds bridge networking)
# nmcli con show (shows network connections after)
//after creating vms
# nmcli connection modify bridge-br0 ipv4.method manual ipv4.addresses host.ip.addr/24 ipv4.gateway router.ip.addr
# nmcli con down bridge-br0; nmcli con up bridge-br0
# nmcli con up bridge-slave-eno1
# ip link (on host, will show vm connections as vnetX)
# bcrtl addif br0 vnet3 (this adds the vm to the network so you can ping it from elsewhere on the network. the vnet3 is a result from ip link that is a vm)
Now switch to another computer, open a terminal, and ssh [email protected] to connect to the virtual machine via ssh.
Whatever new bridge networking code we add must not conflict with the abovepre-existing bridge networking code that was already usednetwork.
In chat, @derobert suggested the following steps: