20.10. Connecting the Serial Console for the Guest Virtual Machine
virsh console domaincommand connects the virtual serial console for the guest virtual machine. This is very useful for example for guests that do not provide VNC or SPICE protocols (and thus does not offer video display for GUI tools) and that do not have network connection (and thus cannot be interacted with using SSH).
--devnameparameter refers to the device alias of an alternate console, serial, or parallel device configured for the guest virtual machine. If this parameter is omitted, the primary console will be opened. If the
--safeoption is specified, the connection is only attempted if the driver supports safe console handling. This option specifies that the server has to ensure exclusive access to console devices. Optionally, the
forceoption may be specified, which requests to disconnect any existing sessions, such as in the case of a broken connection.
Example 20.19. How to start a guest virtual machine in console mode
virsh console guest1