[Libvir] [PATCH]Guard for Dom0 by virsh domain stop commands

Daniel Veillard veillard at redhat.com
Thu Feb 22 06:53:39 UTC 2007


On Thu, Feb 22, 2007 at 10:55:45AM +0900, Kazuki Mizushima wrote:
> Hi,
> 
> I think Domain0 should NOT stop by virsh domain stop commands.
> (like shutdown, reboot, destroy).
> But virsh shudown and reboot commands are still available for Dom0.
> This patch intends to disable these two commands for Dom0.
> 
> Internal processing of these two commands is following
> 1)Send shutdown or reboot to Xend (Guard of xend)
> 2)If 1) is failed, shutdown/reboot is executed by xenstore. (Not Guard)
> 
> This patch removes 2) ,that is as same as destroy processing.

[...]

> @@ -54,8 +54,8 @@ static virDriver xenStoreDriver = {
>     xenStoreDomainLookupByName, /* domainLookupByName */
>     NULL, /* domainSuspend */
>     NULL, /* domainResume */
> -    xenStoreDomainShutdown, /* domainShutdown */
> -    xenStoreDomainReboot, /* domainReboot */
> +    NULL, /* domainShutdown */
> +    NULL, /* domainReboot */
>     NULL, /* domainDestroy */

  The problem with that patch it that is also remove the possibility of
falling back to the XenStore methode for other domains than Dommain0 . 
So IMHO that's too radical, could you rather make a patch which add the check
in xenStoreDomainShutdown and xenStoreDomainReboot for domain 0 instead ?

  thanks,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the libvir-list mailing list