Virtualization (Part 2)
LINUXLPIC1-101
2/20/2026


On my host machine, I'm using KVM for AMD:
$ lsmod | grep -i kvm
kvm_amd 200704 0
kvm 1343488 1 kvm_amd
irqbypass 12288 1 kvm
ccp 159744 2 i2c_designware_platform,kvm_amd
Check the CPU extensions on your host system:
$ grep ^flags /proc/cpuinfo | grep vmx
If you get a response, then you are most likely running on a host system that will support virtualization and has an Intel chip.
Perform another check of the CPU extensions on your system:
$ grep ^flags /proc/cpuinfo | grep svm
If you get a response, then you are most likely running on a host system that will support virtualization and has an AMD chip.
Perform one more check of the CPU extensions:
$ grep ^flags /proc/cpuinfo | grep -i hypervisor
If you get a response, then most likely you are running your Linux system as a guest VM.
You may find the following two types of files for your VM: Open Virtualization Format (OVF) file or Open Virtualization Application (OVA) file.
You can create a clone of the VM or a template, however, the template is not bootable.
Items to check after cloning a VM
Remove and regenerate the D-BUS Machine ID from /var/lib/dbus/machine-id and the Machine ID from /etc/machine-id. /var/lib/dbus/machine-id is actually supposed to be a symbolic link to /etc/machine-id. This ensures the system has one single "source of truth" for its identity. /var/lib/dbus/machine-id may not be found in every system. Determine if you could regenerate an ID number to use as the D-bus machine's ID, by typing which dbus-uuidgen.
Host name
NIC MAC addresses
NIC static IP addresses, if any
Universally Unique Identifiers (UUID)
Regenerate SSH Host Keys: If you don't do this, every clone will share the same "fingerprint," which is a security risk. sudo rm -f /etc/ssh/ssh_host_* ; sudo ssh-keygen -A ; sudo systemctl restart ssh . Once you do this, the next time you try to SSH into this VM from, let's say, your physical computer, you will see a WARNING:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
This is normal. Your computer remembers the old key associated with that IP address. You need to clear that old entry on your local machine (not the cloned VM) with:
ssh-keygen -R [IP_ADDRESS_OF_VM]
Cloud-init
It is the industry-standard open-source tool for initializing and customizing Linux/Unix virtual machines (VMs) in cloud computing. You can use it to automatically generate all the items after cloning a VM. When you launch a VM, Cloud-init looks for a special file called user-data (usually a YAML file). Every clone gets a unique UUID, unique SSH keys, and a unique hostname automatically.
For more information on Virtualization, check Part 1.
Contact
hello@unixtips.eu
© 2025. All rights reserved.