Linux VM Cloning - The-GNTL-Project/Documentation GitHub Wiki

Description

Here are some basic steps in cloning a Linux Virtual Machine.

In this example, we will use Ubuntu 20.04, but the steps should be similar for other distributions.

Linux does not use SIDs (Security Identifiers) like Windows, so we don't have to worry about performing image clean up.

Installation

Pre-requisites

These are all required before you proceed:

  1. Knowledge on how to clone a VM, using your running Hypervisor.
  2. Basic Linux knowledge.

Prepare Source VM

  • It is not necessary to shut the VM down, but it's a cleaner way to clone, so shut the source VM down if you can:

Clone the VM

  1. Clone the Source VM.
  2. Adjust any sizing of the destination VM now (you can also do this later).

Power up the cloned VM

  1. Before you Power on the VM, disconnect the Network Card, so you don't get duplicate IP issues (if you have a static IP assigned).
  2. Login to the Console, using the VM Console.
  3. Change the Hostname in the two files /etc/hosts and /etc/hostname.
  4. Change the IP address (only required if you assigned a static one) in /etc/netplan/00-installer-config.yaml.

Reboot the cloned VM

  1. connect the Network Card, and reboot the VM.

Your clone is now unique, and usable.