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:
- Knowledge on how to clone a VM, using your running Hypervisor.
- 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
- Clone the Source VM.
- Adjust any sizing of the destination VM now (you can also do this later).
Power up the cloned VM
- 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).
- Login to the Console, using the VM Console.
- Change the Hostname in the two files
/etc/hosts
and/etc/hostname
. - Change the IP address (only required if you assigned a static one) in
/etc/netplan/00-installer-config.yaml
.
Reboot the cloned VM
- connect the Network Card, and reboot the VM.
Your clone is now unique, and usable.