[root@wyf ~]# virsh list --all
Id Name State
----------------------------------------------------
1 centos2 running
- centos7 shut off
- web01 shut off
- web02 shut off
[root@wyf ~]# virsh start centos7
Domain centos7 started
[root@wyf ~]# virsh autostart centos7
Domain centos7 marked as autostarted
10. 虚拟机管理命令
查看当前所有虚拟机
virsh list --all
开机
[root@wyf ~]# virsh start web01
Domain web01 started
关机
[root@wyf ~]# virsh shutdown web01
Domain web01 is being shutdown
[root@wyf ~]# virsh list --all
Id Name State
----------------------------------------------------
1 centos2 running
- centos7 shut off
- web01 shut off
- web02 shut off
[root@wyf ~]# virsh dumpxml >centos3.xml
error: command 'dumpxml' requires option
[root@wyf ~]# virsh dumpxml centos7 >centos3.xml
[root@wyf ~]# ll
total 20
-rw-r--r-- 1 root root 5148 May 20 18:18 1.xml
-rw-------. 1 root root 1448 Aug 9 2018 anaconda-ks.cfg
-rw-r--r-- 1 root root 3851 May 20 23:49 centos3.xml
-rw-r--r-- 1 root root 3851 May 20 23:46 centos7.xml
[root@wyf ~]# virsh undefine centos7
Domain centos7 has been undefined
[root@wyf ~]# virsh list --all
Id Name State
----------------------------------------------------
1 centos2 running
- web01 shut off
- web02 shut off
导入一个虚拟机
[root@wyf ~]# virsh edit centos7
error: failed to get domain 'centos7'
error: Domain not found: no domain with matching name 'centos7'
[root@wyf ~]# virsh define centos3.xml
Domain centos7 defined from centos3.xml
[root@wyf ~]# virsh list --all
Id Name State
----------------------------------------------------
1 centos2 running
- centos7 shut off
- web01 shut off
- web02 shut off
修改虚拟机的磁盘目录(扩容)
[root@wyf ~]# virsh list --all
Id Name State
----------------------------------------------------
1 centos2 running
- centos7 shut off
- web01 shut off
- web02 shut off
[root@wyf data]# cd /opt/
[root@wyf opt]# ll
total 5677200
-rw------- 1 root root 10737418240 May 20 14:02 centos2.raw
-rw------- 1 root root 10737418240 May 20 23:43 centos3.raw
-rw-r--r-- 1 root root 3851 May 20 23:49 centos3.xml
-rw-r--r-- 1 qemu qemu 4470079488 May 20 13:05 CentOS-7.5-x86_64-DVD-1804.iso
-rw-r--r-- 1 root root 197120 May 20 15:17 oldboy.qcow2
[root@wyf opt]# mv centos3.raw /data/
[root@wyf opt]# virsh list --all
Id Name State
----------------------------------------------------
1 centos2 running
- centos7 shut off
- web01 shut off
- web02 shut off
[root@wyf opt]# virsh start centos7
error: Failed to start domain centos7
error: Cannot access storage file '/opt/centos3.raw': No such file or directory
[root@wyf opt]# virsh edit centos7
修改磁盘的路径
保存退出
启动虚拟机
[root@wyf opt]# virsh edit centos7
Domain centos7 XML configuration edited.
[root@wyf opt]# virsh start centos7
Domain centos7 started
重命名虚拟机
[root@wyf opt]# virsh list --all
Id Name State
----------------------------------------------------
1 centos2 running
5 centos7 running
- web01 shut off
- web02 shut off
[root@wyf opt]# virsh domrename centos7 centos3
error: Requested operation is not valid: cannot rename active domain
[root@wyf opt]# virsh shutdown centos7
Domain centos7 is being shutdown
[root@wyf opt]# virsh domrename centos7 centos3
Domain successfully renamed
--分组取最大最小常用sql--测试环境if OBJECT_ID('tb') is not null drop table tb;gocreate table tb( col1 int, col2 int, Fcount int)insert into tbselect 11,20,1 union allselect 11,22,1 union allselect 1
一、函数的使用
1.1、定义函数变量
var vName = funcation(params){
}
1.2、函数的调用
函数变量的调用: vName(params);
函数定义时自发调用:(function(params){})(params);
1.3、函数中变量赋值
var a = 'a';
var ff
Mac mini 型号: MC270CH-A RMB:5,688
Apple 对windows的产品支持不好,有以下问题:
1.装完了xp,发现机身很热虽然没有运行任何程序!貌似显卡跑游戏发热一样,按照那样的发热量,那部机子损耗很大,使用寿命受到严重的影响!
2.反观安装了Mac os的展示机,发热量很小,运行了1天温度也没有那么高
&nbs
Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given ta