每次敲一堆命令,时间长了就想自动化了。
下面的delete_vm.sh脚本需要root权限下运行。
- #!/bin/bash
- source ../common/tool.sh
- virsh destroy $1 virsh undefine $1
- RemoveFolder "/var/lib/libvirt/images/$1/"
- RemoveFile "/etc/libvirt/qemu/$1"
每次敲一堆命令,时间长了就想自动化了。
下面的delete_vm.sh脚本需要root权限下运行。
此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/64948.html