Get startedGet started for free

Migrating a VM between networks

1. Migrating a VM between networks

Finally, we discuss how to migrate a VM instance from one network to another. When a VM is connected to more than one network using multiple interfaces, the migration process updates one of the interfaces and leaves the rest in place. Luca needs to migrate a VM from one VPC network to another. What can she do? Before she migrates it, it is important that she is aware of the supported migration requirements and limitations, so let's go over them. Before you migrate a VM, you must meet the following requirements. The migration is a cold migration. The VM must be stopped before it can be migrated. The VM must not be in an instance group or network endpoint group NEG. If the VM is in an unmanaged instance group or NEG, you must take it out of the group before migrating it. VMs in managed instance groups cannot be migrated. Instead, you must copy your instance template to the new network and use it to rebuild the managed instance group. A target pool is a group of Google compute engine instances that receive incoming traffic from a load balancer. You can move instances and target pools without removing them first. The target pool expands to cover both networks. The migrations supported from Legacy network to a VPC network in the same project, from one VPC network to another VPC network in the same project. From one subnet of a VPC network to another subnet of the same network, from a service project network to the shared network of a shared VPC host project. In all cases, the VM stays in the region and zone where it was before only the attached network changes. There are limitations to migrating that you should consider. You cannot migrate a VM interface to a legacy network. The MAC address allocated to the network interface will change during the migration. This could have an impact on services tightly coupled with MAC addresses such as third-party license agreements. If you are migrating the VM to a network or subnet with a different IP range, the internal IP address of your instance must change. If you are migrating to a subnet with the same IP range, you can keep the old IP address as long as it is not already in use at the destination by specifying it during the migration. You can keep the VMS existing external IP address in the new location. However, to do this, you must have the compute.subnetworks.use external IP permission on the target network. And the target network cannot have external IP addresses disabled by the constraints/compute.vm externalip access constraint.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.