[root@kvm-server ~]# virsh shutdown CentOS-7.2-x86_64 #必须要关机才能进行克隆
Domain CentOS-7.2-x86_64 is being shutdown
[root@kvm-server ~]# virsh list --all
Id Name State
----------------------------------------------------
- CentOS-7.2-x86_64 shut off
- vm-node1 shut off
[root@kvm-server ~]# virt-clone -o CentOS-7.2-x86_64 -n vm-node2 -f /opt/vm-node2.raw #参数含义:-o被克隆虚拟机的名字、-n克隆后虚拟机的名字、-f指定磁盘存储位置
WARNING The requested volume capacity will exceed the available pool space when the volume is fully allocated. (40960 M requested capacity > 36403 M available)
Allocating 'vm-node2.raw' | 40 GB 00:01:03
Clone 'vm-node2' created successfully.
[root@kvm-server ~]# virsh list --all #克隆后为关机状态
Id Name State
----------------------------------------------------
- CentOS-7.2-x86_64 shut off
- vm-node1 shut off
- vm-node2 shut off
修改虚拟机的名字
[root@kvm-server ~]# virsh shutdown CentOS-7.2-x86_64 #需要先关机,然后对虚拟机进行改名
[root@kvm-server ~]# cp /etc/libvirt/qemu/vm-node2.xml /etc/libvirt/qemu/vm-test.xml #拷贝xml文件为要修改的名称,如:vm-test
[root@kvm-server ~]# grep'' /etc/libvirt/qemu/vm-test.xml #修改vm-test.xml中的name字段为vm-test
vm-test
[root@kvm-server ~]# virsh undefine vm-node2 #删除之前的虚拟机
Domain vm-node2 has been undefined
[root@kvm-server ~]# virsh define /etc/libvirt/qemu/vm-test.xml #定义新的虚拟机
Domain vm-test defined from /etc/libvirt/qemu/vm-test.xml
[root@kvm-server ~]# virsh list --all #已完成改名操作
Id Name State
----------------------------------------------------
- CentOS-7.2-x86_64 shut off
- vm-node1 shut off
- vm-test shut off
// 多态, 在JAVA中是这样用的, 其实在PHP当中可以自然消除, 因为参数是动态的, 你传什么过来都可以, 不限制类型, 直接调用类的方法
abstract class Tiger {
public abstract function climb();
}
class XTiger extends Tiger {
public function climb()
jQuery.extend({
handleError: function( s, xhr, status, e ) {
// If a local callback was specified, fire it
if ( s.error ) {
s.error.call( s.context || s, xhr, status, e );
}
always 总是
rice 水稻,米饭
before 在...之前
live 生活,居住
usual 通常的
early 早的
begin 开始
month 月份
year 年
last 最后的
east 东方的
high 高的
far 远的
window 窗户
world 世界
than 比...更
最近使用mybatis.3.1.0时无意中碰到一个问题:
The errors below were detected when validating the file "mybatis-3-mapper.dtd" via the file "account-mapper.xml". In most cases these errors can be d