Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed this guide to create a KVM guest but I didn't pay attention to this line

Note: if you want to use Virsh to manage your virtual machines as detailed below, you must add this parameter:1

So the VM is running fine but I'd like to add it to the list of VMs managed with virsh, how can I do this?

share|improve this question
up vote 2 down vote accepted

Create another VM (adding --libvirt qemu:///system this time), but don't boot it -- virsh edit it and replace the path to your virtual disk with your existing VM's disk path.

share|improve this answer
sudo virsh define XXX.xml

That command can add a vm into virsh persistently.

The command "sudo virsh help" show help info.

share|improve this answer
The XML needs to exist for this command to work which is not the case for the OP. – talonx Aug 22 '15 at 18:16

Your Answer


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.