Skip to contentSkip to conversation

Monitor

Qemu-devel Michael Fisher 3 participants 3 messages Jul 15, 2006 – Jul 16, 2006

lore
Share & tools
lore
#0 lore raw

1. Can the commands (i.e. sendkeys, savevm, loadvm) be initiated from within the guest OS? If so, can you give me an example?

2. When executing 'savevm' can it be saved to a virtual disk?

Thanks,

desNotes

#1 lore raw
Quoted 2 lines · Michael Fisher

1. Can the commands (i.e. sendkeys, savevm, loadvm) be initiated from within the guest OS? If so, can you give me an example?

No.

Quoted 1 line

2. When executing 'savevm' can it be saved to a virtual disk?

No.

Regards,

Anthony Liguori

Quoted 3 lines

Thanks,

desNotes

#2 lore raw
In reply to Michael Fisher
Quoted 2 lines · Michael Fisher

1. Can the commands (i.e. sendkeys, savevm, loadvm) be initiated from within the guest OS? If so, can you give me an example?

Of course, by its nature, not. A good emulator cannot allow that.
However, - if you configure your system well - it is possibile with external programs:
Launch qemu with network support, use a named pipe as monitor, and do something on the host to grant guest some access (launch sshd for instance and install ssh client on guest) mknod monitor.pipe p <-- this line creates a new named pipe, called "monitor.pipe"
qemu -hda disc.img -monitor pipe:monitor.pipe -net nic -net user <-- use monitor.pipe as monitor.. note that you cannot reach original monitor (alt-ctr-2) this way

connect to host from inside, and use "echo 'command' > monitor.pipe"

It sounds quite useless.. but it isn't if you use a GNU netcat (nc) server on host, which listens on a tcp/ip port.. That way, a simple telnet program could be used as a terminal from inside (I mean from guest)

nc -T -l -t -p 8898 >monitor.pipe

(There might be some patches around that make possibile to use a tcp/ip server as a monitor/serial/parallel device..)

Quoted 2 lines

2. When executing 'savevm' can it be saved to a virtual disk?

By default, not.
With the same trick, you can ask the host to make some VM saves, and then fetch it through scp/ftp/samba/whatever you want

Quoted 5 lines

Thanks,

desNotes

Best regards,

Nyos