Difference between revisions of "Virt-clone"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 26: Line 26:
 
* <code>[[qemu-img convert]]</code>
 
* <code>[[qemu-img convert]]</code>
 
* <code>[[virt-install]]</code>
 
* <code>[[virt-install]]</code>
 +
* <code>[[virt-manager]]</code>
  
 
== Activities ==
 
== Activities ==

Revision as of 07:52, 5 July 2020

virt-clone command is included in virtinst package in Ubuntu.

https://linux.die.net/man/1/virt-clone


0) Stop origin virtual machine: virsh shutdown OLD_MACHINE
1) virt-clone --original ORIGIN_MACHINE --name NEW_MACHINE --auto-clone
2) Connect to new server and: hostnamectl set-hostname NEW_SERVER_NAME
3) Modify: /etc/netplan/


 virt-clone --original ORIGIN_MACHINE --name NEW_MACHINE --auto-clone
 Allocation 'XXXXX-clone.qcow2     24% ....

virt-clone --original ORIGIN_MACHINE --name NEW_MACHINE --auto-clone
ERROR    Disk /path/to/file.qcow2 is already in use by other guests ['OTHER_MACHINE']. (Use --check path_in_use=off or --check all=off to override)
Solution:
virsh undefine OTHER_MACHINE


Related commands

Activities


See also

Advertising: