一条命令停止所有lxc容器,删除所有lxc容器

时间:2017-10-24 12:57:34   收藏:0   阅读:576
for i in $(virsh -c lxc:/// list | grep -v ‘Id‘ | awk ‘{print $2}‘);do virsh -c lxc:/// destroy ${i};done

 

for i in $(virsh -c lxc:/// list --all | grep -v ‘Id‘ | awk ‘{print $2}‘);do virsh -c lxc:/// undefine ${i};done

 

原文:http://www.cnblogs.com/nihaorz/p/7722911.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!