Andrei Perietanu
2015-Dec-01 15:31 UTC
[libvirt-users] libvirt list --all shows empty list after restart
Hi all, I think I might have a small configuration issue: after restarting my machine, all the VMs previously installed are not available. virsh list --all shows an empty list. The .img files where the VMs were intalled are present in the folder I put them in. Furthermore if I import the VMs (virt-install -import) it all seems to work. It's just that I don't want to have to do this after every restart and can't find where libvirt picks up information about any existing VMs on the system. Thanks, Andrei -- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you receive this in error please contact the sender and delete the material from any computer immediately. It is the policy of Klas Limited to disavow the sending of offensive material and should you consider that the material contained in the message is offensive you should contact the sender immediately and also your I.T. Manager. Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW, Washington, DC 20007. Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish Limited Liability Company, with its registered office at Fourth Floor, One Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20151201/76e1140a/attachment.htm>
Laine Stump
2015-Dec-01 18:53 UTC
[libvirt-users] libvirt list --all shows empty list after restart
On 12/01/2015 10:31 AM, Andrei Perietanu wrote:> Hi all, > I think I might have a small configuration issue: after restarting > my machine, all the VMs previously installed are not available. > > virsh list --all shows an empty list.1) Are you running virsh as root? 2) How did you create the guests? Did you use virt-install or virsh define? Or maybe you're using "virsh create"? (the latter would create a transient guest, whose configuration would exist only until the guest was terminated).> The .img files where the VMs were intalled are present in the folder I > put them in. Furthermore if I import the VMs (virt-install -import) it > all seems to work. It's just that I don't want to have to do this > after every restart and can't find where libvirt picks up information > about any existing VMs on the system.It all depends on whether or not you were running as root when you created the guests. If you were running as root, virsh/virt-install would have connected to qemu:///system, and the config for the guest is stored in /etc/libvirt/qemu. If you were running as an unprivileged user, virsh/virt-install would connect to qemu:///session (an instance of libvirtd specific to the current user), and the configuration for the guests would be in ~/.config/libvirt/qemu. Note that you should *never* directly examine or modify these files, as their existence is not a part of the official libvirt API; you should instead use virsh, virt-manager, or some other management application that uses the libvirt API. I am only telling you this information so that you can do a sanity check on the files' existence/location.