Installation system
I. Installing a virtual machine
Step-by-step installation shown in
1. Application--System Tools--Virtual system Management
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/89/22/wKioL1gIybeTMEAhAAo7MhbaF60524.png-wh_500x0-wm_3 -wmp_4-s_4259774024.png "title=" 2016-10-20 18_41_44 screenshot. png "style=" Float:none; "alt=" Wkiol1giybetmeahaao7mhbaf60524.png-wh_50 "/>
Click New, give the virtual machine a name, and choose the appropriate installation method according to their own situation
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/89/24/wKiom1gIya3Ais66AADAxGLgNS0705.png-wh_500x0-wm_3 -wmp_4-s_1838138332.png "style=" Float:none; "title=" 2016-10-20 18_19_43 screenshot. png "alt=" Wkiom1giya3ais66aadaxglgns0705.png-wh_50 "/>
Add the path to the system source file
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/89/21/wKioL1gIya2hHG2qAACtozXDBWA676.png-wh_500x0-wm_3 -wmp_4-s_3180709008.png "style=" Float:none; "title=" 2016-10-20 18_20_40 screenshot. png "alt=" Wkiol1giya2hhg2qaactozxdbwa676.png-wh_50 "/>
Uncheck the "Assign entire disk now option"
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/89/24/wKiom1gIya7yvQ0uAACwSKpLHYw385.png-wh_500x0-wm_3 -wmp_4-s_649844340.png "style=" Float:none; "title=" 2016-10-20 18_20_53 screenshot. png "alt=" Wkiom1giya7yvq0uaacwskplhyw385.png-wh_50 "/>
Click Next
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/89/21/wKioL1gIya7yftnQAAD4RmG9aa0797.png-wh_500x0-wm_3 -wmp_4-s_4037021991.png "style=" Float:none; "title=" 2016-10-20 18_21_03 screenshot. png "alt=" Wkiol1giya7yftnqaad4rmg9aa0797.png-wh_50 "/>
Select the installation method, install directly or check the file and install it first
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/89/21/wKioL1gIya7DWTQdAABSwyy8hUM180.png-wh_500x0-wm_3 -wmp_4-s_4078589500.png "style=" Float:none; "title=" 2016-10-20 18_21_33 screenshot. png "alt=" Wkiol1giya7dwtqdaabswyy8hum180.png-wh_50 "/>
Select the language in the installation process,
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/24/wKiom1gIya6z_K6CAAFdYJUwssQ048.png-wh_500x0-wm_3 -wmp_4-s_2097256225.png "style=" Float:none; "title=" 2016-10-20 18_25_08 screenshot. png "alt=" wkiom1giya6z_ K6caafdyjuwssq048.png-wh_50 "/>
Time zone, United Kingdom
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/89/22/wKioL1gIybDzH-TQAAR5CVND2II630.png-wh_500x0-wm_3 -wmp_4-s_2410496314.png "style=" Float:none; "title=" 2016-10-20 18_25_47 screenshot. png "alt=" Wkiol1giybdzh-tqaar5cvnd2ii630.png-wh_50 "/>
Add language, Simplified Chinese
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/24/wKiom1gIybCy2ovVAAEew5D-3gY432.png-wh_500x0-wm_3 -wmp_4-s_1150533159.png "style=" Float:none; "title=" 2016-10-20 18_26_32 screenshot. png "alt=" Wkiom1giybcy2ovvaaeew5d-3gy432.png-wh_50 "/>
Disk
/boot Assignment 200M
Swap allocation 500M
/The rest of the content to the root directory
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/22/wKioL1gIybHSnvB9AAIUHzVBKQU142.png-wh_500x0-wm_3 -wmp_4-s_2989285484.png "style=" Float:none; "title=" 2016-10-20 18_28_04 screenshot. png "alt=" Wkiol1giybhsnvb9aaiuhzvbkqu142.png-wh_50 "/>
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/89/24/wKiom1gIybHi5Ew7AADOxtD0jR8261.png-wh_500x0-wm_3 -wmp_4-s_4207230236.png "style=" Float:none; "title=" 2016-10-20 18_30_58 screenshot. png "alt=" Wkiom1giybhi5ew7aadoxtd0jr8261.png-wh_50 "/>
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/89/24/wKiom1gIybHjXEd_AAFkwMcjsIQ078.png-wh_500x0-wm_3 -wmp_4-s_194469670.png "style=" Float:none; "title=" 2016-10-20 18_31_20 screenshot. png "alt=" wkiom1giybhjxed_ Aafkwmcjsiq078.png-wh_50 "/>
two . Using a script file to implement the Lazy man machine
under root user, do the following:
[Email protected] ~]# virt-install \ #安装虚拟机
--name tx1 \ #给虚拟机取名字
--ram #内存
--file/var/lib/libvirt/images/tx1.img \ #设置安装镜像文件的位置, Absolute path
--file-size 8 \ #存储容量
--cdrom/mnt/rhel-server-7.0-x86_64-dvd.iso & #系统源文件所在的位置. & indicates running in the background
Writing scripts
Vim Vmchuangjian
#!/bin/bash
Virt-install \
--name \
--ram 1000 \
--FILE/VAR/LIB/LIBVIRT/IMAGES/$1.IMG \
--file-size 8 \
--cdrom/mnt/rhel-server-7.0-x86_64-dvd.iso &
the script name is:Vmchuangjian
Add Execute permission:chmod +x Vmchuangjian
execution:sh vmchuangjian vmname
or Copy the Vmchuangjian file to/bin and execute it directly:
Vmchuangjian Vmname
Virtual Machine Snapshot
#!/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 #以 $ 1.qcow2 for template, generate $2.qcow snapshot
Virt-install \
--name
--ram 1000 \
--DISK/VAR/LIB/LIBVIRT/IMAGES/$2.QCOW2 \
--import &>/dev/null &
Echo Create $ successful
The above is one that removes the front end management of a virtual machine. Then one image is a template, another image is generated, and the resulting mirror is used to create the virtual machine.
Snapshot of the personal understanding: Take a large single-player game, we have a lot of game in the process of the archive node, so that we can break into the next game after the failure can go back to the previous archive node, continue to challenge the game. Instead of playing from scratch.
Linux Fourth Week Lesson notes (2) virtual machine installation, virtual machine snapshot