9.4.安装虚拟机
# /usr/libexec/qemu-kvm -m 512 -smp 1 \
-drive file=/home/kvm/image/cent7_1.qcow2 \
-net nic,vlan=2,model=e1000,macaddr=52:54:00:12:34:56 \
-net tap,vlan=2,ifname=tap10,script=no -boot d \
-cdrom /root/CentOS-7-x86_64-DVD-1611.iso -vnc 192.168.1.3:1 --daemonize
查看进程:
# ps aux | grep kvm
root 605 0.0 0.0 0 0 ? S< 10:26 0:00 [kvm-irqfd-clean]
root 5168 2.8 1.8 941392 34832 ? Sl 11:03 0:00 /usr/libexec/qemu-kvm -m 512 -smp 1 -drive file=/home/kvm/image/cent7_1.qcow2 -net nic,vlan=2,model=e1000,macaddr=52:54:00:12:34:56 -net tap,vlan=2,ifname=tap10,script=no -boot d -cdrom /root/CentOS-7-x86_64-DVD-1611.iso -vnc 192.168.1.3:1 --daemonize
root 5173 0.0 0.0 0 0 ? S 11:03 0:00 [kvm-pit/5168]
root 5234 0.0 0.0 112652 944 pts/1 S+ 11:04 0:00 grep --color=auto kvm
9.5.安装过程
9.6.安装完毕后结束掉kvm进程
# kill -15 5168
9.7.重新启动,启动Guest虚拟机,修改启动方式为硬盘 -boot c ,去除光盘资源
# /usr/libexec/qemu-kvm -m 512 -smp 1 \
-drive file=/home/kvm/image/cent7_1.qcow2 \
-net nic,vlan=2,model=e1000,macaddr=52:54:00:12:34:56 \
-net tap,vlan=2,ifname=tap10,script=no -boot c \
-vnc 192.168.1.3:1 --daemonize
10.安装完成