Step one: open a virtual terminal in the controller
command line:
virt-manager
Step Two: In the virtual controller interface, click on the small TV, create a virtual machine
Step Three: Import mirroring, configure the virtual machine parameters Size
Install or upgrade an existing system: selectively skip skip
set the root login password:
The password is too simple, the following interface will pop up: Choose to use anyway
installation is complete reboot the system:
Step Four: master package
1, modified host name
vi /etc/sysconfig/network #6.5版本虚拟机默认编辑命令为vi
2, Network Configuration
rm -fr /etc/udev/rules.d/70-persistent-net.rules #此文件记录了本机eth0网卡的硬件地址,如果不删除,以后做的快照虚拟机网络都有问题
vi /etc/sysconfig/network-scripts/ifcfg-eth0
/etc/init.d/network restart #重启网络
ifconfig #查看网络
3, the source arranged yum
vi /etc/yum.repos.d/rhel-source.repo
yum clean all #清除yum缓存
yum repolist #例出yum仓库及安装包
4, turn off selinux
vi /etc/sysconfig/selinux
5, turn off the firewall
/etc/init.d/iptables stop
/etc/init.d/ip6tables stop
chkconfig iptables off #禁用ipv4的iptables
chkconfig ip6tables off #禁用ipv6的iptables
6, install the necessary software
yum install vim lftp openssh-clients -y #使用openssh-clients的scp命令来传输文件
7, 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后面加的是母盘的名字
Ensure rhel6.5 virtual machine off:
Step 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.