标签:nim term vnc cli x86_64 centos gnome lib mono
安装wget和vim
yum install -y wget vim
修改yum源为阿里源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sed -i ‘s/$releasever/7/g‘ /etc/yum.repos.d/CentOS-Base.repo
安装基本包
yum install epel-release net-tools vim unzip zip wget ftp -y
安装开发环境
yum groupinstall "DevelopmentTools"
安装虚拟环境包
yum groupinstall "Virtualization" "Virtualization Client""Virtualization Platform"
安装桌面(可选)
yum -y groupinstall Desktop
yum -y groupinstall "X Window System"
安装GNOME桌面环境
yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts
创建硬盘
[root@vm1 images]# qemu-img create -f qcow2 /var/lib/libvirt/images/kvm01.img 20G
安装kvm
[root@vm1 images]# virt-install --name=kvm01 --ram 6144 --vcpus=2 --disk path=/var/lib/libvirt/images/kvm01.img,format=qcow2,size=20 --network bridge=br0 --os-type=linux --cdrom /var/lib/libvirt/images/CentOS-7-x86_64-Minimal-1611.iso --vnc --vnclisten=0.0.0.0 --vncport=5910
修改kvm.xml
<graphics type=‘vnc‘ port=‘5900‘ autoport=‘no‘ listen=‘0.0.0.0‘>
<listen type=‘address‘ address=‘0.0.0.0‘/>
</graphics>
创建快照
[root@vm1 images]# virsh snapshot-create kvm01
查看快照
[root@vm1 images]# virsh snapshot-list kvm01
Name Creation Time State
------------------------------------------------------------
1502871731 2017-08-16 16:22:11 +0800 shutoff
恢复快照
[root@vm1 images]# virsh domstate kvm01
标签:nim term vnc cli x86_64 centos gnome lib mono
原文地址:http://www.cnblogs.com/hailun1987/p/7395629.html