On 05.06.2018 17:35, Lentes, Bernd wrote:
> 
> 
> ----- On May 31, 2018, at 7:47 AM, Han Han [email protected] wrote:
> 
>> virsh qemu-monitor-command is the answer.
>> You can use it by following:
>> For qmp command:
>> # virsh qemu-monitor-command  $VM_NAME $QMP_COMMAND
>> For hmp commmand:
>> # virsh qemu-monitor-command --hmp $VM_NAME $HMP_COMMAND
>>
>> On Thu, May 31, 2018 at 2:28 AM, Jakob Bohm <[email protected]> wrote:
>>
> 
> Hi,
> 
> that's it.
> 
> Example:
> 
> virsh # qemu-monitor-command --hmp mausdb2 info block
> drive-virtio-disk0 (#block118): /var/lib/libvirt/images/mausdb/mausdb.dd (raw)
>     Cache mode:       writethrough, direct
> 
> drive-ide0-0-0 (#block371): 
> /mnt/idg-2/SysAdmin_AG_Wurst/software_und_treiber/linux/knoppix/KNOPPIX_V8.1-2017-09-05-DE.iso
>  (raw, read-only)
>     Removable device: not locked, tray closed
>     Cache mode:       writeback, direct
> 
> 
> That's most of what i need. But isn't it possible to connect with the 
> qemu-monitor/conscole to the GUI of an already running guest ?
> Without vnc which is an extra layer. Do i need to start the guest with 
> special options ?
> 
> "man qemu-kvm" says:
> For instance you could use this to allow a single stdio chardev to be used by 
> two serial ports and the QEMU monitor:
> 
>                    -chardev stdio,mux=on,id=char0 \
>                    -mon chardev=char0,mode=readline \
>                    -serial chardev:char0 \
>                    -serial chardev:char0
> 
> Isn't that what i need ? How do i connect to char0 ?

So you mean a serial text console, not the graphical console? Assuming
that you're using libvirt here, you could try:

 virsh console guestname

But note that you also need to set the kernel parameter "console=ttyS0"
for this too (e.g. via grub).

 Thomas

Reply via email to