= KVM (Kernel-based Virtual Machine) = {{{ ## VM Remove virsh undefine test101 virsh undefine test102 --managed-save virsh undefine test103 --remove-all-storage rm -f /opt/kvm/test10[1-3].qcow2 ## VM Clone virt-clone --original template --name test101 --file /opt/kvm/test101.qcow2 virt-clone --original template --name test102 --file /opt/kvm/test102.qcow2 virt-clone --original template --name test103 --file /opt/kvm/test103.qcow2 ################################################################################ ## VM Console & Initialize (CentOS 6) virsh console test101 NNAME=test101 NIP=10.59.72.101 sed -i "/^HOSTNAME/ s/template/$NNAME/" /etc/sysconfig/network sed -i "/^IPADDR/ s/10.59.72.100/$NIP/" /etc/sysconfig/network-scripts/ifcfg-eth0 cat /dev/null >/etc/udev/rules.d/70-persistent-net.rules init 6 ################################################################################ }}}