include ("header.inc"); ?>
Exercise: Cloning VMs in virt-manager
The image files take large space, so we need to create an additional folder to store them:
For the storage option, select "Details",
then specify the new path: /home/hostadm/KVM/kvm2.img
Keep the default configuration settings for the other parameters.
This will be a new VM with the systems configurations originally set in kvm1.
Login to the system as user hostadm, elevate privileges by running sudo -s, then follow the procedure below to change the host name from kvm1 to kvm2:
Edit file /etc/hostname and replace kvm1 by kvm2.
Edit file /etc/hosts and remove the line containing 127.0.1.1 kvm1.
Note, if there is file /etc/udev/rules.d/70-persistent-net.rules, then remove it:
Exit the VM console with ^] key combination.
Check if the system recognizes itself as kvm2:
Shutdown kvm2 by running command shutdown on it:
When the VM console exits, make sure kvm2 is no longer running: