简体   繁体   中英

Migration of a Google Cloud Platform webserver virtual instance (from one account to another)

I am looking for a comprehensive walkthrough of how to properly export a full disk/instance from Google Cloud Platform Account #1 to GCP Account #2.

This may not seem like a troubling issue for some of us, but a lot of careful learners will hesitate to do a migration of their webservers in fear it may corrupt the disk and/or cause networks issues due to change in network/HWID.

How would someone migrate a full webserver from one account to another.

Notes: No sharing (of the instance) is possible. It needs to be a fully autonomous (manual download of full disk) and not dependent of GCP project/instance sharing.

  1. Shut down [Stop] your instance.
  2. Go to this exact section: "Compute Engine > Images"
  3. You should see "Create an image" in the main/body container (top-part)
  4. Click and select "Disk" as a "Source" AND "your-instance-name" as "Source Disk"
  5. Create the image
  6. Prepare for export of the image to your Google Storage (Storage > Storage > Create folder)
  7. Using the web-console: (gcloud compute images export --image= YOUR IMAGE NAME --destination- uri=gs://SOMEFOLDER/YOURIMAGE.vmdk --export-format=vmdk)
  8. Navigate to your Storage Browser
  9. Manually download the image that you just exported
  10. In another browser, log into your alternate account and navigate to Storage > Storage
  11. Upload you newly created/downloaded vmdk
  12. Once fully uploaded, navigate to Compute Engine > Instances
  13. Click on Create an Instance
  14. In the "Source" section, select the "Virtual Disk" option
  15. Use your gs://your-snapshot-img.vmdk path
  16. Deploy the instance
  17. Once done, you need to edit your DNS records to reflect your new IP.

If this is followed, the webserver should work properly and migration would be successful.

Make sure to edit/update all configs containing your old IP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM