0

I have an RHEL7 GCE instance with a static external IP#, a domain name registered through Google Cloud DNS, an SSL certificate generated against its static external IP#, and software licenses registered against its MAC address. I have corrupted the OS and I want to replace the instance with a newly created one. I need to transfer those network identifiers and the instance name to a new instance. The new instance can be created in the same project as the old instance. So how do I:

1. Assign the old instance's external IP# to the new instance (and give the old instance a new IP#)?
2. Assign the old instance's MAC address to the new instance (and give the old instance a new MAC address)?
3. Transfer the instance name from the old one to the new one (and rename the old one to something else)?

Completing any of those will save me a lot of trouble, and all of them will save me a huge load of trouble.

Thanks for the insights.

1

OK, working through these:

  1. Transfer external IP#:

    A. Ensure the old instance's external IP# is static, not ephemeral. That status makes the IP# a property of the instance's project, not just the instance it's assigned to. Deleting the old instance doesn't release that IP#, just changes its status from IN_USE to RESERVED . Check its status with gcloud compute addresses list .

    B. Delete the old instance. External IP# is retained; check its status with gcloud compute addresses list .

    C. Create the new instance. As per "Configuring IP Addresses" > "Assigning a static external IP address to a new VM instance": gcloud compute instances create [INSTANCE_NAME] --address [IP_ADDRESS] or from the GCE admin console webpage when specifying properties of the instance you're creating:

    Expand the Management, disk, networking, SSH keys section. Click Networking. Under External IP, select a static external IP address

    Select the option that is the RESERVED external static IP# you are reusing.

    D. Complete creating the new instance, and the old external static IP# is transferred to it.

  2. Transfer MAC address: There is no documented method to change an instance MAC address that allows the instance to resume connectivity afterwards.

  3. Transfer instance name: It's immutable, so no go.

1 out of 3 is better than none.

1
  • Instead of deleting the old instance to remove its static external IP# (returning it to the project's RESERVED pool), you can just remove the IP# from the instance: cloud.google.com/compute/docs/… – Matthew Jul 23 '17 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.