Virtual machine package
- Principle encapsulation virtual machine
to a virtual machine configured to something like an installation package can be quickly replicated a plurality of virtual machines installed by saving time and ease of use. - redhat7.3 version of the virtual machine package
Switch to the root user
virt-manager to open the virtual machine management interface
click on the upper left corner
Mirroring installation:
To install the virtual machine from the master disk names:
Select Language:
Select time zone
Set to start the installation is complete, you can choose whether to install the graphics needed
to set the root password and create a user:
Wait for the installation, the installation is complete click reboot
The system of non-graphical interface:
Log in as root and modify the host name
Use ifconfig command found that the use unsuccessful
use ip addr show command to view the card name
vi /boot/grub2/grub.cfg ## modify the network card name
After the addition of net.ifnames line 99 = 0
Restart to take effect:
Set ip:
Restart network services, see the ip:
set source yum, yum need to mount a good source of rhel7.3 ahead of the real machine
mount point in setting up shared yum source of real machine in:
/var/www/html/ #系统中默认的发布目录
mkdir /var/www/html/westos #创建默认的挂载目录
mount /home/kisok/Desktop/ rhel-server-7.3-x86_64-dvd /var/www/html/westos #将镜像挂载在这个目录下。
vim /etc/rc.d/rc.local #设置镜像永久挂载点
内容:mount /home/kisok/Desktop/ rhel-server-7.3-x86_64-dvd /var/www/html/westos
chmod +x /etc/rc.d/rc.local #给文件添加可执行权限
df #查看是否挂载
Provided master source yum:
setting is the view, and some common commands to install, service, after the installation can be selected according to their needs
See if you can use the command ifconfig
close NetworkManager and firewalld Service
Edit the configuration file vim / etc / sysconfig / selinux
set selinux is disabled
The local resolver settings
Software installed on the real machine clears master cache
yum whatprovides * / virt_sysprep # Find virt_sysprep installation package
yum libguestfs-tools-c-1.32.7-3.el7.x86_64 -y # install
poweroff late mother master cache clear real machine
virt-sysprep -d rhel7-base
In the virtual machine manager to remove the master, should not delete files qcow2
Create a snapshot according to their needs:
to enter the directory to create a snapshot to create a snapshot: cd / var / lib / libvirt / images /