workstation virtual machine centos7 install kvm

Embedded linux kernel
virtual machine is a process
SPICE is redhat development of open source desktop virtualization specialized data transmission protocol
QEMU is a graphical tool can manage KVM virtual machines, designed to manage KVM, it is usually with KVM Simultaneously.

centos7KVM adds the following features:
the CPU Hot Add
Memory Hot-Add

1, centos7.x System Requirements

4G memory than
processors need to turn on virtualization capabilities
add Independent Disks for KVM virtual machine

workstation virtual machine centos7 install kvm

2, format independent disks

fdisk -l
Check the name of the hard disk 40g

workstation virtual machine centos7 install kvm

mkfs -t xfs /dev/sdb
Format the hard disk
workstation virtual machine centos7 install kvm

Create a directory to mount the hard drive
workstation virtual machine centos7 install kvm

3, installation of KVM related environmental package

yum install qemu-kvm qemu-kvm-tools virt-manager libvirt virt-install -y

4. Create a virtual machine domain space

qemu-img create -f raw /vdir/c7-1.img 10G
workstation virtual machine centos7 install kvm

5, the system will need to install into the local image, for use during the installation

workstation virtual machine centos7 install kvm

systemctl start libvirtd
systemctl status libvirtd

6. Perform virtual machine installation

vim kvm.sh
virt-install --name c7-1  --virt-type kvm  --memory=2048  --location=/opt/CentOS-7.6-x86_64-DVD-1810.iso  --disk path=/vdir/c7-1.img  --network network=default  --graphics vnc,listen=0.0.0.0  --noautoconsole
chmod +x kvm.sh

workstation virtual machine centos7 install kvm

7. vnc connection see installation interface ip virtual machine, the installation is complete as

workstation virtual machine centos7 install kvm

workstation virtual machine centos7 install kvm

8, view, and switch operating
virsh shutdown c7-1 // shut down the virtual machine
virsh start c7-1 // start the virtual machine
virsh list --all // view the virtual machine state
to delete the virtual machine
virsh shutdown c7-1 // turn off
virsh undefine c7-1 // delete

Guess you like

Origin blog.51cto.com/13670314/2415855