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 ...

Get Building Google Cloud Platform Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.