Mirroring virtual machine installed version 6.5, master package

Step one: open a virtual terminal in the controller
command line:

virt-manager

Here Insert Picture Description
Step Two: In the virtual controller interface, click on the small TV, create a virtual machine
Here Insert Picture DescriptionStep Three: Import mirroring, configure the virtual machine parameters Size
Here Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture Description

Here Insert Picture Description

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Install or upgrade an existing system: selectively skip skip
Here Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture Description
set the root login password:

Here Insert Picture Description

The password is too simple, the following interface will pop up: Choose to use anyway
Here Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture Descriptioninstallation is complete reboot the system:
Here Insert Picture Description
Here Insert Picture Description

Step Four: master package
1, modified host name

vi /etc/sysconfig/network  #6.5版本虚拟机默认编辑命令为vi

Here Insert Picture DescriptionHere Insert Picture Description2, Network Configuration

rm -fr /etc/udev/rules.d/70-persistent-net.rules #此文件记录了本机eth0网卡的硬件地址,如果不删除,以后做的快照虚拟机网络都有问题

Here Insert Picture Description

vi /etc/sysconfig/network-scripts/ifcfg-eth0
/etc/init.d/network restart  #重启网络
ifconfig #查看网络

Here Insert Picture DescriptionHere Insert Picture Description
Here Insert Picture Description
3, the source arranged yum

vi /etc/yum.repos.d/rhel-source.repo
yum clean all #清除yum缓存
yum repolist #例出yum仓库及安装包

Here Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture Description4, turn off selinux

vi /etc/sysconfig/selinux

Here Insert Picture Description5, turn off the firewall

/etc/init.d/iptables stop
/etc/init.d/ip6tables stop
chkconfig iptables off  #禁用ipv4的iptables
chkconfig ip6tables off  #禁用ipv6的iptables

Here Insert Picture Description6, install the necessary software

yum install vim lftp openssh-clients -y   #使用openssh-clients的scp命令来传输文件

Here Insert Picture Description7, poweroff shutdown
Step five: the package is complete, clean up temporary files and cache
as will generate some temporary files, cache files, and so each boot, if not clear, there will be a snapshot of each of these things, the snapshot becomes large.
If you delete the master can not use this command in a virtual machine manager

yum whatprovides */virt-sysprep #查找virt-sysprep命令是由哪个包提供的
yum install libguestfs-tools-c-1.32.7-3.el7.x86_64 #下载查询到的安装包
virt-sysprep -d rhel7.3  #-d后面加的是母盘的名字

Here Insert Picture DescriptionEnsure rhel6.5 virtual machine off:
Here Insert Picture DescriptionHere Insert Picture DescriptionStep Six: Remove the virtual machines in a virtual manager and avoid re-opened later
after the package is completed rhel6.5 virtual machine as a master, they must not open, only used for snapshots. Otherwise, every once open, the master will change. In order to avoid residual hand, you can delete the virtual machine in the virtual manager.
Note: When you delete, the /var/lib/libvirt/images/rhel6.5.qcow2 the hook point out, or I'll just packaged virtual machine deleted.
Here Insert Picture Description

Published 170 original articles · won praise 7 · views 10000 +

Guess you like

Origin blog.csdn.net/CapejasmineY/article/details/102961097