Re: How to run a cmd inside lxc through libvirt API?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 :|

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux