虚拟机封装

 

 

制作母虚拟机

 


 

[root@foundation68 p_w_picpaths]# qemu-img create -f qcow2 -b rhel6.5-2.qcow2 server1

Formatting 'server1', fmt=qcow2 size=21474836480 backing_file='rhel6.5-2.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off

[root@foundation68 p_w_picpaths]# qemu-img create -f qcow2 -b rhel6.5-2.qcow2 server2

Formatting 'server2', fmt=qcow2 size=21474836480 backing_file='rhel6.5-2.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off

[root@foundation68 p_w_picpaths]# qemu-img create -f qcow2 -b rhel6.5-2.qcow2 server3

Formatting 'server3', fmt=qcow2 size=21474836480 backing_file='rhel6.5-2.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off

[root@foundation68 p_w_picpaths]# qemu-img create -f qcow2 -b rhel6.5-2.qcow2 server4

Formatting 'server4', fmt=qcow2 size=21474836480 backing_file='rhel6.5-2.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off

[root@foundation68 p_w_picpaths]# qemu-img create -f qcow2 -b rhel6.5-2.qcow2 server5

Formatting 'server5', fmt=qcow2 size=21474836480 backing_file='rhel6.5-2.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off

[root@foundation68 p_w_picpaths]# qemu-img create -f qcow2 -b rhel6.5-2.qcow2 desktop1

Formatting 'desktop1', fmt=qcow2 size=21474836480 backing_file='rhel6.5-2.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off

[root@foundation68 p_w_picpaths]# qemu-img create -f qcow2 -b rhel6.5-2.qcow2 desktop2

Formatting 'desktop2', fmt=qcow2 size=21474836480 backing_file='rhel6.5-2.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off

[root@foundation68 p_w_picpaths]# qemu-img create -f qcow2 -b rhel6.5-2.qcow2 desktop3

Formatting 'desktop3', fmt=qcow2 size=21474836480 backing_file='rhel6.5-2.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off

[root@foundation68 p_w_picpaths]# qemu-img info server1

p_w_picpath: server1

file format: qcow2

virtual size: 20G (21474836480 bytes)

disk size: 196K

cluster_size: 65536

backing file: rhel6.5-2.qcow2

Format specific information:

    compat: 1.1

    lazy refcounts: false

[root@foundation68 p_w_picpaths]# qemu-img info server2

p_w_picpath: server2

file format: qcow2

virtual size: 20G (21474836480 bytes)

disk size: 196K

cluster_size: 65536

backing file: rhel6.5-2.qcow2

Format specific information:

    compat: 1.1

lazy refcounts: false

 

 

 

[root@foundation68 rhel6.5]# ls

EFI               Packages                  RELEASE-NOTES-pa-IN.html

EULA              README                    RELEASE-NOTES-pt-BR.html

EULA_de           RELEASE-NOTES-as-IN.html  RELEASE-NOTES-ru-RU.html

EULA_en           RELEASE-NOTES-bn-IN.html  RELEASE-NOTES-si-LK.html

EULA_es           RELEASE-NOTES-de-DE.html  RELEASE-NOTES-ta-IN.html

EULA_fr           RELEASE-NOTES-en-US.html  RELEASE-NOTES-te-IN.html

EULA_it           RELEASE-NOTES-es-ES.html  RELEASE-NOTES-zh-CN.html

EULA_ja           RELEASE-NOTES-fr-FR.html  RELEASE-NOTES-zh-TW.html

EULA_ko           RELEASE-NOTES-gu-IN.html  repodata

EULA_pt           RELEASE-NOTES-hi-IN.html  ResilientStorage

EULA_zh           RELEASE-NOTES-it-IT.html  RPM-GPG-KEY-redhat-beta

GPL               RELEASE-NOTES-ja-JP.html  RPM-GPG-KEY-redhat-release

HighAvailability  RELEASE-NOTES-kn-IN.html  ScalableFileSystem

p_w_picpaths            RELEASE-NOTES-ko-KR.html  Server

isolinux          RELEASE-NOTES-ml-IN.html  TRANS.TBL

LoadBalancer      RELEASE-NOTES-mr-IN.html

media.repo        RELEASE-NOTES-or-IN.html

[root@foundation68 rhel6.5]# pwd

/var/www/html/rhel6.5

 

[root@server1 ~]# vim /etc/yum.repos.d/rhel-source.repo

[Server]

name=Red Hat Enterprise Linux Server

baseurl=http://172.25.68.250/rhel6.5/Server

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 

[LoadBalancer]

name=Red Hat Enterprise Linux LoadBalancer

baseurl=http://172.25.68.250/rhel6.5/LoadBalancer

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 

[HighAvailability]

name=Red Hat Enterprise Linux Server

baseurl=http://172.25.68.250/rhel6.5/HighAvailability

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 

[ResilientStorage]

name=Red Hat Enterprise Linux Server

baseurl=http://172.25.68.250/rhel6.5/ResilientStorage

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 

[ScalableFileSystem]

name=Red Hat Enterprise Linux Server

baseurl=http://172.25.68.250/rhel6.5/ScalableFileSystem

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[root@server1 ~]# scp /etc/yum.repos.d/rhel-source.repo 172.25.68.11:/etc/yum.repos.d/rhel-source.repo

[email protected]'s password:

rhel-source.repo                              100%  933     0.9KB/s   00:00    

[root@server1 ~]# scp /etc/yum.repos.d/rhel-source.repo 172.25.68.12:/etc/yum.repos.d/rhel-source.repo

[email protected]'s password:

rhel-source.repo                              100%  933     0.9KB/s   00