KVM virtualization (b)
First, create a virtual machine installed winserver2008
Then continue the previous chapter experiment (closed system prior to installation centos7, the port or 5900)
1) for mounting the mirror mount win2008
[root@kvm-server-01 KVM_data]# mount -t iso9660 /dev/cdrom /mnt/cdrom
2) Create a virtual machine disk file
[root@kvm-server-01 KVM_data]# qemu-img create -f qcow2 winserver_2008.qcow2 20G
Formatting 'winserver_2008.qcow2', fmt=qcow2 size=21474836480 encryption=off cluster_size=65536 lazy_refcounts=off
[root@kvm-server-01 KVM_data]# ll
总用量 5698980
-rw-r--r-- 1 qemu qemu 4521459712 12月 20 13:47 CentOS-7.4-x86_64.iso
-rw-r--r-- 1 root root 1308426240 12月 20 14:05 CentOS-7.4-x86_64.qcow2
drwx------ 2 root root 16384 12月 20 13:38 lost+found
-rw-r--r-- 1 root root 197120 12月 20 14:30 winserver_2008.qcow2
3) The image file is made ISO
[root@kvm-server-01 KVM_data]# dd if=/dev/cdrom of=/home/KVM_data/winserver_2008.iso
记录了5632552+0 的读入
记录了5632552+0 的写出
2883866624字节(2.9 GB)已复制,142.592 秒,20.2 MB/秒
[root@kvm-server-01 KVM_data]# ll
总用量 8518012
-rw-r--r-- 1 qemu qemu 4521459712 12月 20 13:47 CentOS-7.4-x86_64.iso
-rw-r--r-- 1 root root 1308426240 12月 20 14:05 CentOS-7.4-x86_64.qcow2
drwx------ 2 root root 16384 12月 20 13:38 lost+found
-rw-r--r-- 1 root root 2883866624 12月 20 14:33 winserver_2008.iso
-rw-r--r-- 1 root root 197120 12月 20 14:30 winserver_2008.qcow2
4) Install Virtual Machine
[root@kvm-server-01 KVM_data]# virt-install --name winserver_2008 --virt-type kvm --ram 1024 --cdrom=/home/KVM_data/winserver_2008.iso --disk path=/home/KVM_data/winserver_2008.qcow2 --network network=default --graphics vnc,listen=0.0.0.0 --noautoconsole
5) is connected with the virtual machine vnc
6) After win2008 system file decompression, reboot
7) After rebooting you need to manually start the virtual machine
[root@kvm-server-01 KVM_data]# virsh start winserver_2008
8) After setting the formal entry into the installation, the installation is complete you can use
Second, install a graphical interface KVM Manager
Installation of KVM use graphical interface, graphical interface system with a centos7 experiment
1) Installing the KVM Manager
[root@kvm-server02 ~]# yum -y install qemu-kvm qemu-kvm-tools virt-manager libvirt virt-install openssh-askpass
2) After the mounting system tools can be found in FIG.
3) Create a home directory project KVM_data used to store the virtual machine files
[root@kvm-server02 ~]# mkdir /home/KVM_data
4) a mirror mount, and made into an ISO file for the virtual machine system is mounted
[root@kvm-server02 ~]# mkdir /mnt/cdrom
[root@kvm-server-01 KVM_data]# mount -t iso9660 /dev/cdrom /mnt/cdrom
[root@kvm-server02 cdrom]# dd if=/dev/cdrom of=/home/KVM_data/CentOS-7.4-x86_64.iso
5) Then you can start creating virtual machines
a) Open kvm management software
b) Choose New Virtual Machine Options
c) create a storage pool, and set the directory
d) create a storage volume
e) mounting the ISO file as source
f) setting the number of CPU and memory
g) set the disk size
h) modify the hostname
i) a custom configuration
j) to start creating virtual machines
After k) the installation is complete, KVM management interface
l) virtual machine installed
Content a bit more, continue to the next chapter~