1. Installation
Graphical installation
command bar input Virt-manager into the virtual machine management interface
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9C/E5/wKiom1l3VDmQA_1IAACkO_tBMnM784.png "title=" Screenshot from 2017-07-25 22-22-24.png "alt=" Wkiom1l3vdmqa_1iaacko_tbmnm784.png "/>
Click Add
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9C/E5/wKioL1l3VHLzg-b1AAFV98oHyxI386.png "title=" Screenshot from 2017-07-25 22-23-05.png "alt=" Wkiol1l3vhlzg-b1aafv98ohyxi386.png "/>
Select Source Path via
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9C/E5/wKiom1l3VPWiZ6T_AAGRF7AxVJc441.png "title=" Screenshot from 2017-07-25 22-23-52.png "alt=" Wkiom1l3vpwiz6t_aagrf7axvjc441.png "/>
Select 1GB memory, single core CPU,9GB HDD
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9C/E5/wKiom1l3VTfwmNUrAAGQJ83uLfE952.png "title=" Screenshot from 2017-07-25 22-24-44.png "alt=" Wkiom1l3vtfwmnuraagqj83ulfe952.png "/>
Set the name to complete the hardware configuration of the virtual machine
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9C/E5/wKioL1l3VZ-Q0HGYAAFyQShFEyM398.png "title=" Screenshot from 2017-07-25 22-27-27.png "alt=" Wkiol1l3vz-q0hgyaafyqshfeym398.png "/>
Access to redhat7.2 Installation interface
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/9C/E5/wKioL1l3VknhrF9iAANBDKvdNU8258.png "title=" Screenshot from 2017-07-25 22-29-16.png "alt=" Wkiol1l3vknhrf9iaanbdkvdnu8258.png "/>
Set the time
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9C/E6/wKiom1l3XG-yW7tCAAS1IZbq6PE690.png "title=" Screenshot from 2017-07-25 22-29-26.png "alt=" Wkiom1l3xg-yw7tcaas1izbq6pe690.png "/>
Setting up preinstalled Software
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9C/E6/wKioL1l3XKfz8xMcAAQgNYhn9uw068.png "title=" Screenshot from 2017-07-25 22-29-38.png "alt=" Wkiol1l3xkfz8xmcaaqgnyhn9uw068.png "/>
Custom partition hard Drives
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9C/E6/wKioL1l3XRuRZPHWAAGL1vAJEqU014.png "title=" Screenshot from 2017-07-25 22-30-10-1.png "alt=" Wkiol1l3xrurzphwaagl1vajequ014.png "/>
Once setup is complete, complete the root password setting and start installing redhat7.2.
Set up virtual machine scripts
#!/bin/bash Command run environment specified
Virt-install \ Installing virtual machines
--name \ Virtual machine name specifies that the first string of characters after the script
--ram \ memory
--file/var/lib/libvirt/images/$1.img \ qcow2 HDD Files
--file-size 8 \ Hard disk File size
--cdrom/home/kiosk/desktop/rhel-server-7.2-x86_64- Dvd.iso & Installation Source Specifies
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9C/E6/wKiom1l3Xf-hKbD-AABm2tiKTo8128.png "title=" Screenshot from 2017-07-25 15-03-53.png "alt=" Wkiom1l3xf-hkbd-aabm2tikto8128.png "/>
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9C/E6/wKioL1l3XpORSqBSAABE_mItogs232.png "title=" Screenshot from 2017-07-25 15-06-44.png "alt=" Wkiol1l3xporsqbsaabe_mitogs232.png "/>
2. Management
Virt-manager Opening the Graphics management tool
Virt-viewer vmname display virtual machine, Vmname represents the virtual machine name
Virsh List List of running VMS
Virsh list--all List all VMS
Virsh start Vmname Run the specified VM
Virsh shutdown vmname Normal shutdown of the specified VM
Virsh destroy Vmname forcibly ends the specified VM
Virsh Create vmname.xml Temporary restore specifies vm,vmname represents the front end management file
Virsh define Vmname.xml permanently recover VMS
Virsh undefine Vmname Delete the front-end management of the VM and does not delete the storage
3. Virtual Machine Snapshots
Qemu-img create-f qcow2-b Vm2.qcow2 node1.qcow2
!/bin/bash
Virsh Destroy $ &>/dev/null
Virsh undefine $ &>/dev/null
Qemu-img create-f qcow2-b/var/lib/libvirt/images/$1.qcow2/var/lib/libvirt/images/$2.qcow2 &>/dev/null
Virt-install \
--name
--ram 1000 \
--DISK/VAR/LIB/LIBVIRT/IMAGES/$2.QCOW2 \
--import &>/dev/null &
Linux system virtual machine management and redhat7.2 installation