Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have some qcow2 images which I am starting / stopping manually, with kvm, like this:

kvm -m 256 -smp 1 -drive file=/var/VMs/qcow2/server1.qcow2 -nographic -net nic,macaddr=52:54:00:11:34:55,vlan=0 -net tap,vlan=0,ifname=tap1,script=no,downscript=no

Now I would like to start managing those images with virsh, so that I can start doing things like:

virsh list
virsh start YourGuestName
....

I have found no information on how to put my qcow2 images under the control of virsh. Is there any way to do this? I would very much appreciate a solution which does not require reinstalling the VMs.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Very easy - create and define a new VM with virsh edit, virt-manager or virt-install, and instead of creating the new disk images, attach the existing ones. You will need to move the images into libvirt's image store, or define an image store where the existing images are kept.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.