[virt-tools-list] How to open the graphical console from the command line

Pavel Hrdina phrdina at redhat.com
Wed Jul 18 11:48:00 UTC 2018


On Wed, Jul 18, 2018 at 01:39:09PM +0200, R. Diez wrote:
> Hallo Pavel:
> 
> First of all, many thanks for your answer.
> 
> 
> > virsh --connect qemu:///system start UbuntuMATE1804
> 
> Is there any easy way to detect whether the virtual machine is already
> running? Otherwise, I get this:
> 
> error: Domain is already active
> 
> And the exit code is 1. This way, my script cannot tell whether the virtual
> machine failed to start or is already running, so it does not know whether
> it should proceed to the next step (opening the graphical console).

You will need to use same other tools to parse the output:

virsh --connect qemu:///system domstate UbuntuMATE1804

If you would not mind you can just open virt-manager with that one
command and one extra click on the "run" button.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20180718/b824da93/attachment.sig>


More information about the virt-tools-list mailing list