root@softwareluke-Lenovo:/home/softwareluke# virt-manager
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke# ssh 192.168.13.1
The authenticity of host '192.168.13.1 (192.168.13.1)' can't be established.
ECDSA key fingerprint is SHA256:edOWmHaLhOACq01ZlVyAR0hlgOyEpJ9zx0O1gJbDUv4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.13.1' (ECDSA) to the list of known hosts.
root@192.168.13.1's password:
Last failed login: Tue Apr 25 12:08:55 CST 2017
There was 1 failed login attempt since the last successful login.
Last login: Tue Apr 25 11:02:21 2017 from 192.42.0.40
[root@kvm1 ~]# virsh list
Id 名称 状态
8 192-168-13-62 running
19 192-168-13-104 running
32 192-168-13-63 running
38 192-168-13-130 running
40 dell-manager running
45 192-168-13-60 running
66 192-168-13-102 running
77 test running
[root@kvm1 ~]# bash ^C
[root@kvm1 ~]# ping 192.168.13.65
PING 192.168.13.65 (192.168.13.65) 56(84) bytes of data.
^C
--- 192.168.13.65 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
[root@kvm1 ~]# bash /s^C
[root@kvm1 ~]# ls /
1 core.18809 etc lib mnt root server tmp
bin core.76958 glusterfs lib64 opt run srv usr
boot dev home media proc sbin sys var
[root@kvm1 ~]# bash /opt/
DELL_MDSS_Consolidated_RDVD_4_1_0_88/ kvm/
iso/ rh/
[root@kvm1 ~]# bash /opt/
DELL_MDSS_Consolidated_RDVD_4_1_0_88/ kvm/
iso/ rh/
[root@kvm1 ~]# bash /opt/^C
[root@kvm1 ~]# bash /server/scripts/kvm/
192-168-13-102-eth0 192-168-13-60-eth0 create_kvm.sh
192-168-13-104-eth0 192-168-13-62-eth0 ifcfg-eth0
192-168-13-130-eth0 192-168-13-63-eth0 kvm_resources.sh
[root@kvm1 ~]# bash /server/scripts/kvm/create_kvm.sh
1、安装依赖包
libguestfs-tools已安装
virt-install已安装
1、配置VM信息
输入IP地址:192.168.13.65
输入子网掩码:255.255.255.0
输入网关:192.168.13.254
输入DNS:114.114.114.114
VM内存[MB]:4096
VM CPU数量:4
VM 卷大小[GB]:100
- CentOS6.5
- CentOS7.0
- CentOS7.1
? 2
qemu-img: /opt/kvm/192-168-13-65-volume1.img: Image creation needs a size parameter
域 192-168-13-65 被删除
域 192-168-13-65 已开始
[root@kvm1 ~]# virsh list
Id 名称 状态
8 192-168-13-62 running
19 192-168-13-104 running
32 192-168-13-63 running
38 192-168-13-130 running
40 dell-manager running
45 192-168-13-60 running
66 192-168-13-102 running
77 test running
80 192-168-13-65 running
[root@kvm1 ~]# ping 192.168.13.65
PING 192.168.13.65 (192.168.13.65) 56(84) bytes of data.
From 192.168.13.1 icmp_seq=1 Destination Host Unreachable
From 192.168.13.1 icmp_seq=2 Destination Host Unreachable
From 192.168.13.1 icmp_seq=3 Destination Host Unreachable
From 192.168.13.1 icmp_seq=4 Destination Host Unreachable
64 bytes from 192.168.13.65: icmp_seq=5 ttl=64 time=0.540 ms
64 bytes from 192.168.13.65: icmp_seq=6 ttl=64 time=0.298 ms
64 bytes from 192.168.13.65: icmp_seq=7 ttl=64 time=0.328 ms
64 bytes from 192.168.13.65: icmp_seq=8 ttl=64 time=0.445 ms
64 bytes from 192.168.13.65: icmp_seq=9 ttl=64 time=0.394 ms
64 bytes from 192.168.13.65: icmp_seq=10 ttl=64 time=0.416 ms
64 bytes from 192.168.13.65: icmp_seq=11 ttl=64 time=0.403 ms
^C
--- 192.168.13.65 ping statistics ---
11 packets transmitted, 7 received, +4 errors, 36% packet loss, time 10002ms
rtt min/avg/max/mdev = 0.298/0.403/0.540/0.075 ms, pipe 4
[root@kvm1 ~]# ssh 192.168.13.65
The authenticity of host '192.168.13.65 (192.168.13.65)' can't be established.
ECDSA key fingerprint is c5:f8:2c:ca:68:4c:a8:0f:52:2d:4a:6c:b8:b0:4e:18.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.13.65' (ECDSA) to the list of known hosts.
root@192.168.13.65's password:
Last login: Tue Mar 21 12:26:12 2017 from 192.42.0.40
[root@localhost ~]# ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 52:54:00:54:aa:ff brd ff:ff:ff:ff:ff:ff
inet 192.168.13.65/24 brd 192.168.13.255 scope global eth0
valid_lft forever preferred_lft forever
[root@localhost ~]# exit
登出
Connection to 192.168.13.65 closed.
[root@kvm1 ~]# virsh list
Id 名称 状态
8 192-168-13-62 running
19 192-168-13-104 running
32 192-168-13-63 running
38 192-168-13-130 running
40 dell-manager running
45 192-168-13-60 running
66 192-168-13-102 running
77 test running
80 192-168-13-65 running
[root@kvm1 ~]# exit
登出
Connection to 192.168.13.1 closed.
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke# ssh 192.168.13.1
root@192.168.13.1's password:
Last login: Wed Apr 26 11:22:34 2017 from 192.168.12.99
[root@kvm1 ~]# qemu-img info /opt/
DELL_MDSS_Consolidated_RDVD_4_1_0_88/ kvm/
iso/ rh/
[root@kvm1 ~]# qemu-img info /opt/kvm/192-168-13-65
192-168-13-65.img 192-168-13-65-volume1.img
[root@kvm1 ~]# qemu-img info /opt/kvm/192-168-13-65.img
image: /opt/kvm/192-168-13-65.img
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 3.8G
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
[root@kvm1 ~]# raw^C
[root@kvm1 ~]# du -sh /opt/kvm/*
2.1G /opt/kvm/192-168-13-102.img
30M /opt/kvm/192-168-13-102-volume1.img
3.0G /opt/kvm/192-168-13-104.img
36M /opt/kvm/192-168-13-104-volume1.img
5.9G /opt/kvm/192-168-13-130.img
85G /opt/kvm/192-168-13-130-volume1.img
16G /opt/kvm/192-168-13-60.img
26G /opt/kvm/192-168-13-60-volume1.img
5.1G /opt/kvm/192-168-13-62.img
24M /opt/kvm/192-168-13-62-volume1.img
2.1G /opt/kvm/192-168-13-63.img
14M /opt/kvm/192-168-13-63-volume1.img
3.9G /opt/kvm/192-168-13-65.img
23M /opt/kvm/192-168-13-65-volume1.img
2.6G /opt/kvm/2003.img
324K /opt/kvm/2003-volume1.img
8.4G /opt/kvm/dell-manager.img
5.8G /opt/kvm/iso
[root@kvm1 ~]# exit
登出
Connection to 192.168.13.1 closed.
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke#
root@softwareluke-Lenovo:/home/softwareluke# exit
exit