[libvirt-users] How to run a cmd inside lxc through libvirt API?
张章
zhang_zhang at live.com
Fri Feb 22 14:02:34 UTC 2013
Thanks for the reply.
Does libvirt have corresponding API for this?
regardszhangzhang
> Date: Fri, 22 Feb 2013 09:53:49 +0000
> From: berrange at redhat.com
> To: zhang_zhang at live.com
> CC: libvirt-users at redhat.com
> Subject: Re: [libvirt-users] How to run a cmd inside lxc through libvirt API?
>
> On Fri, Feb 22, 2013 at 09:27:05AM +0000, 张章 wrote:
> >
> > Hi
> >
> > As far as I know, I can not run a cmd inside lxc through
> > shell after "virsh -c lxc:/// console". How could I run
> > a cmd though libvirt API instead of shell like the userspace
> > tool lxc_start(name, cmd, conf)?
>
> Latest libvirt has a new command for running stuff inside a container
>
> virsh -c lxc:/// lxc-enter-namespace mycontainername -- /bin/ps -auxf
>
> This requires a fairly new kernel(3.7 or even 3.8 kernel is preferred)
> since it needs all 6 namespaces present in /proc/self/ns to work properly.
>
> Regards,
> Daniel
> --
> |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org -o- http://virt-manager.org :|
> |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130222/02dc2afc/attachment.htm>
More information about the libvirt-users
mailing list