O'Reilly logo

Google Cloud Platform Cookbook by Legorie Rajan PS

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

For this recipe, we'll take a backup of a CentOS VM in RAW virtual disk format. Then, we'll import the virtual disk into our target project and recreate the VM. The following steps explain the creation of the VM:

  1. First, let's create a CentOS 7 VM and call this our source instance:

SSH into the instance and print the system information to confirm the Linux version:

$ uname -aLinux instance-1 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  1. Create a text file in the home folder and save it:
$ echo 'Data in file' > data.txt$ cat data.txtData in file

The following steps show the exportation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required