Configuring a virtual machine by writing the XML file, can be quite tedious and error-prone. An easier way of creating the VM from an existing image, or from an installation media (which can be physical, virtual, or a network location), is using the virt-install tool. Lets see an example of creating the same KVM instance using that tool.
- We start by installing the package:
root@kvm:~# apt install virtinst...root@kvm:~#
- Next, we define and start the new instance by invoking the virt-install command (if an instance with the same name already exist, you'll need to destroy and undefine it first):
root@kvm:~# virt-install --name kvm1 --ram 1024 --disk path=/tmp/debian.img,format=raw --graphics vnc,listen=184.108.40.206 --noautoconsole ...