KVM 虚拟机删除

字体大小: 中小 标准 ->行高大小: 标准

每次敲一堆命令,时间长了就想自动化了。

下面的delete_vm.sh脚本需要root权限下运行。

  1. #!/bin/bash
  2. source ../common/tool.sh
  3. virsh destroy $1 virsh undefine $1
  4. RemoveFolder "/var/lib/libvirt/images/$1/"
  5. RemoveFile "/etc/libvirt/qemu/$1"

每次敲一堆命令,时间长了就想自动化了。

下面的delete_vm.sh脚本需要root权限下运行。

 

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/64948.html