Re: [libvirt] [PATCH 3/3] Add support for shutdown / reboot APIs in LXC driver

2012-11-30 Thread Daniel P. Berrange
On Thu, Nov 29, 2012 at 01:39:34PM -0500, Eric Blake wrote: Add support for doing controlled shutdown / reboot in the LXC driver. The default behaviour is to try talking to /dev/initctl inside the container's virtual root (/proc/$INITPID/root). This works with sysvinit or systemd. If that

Re: [libvirt] [PATCH 3/3] Add support for shutdown / reboot APIs in LXC driver

2012-11-30 Thread Eric Blake
Or is your intent to allow the user to specify multiple flags rather than enforcing mutual exclusion between the flags? And if so, you need to fix libvirt.c to drop the mutual exclusion, as well as to document that when multiple flags are specified, it is up to the hypervisor which

Re: [libvirt] [PATCH 3/3] Add support for shutdown / reboot APIs in LXC driver

2012-11-29 Thread Eric Blake
Add support for doing controlled shutdown / reboot in the LXC driver. The default behaviour is to try talking to /dev/initctl inside the container's virtual root (/proc/$INITPID/root). This works with sysvinit or systemd. If that file does not exist then send SIGTERM (for shutdown) or SIGHUP

[libvirt] [PATCH 3/3] Add support for shutdown / reboot APIs in LXC driver

2012-11-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add support for doing controlled shutdown / reboot in the LXC driver. The default behaviour is to try talking to /dev/initctl inside the container's virtual root (/proc/$INITPID/root). This works with sysvinit or systemd. If that file does not exist

Re: [libvirt] [PATCH 3/3] Add support for shutdown / reboot APIs in LXC driver

2012-11-28 Thread Hu Tao
... +static int +lxcDomainReboot(virDomainPtr dom, +unsigned int flags) +{ +virLXCDriverPtr driver = dom-conn-privateData; +virLXCDomainObjPrivatePtr priv; +virDomainObjPtr vm; +char *vroot = NULL; +int ret = -1; +int rc; + +