From: "Alberto Treviño" <alberto@byu.edu>
To: KVM List <kvm@vger.kernel.org>
Subject: Re: howto control VM from outside (shutdown...)
Date: Tue, 20 Jan 2009 08:55:28 -0700 [thread overview]
Message-ID: <200901200855.28307.alberto@byu.edu> (raw)
In-Reply-To: <4974F334.7010200@mair-family.org>
On Monday 19 January 2009 02:40:04 pm David Mair wrote:
> Take a look at the qemu -monitor option. You can use it to re-direct the
> monitor console to a large number of character devices, including
> sockets. The settings are the same as for the -serial option. I've used
> it to access the monitor console from a telnet client.
I use the the telnet option:
-monitor telnet::[port],server,nowait
For interactive control I use telnet:
$ telnet localhost [port]
and I can connect to it to run any commands I want. Just be aware that you
should exit with Ctrl-C or by making sure you are at the telnet prompt when
you issue quit. If you issue quit to the VM, the entire VM will shutdown
very, very quickly and ungracefully.
To send commands through a script, I use netcat:
echo "system_powerdown" | netcat -T -c localhost [port]
I also have a PHP script that opens a socket connection to the telnet port,
sends the command, and parses the output for errors. I'll be happy to share
it. Let me know if you want it.
next prev parent reply other threads:[~2009-01-20 16:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 20:23 howto control VM from outside (shutdown...) Paolo Pedaletti
2009-01-19 21:40 ` David Mair
2009-01-20 13:10 ` paolo pedaletti
2009-01-20 15:55 ` Alberto Treviño [this message]
2009-01-20 22:16 ` Paolo Pedaletti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200901200855.28307.alberto@byu.edu \
--to=alberto@byu.edu \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox