virsh list --all only shows running on host

Hi *, I am having a problem where on a KVM host I run virsh list --all. I only see the running VMs : [root@MBGVRT3323 ~]# virsh list --all Please enter your authentication name: Please enter your password: Id Name State ----------------------------------- 3 MBPDBS0583U-CLONE running 4 MBGDBS3156U-CLONE running I know there are two more VMs that are shutdown , and if I run virsh list --state-shutoff , nothing is returned. in fact, look at the numbering of the two running VMs, 3 and 4. The GUI shows the two running and the other two as being shutdown. Why is this happening ? Given this, seems the only way to start the two VMs which are down is in the GUI and not with virsh start domain which seems limiting. Any ideads would be greatly appreciated. [root@MBGVRT3323 ~]# virsh version Please enter your authentication name: root Please enter your password: Compiled against library: libvirt 5.7.0 Using library: libvirt 5.7.0 Using API: QEMU 5.7.0 Running hypervisor: QEMU 4.2.1 You have new mail in /var/spool/mail/root [root@MBGVRT3323 ~]#

On Tue, Dec 21, 2021 at 8:16 AM richmoch--- via Users <users@ovirt.org> wrote:
Hi *,
I am having a problem where on a KVM host I run virsh list --all. I only see the running VMs :
[root@MBGVRT3323 ~]# virsh list --all Please enter your authentication name: Please enter your password: Id Name State ----------------------------------- 3 MBPDBS0583U-CLONE running 4 MBGDBS3156U-CLONE running
I know there are two more VMs that are shutdown , and if I run virsh list --state-shutoff , nothing is returned. in fact, look at the numbering of the two running VMs, 3 and 4. The GUI shows the two running and the other two as being shutdown.
Why is this happening ? Given this, seems the only way to start the two VMs which are down is in the GUI and not with virsh start domain which seems limiting. Any ideads would be greatly appreciated.
You got it accurately. In oVirt, using libvirt terminology, VMs are transient. You can't (easily, robustly) start a VM if the engine is down. If the engine is up and functioning, you can also use the API, one of the SDKs, or ansible, to start VMs. So if in "seems limiting" you refer to using the GUI, you have other options. But if you refer to "engine must be up", then this is indeed a limitation. Engine must be up, and you are supposed to take frequent backups of it (using engine-backup) in case it's gone/corrupted/whatever and you need to restore. If it's gone and you have no backup, you can set up a new engine, and import the storage domains. Best regards, -- Didi

Which engine are you referring to ? The engine is up but the VM ( or domain ) is only down. So for this link : https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.0/htm... Under the section Procedure 6.27. Importing a Virtual Machine from KVM, I am able to connect to the KVM and it gives me a list of only the running VMs . The caveat is the VM needs to be down to import ( understandably ), so if I go and shutdown the VM on the remote KVM host, it no longer appears in the list . So how does one go about selecting the VM ( which is down ) from the list when it is not seen ? Rich

On Tue, Dec 21, 2021 at 5:21 PM richmoch--- via Users <users@ovirt.org> wrote:
Which engine are you referring to ?
Perhaps search the net for something like 'ovirt architecture' to get an overview.
The engine is up but the VM ( or domain ) is only down.
So for this link :
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.0/htm...
Under the section Procedure 6.27. Importing a Virtual Machine from KVM, I am able to connect to the KVM and it gives me a list of only the running VMs . The caveat is the VM needs to be down to import ( understandably ), so if I go and shutdown the VM on the remote KVM host, it no longer appears in the list .
So how does one go about selecting the VM ( which is down ) from the list when it is not seen ?
I am not sure exactly what you are trying to do, nor whether the above document is relevant to this. Please clarify exactly what you want to do, or what your question/issue is. If you are experienced with libvirt/virsh and expected the oVirt is just a (shallow) wrapper around that, and that you can continue using libvirt/virsh as you are/were used to, well, it's not like that. Indeed in certain cases your knowledge will be relevant for debugging/troubleshooting, perhaps supplying custom hooks if needed, but not more than that. Best regards, -- Didi

On Wed, Dec 22, 2021 at 8:04 AM Yedidyah Bar David <didi@redhat.com> wrote:
On Tue, Dec 21, 2021 at 5:21 PM richmoch--- via Users <users@ovirt.org> wrote:
Which engine are you referring to ?
Perhaps search the net for something like 'ovirt architecture' to get an overview.
The engine is up but the VM ( or domain ) is only down.
So for this link :
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.0/htm...
Under the section Procedure 6.27. Importing a Virtual Machine from KVM, I am able to connect to the KVM and it gives me a list of only the running VMs . The caveat is the VM needs to be down to import ( understandably ), so if I go and shutdown the VM on the remote KVM host, it no longer appears in the list .
So how does one go about selecting the VM ( which is down ) from the list when it is not seen ?
I am not sure exactly what you are trying to do, nor whether the above document is relevant to this. Please clarify exactly what you want to do, or what your question/issue is.
Right, the above mentioned section doesn't refer to hosts that are part of an oVirt cluster but "external" hosts that hold persistent domains you want to import to an oVirt cluster
If you are experienced with libvirt/virsh and expected the oVirt is just a (shallow) wrapper around that, and that you can continue using libvirt/virsh as you are/were used to, well, it's not like that. Indeed in certain cases your knowledge will be relevant for debugging/troubleshooting, perhaps supplying custom hooks if needed, but not more than that.
Best regards, -- Didi _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/VZJU55YHQHQ4BK...
participants (3)
-
Arik Hadas
-
richmoch@yahoo.com
-
Yedidyah Bar David