All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: Dimitry Golubovsky <golubovsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Ways to exit from kvm on behalf of the quest system?
Date: Wed, 01 Aug 2007 16:28:02 -0500	[thread overview]
Message-ID: <46B0FAE2.4090906@codemonkey.ws> (raw)
In-Reply-To: <bcba51a0708011135q109b9869qc8c563e6e3aeb004-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Dimitry Golubovsky wrote:
> Anthony,
>
> On 8/1/07, Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org> wrote:
>
>   
>>> feature request: a virtual character device (sort of a virtual serial
>>> line) that the guest OS might use to communicate with the QEMU
>>> monitor. That might solve many problems.
>>>
>>>       
>> Can you provide the use-case you're looking to address with this?  As
>> Dan mentioned, this would be pretty hairy from a security perspective
>> since the guest could do things it's not supposed to be able to do but
>> if you've got something specific in mind, there might be another way to
>> achieve the same results without compromising security.
>>     
>
> I am working on the project named "kvmadm" which is aimed to giving
> users private VMs instead of shell accounts on the host.
>
> This first of all means that VMs run under privileges of users who
> started them (there is a suid wrapper that does the root work).
> Secondly, users are limited in kvm options they are able to supply
> (mainly to name disk image files and kernel file to boot from - by the
> means of the same wrapper). Thirdly, power of users to harm the system
> is same as if they had regular shell accounts on the host that runs
> their VMs.
>   

Why are you using a setuid wrapper instead of just changing ownership of 
/dev/kvm?

> Possible use case for the feature I am proposing:
>
> When guest OS completes shutdown, there should be a clear signal to
> kvm to exit. One possibility is power-off via ACPI which works, but
> there may be problems with acpi (some sources recommend to turn it
> off; personally I personally encountered instability and hangups when
> booting a guest with rtc and acpi enabled together, so I can boot
> either with -no-acpi or with -no-rtc, works fine). Another possibility
> would be sending a monitor command via proposed channel to exit kvm.
>   

The power-off thing is a bug.  I was also thinking that it may be 
possible to detect when most guests have halted.

Regards,

Anthony Liguori

> It may not always be possible to enter such command manually: earlier
> in this thread I described the situation when the guest OS runs a X
> window manager, and it is killed during shutdown, the console window
> may become unaccessible for keyboard input. In the kvmadm wiki, I
> described the way to switch between host's and guest's window
> managers, but kvm process must exit in order for this to work as it is
> not possible to know from outside if the guest OS shut down.
>   

> Thanks.
>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

  parent reply	other threads:[~2007-08-01 21:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 16:56 Ways to exit from kvm on behalf of the quest system? Dimitry Golubovsky
     [not found] ` <bcba51a0707310956q41554dedn6b88f3819c37bb41-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-07-31 19:17   ` Amit Shah
     [not found]     ` <200708010047.36600.amit.shah-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-31 19:43       ` Dimitry Golubovsky
     [not found]         ` <bcba51a0707311243vf78d45bo9fcb61d0b972f37a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-01 16:40           ` Avi Kivity
     [not found]             ` <46B0B779.5050407-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-01 16:48               ` Dimitry Golubovsky
     [not found]                 ` <bcba51a0708010948t106be39dh81fccc10ebf0a676-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-01 16:53                   ` Avi Kivity
2007-08-01 16:57                   ` Daniel P. Berrange
     [not found]                     ` <20070801165750.GH31282-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-08-01 17:06                       ` Dimitry Golubovsky
     [not found]                         ` <bcba51a0708011006q3df19f99k7ae9df230c95487f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-01 17:14                           ` Daniel P. Berrange
2007-08-01 18:11                   ` Anthony Liguori
     [not found]                     ` <46B0CCC3.6010308-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-08-01 18:35                       ` Dimitry Golubovsky
     [not found]                         ` <bcba51a0708011135q109b9869qc8c563e6e3aeb004-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-01 21:28                           ` Anthony Liguori [this message]
     [not found]                             ` <46B0FAE2.4090906-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-08-01 21:43                               ` Dimitry Golubovsky
     [not found]                                 ` <bcba51a0708011443o1d48779en94c724dc4fd0625-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-01 21:48                                   ` Anthony Liguori
2007-08-01 21:57                                   ` Anthony Liguori

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=46B0FAE2.4090906@codemonkey.ws \
    --to=anthony-rdkfgonbjusknkdkm+me6a@public.gmane.org \
    --cc=golubovsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.