Cloning KVM virtual machine using CLI Rumi, July 21, 2021 To clone your VM and spawn new instances in KVML # virt-clone --original {Domain-Vm-Name-Here} --auto-clone OR # virt-clone --original {Domain-Vm-Name-Here} --name {New-Domain-Vm-Name-Here} --auto-clone OR # virt-clone --original {Domain-Vm-Name-Here} \ --name {New-Domain-Vm-Name-Here} --file {/var/lib/libvirt/images/File.Name.here} Examples: Cloning Guests with virt-clone First VM/domain with devices to clone must be paused or shutoff. To gracefully shutdown a domain named ubuntu-box1, run: $ sudo virsh shutdown ubuntu-box1 OR you can paused it as follows: $ sudo virsh suspend ubuntu-box1 $ virsh list Sample outputs: Domain ubuntu-box1 suspended Id Name State ---------------------------------------------------- 1 freebsd running 5 ubuntu-box1 paused Let us generate a new guest name, and paths for new storage automatically for a vm called ubuntu-box1 $ sudo virt-clone --original ubuntu-box1 --auto-clone Sample outputs: WARNING Setting the graphics device port to autoport, in order to avoid conflicting. Allocating 'ubuntu-box-1-clone.qcow2' | 40 GB 00:00:04 Clone 'ubuntu-box1-clone' created successfully. The above command cloned the guest called “demo” on the default connection, auto generating a new name called ubuntu-box1-clone and disk clone path. You can start or resume original domain: $ sudo virsh start ubuntu-box1 OR $ sudo virsh resume ubuntu-box1 Next, start ubuntu-box1-clone, enter: $ sudo virsh start ubuntu-box1-clone Verify it: $ virsh list For better managibility you can install virt-manager and use mobaxtreme tool to connect to the virt-manager GUI on your PC.. Related Administrations KVM CentOSCentOS 7KVM
Server Monitoring with Munin and Monit on Ubuntu 14.04 LTS January 6, 2016 Our system’s hostname is server1.example.com, and we have a website www.example.com on it with the document root/var/www/www.example.com/web. The following steps have to be performed as root user. To become root user on your server, run this command: sudo su Ensure that the system is up to date before you start… Read More
Convert VirtualBox VM to ProxMox VE June 24, 2022June 24, 2022 On the VirtualBox host, launch VirtualBox Right click the VM to convert > Settings Select Storage from the left navigation Click the virtual hard disk and copy the Location value for the full path of the disk to the clipboard Right click on the Start menu > Run > type… Read More
Large Database Import Progress Using PV March 24, 2020 PV can report progress for large data imports. In this example I will use a large (7 G) install on Ubuntu. First, download PV (http://linux.die.net/man/1/pv) sudo apt-get install pv A traditional mysql import may be formatted as: mysql -u USER -p DATABASE_NAME < DUMP.mysql but to leverage PV, pass the dump file ,then pipe the… Read More