GNOME等GUIを使わずコマンドラインでKVMを利用したゲストサーバ構築の前にKVMパッケージを導入します。
■yumで導入
[root@gold ~]# yum install kvm libvirt libvirt-python python-virtinst kvm-qemu-img bridge-utils Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package bridge-utils.x86_64 0:1.1-2 set to be updated ---> Package kvm.x86_64 0:83-164.el5_5.12 set to be updated --> Processing Dependency: etherboot-zroms-kvm >= 5.4.4-13.el5 for package: kvm --> Processing Dependency: kmod-kvm for package: kvm --> Processing Dependency: qspice-libs for package: kvm --> Processing Dependency: libSDL-1.2.so.0()(64bit) for package: kvm --> Processing Dependency: libqcairo.so.2()(64bit) for package: kvm --> Processing Dependency: libspice.so.0()(64bit) for package: kvm --> Processing Dependency: liblog4cpp.so.4()(64bit) for package: kvm --> Processing Dependency: libqavutil.so.49()(64bit) for package: kvm --> Processing Dependency: libqavcodec.so.51()(64bit) for package: kvm --> Processing Dependency: libcelt051.so.0()(64bit) for package: kvm ---> Package kvm-qemu-img.x86_64 0:83-164.el5_5.12 set to be updated ---> Package libvirt.i386 0:0.6.3-33.el5_5.1 set to be updated --> Processing Dependency: libxenstore.so.3.0 for package: libvirt --> Processing Dependency: cyrus-sasl-md5 for package: libvirt --> Processing Dependency: iscsi-initiator-utils for package: libvirt ---> Package libvirt.x86_64 0:0.6.3-33.el5_5.1 set to be updated --> Processing Dependency: libxenstore.so.3.0()(64bit) for package: libvirt ---> Package libvirt-python.x86_64 0:0.6.3-33.el5_5.1 set to be updated ---> Package python-virtinst.noarch 0:0.400.3-9.el5 set to be updated --> Running transaction check ---> Package SDL.x86_64 0:1.2.10-8.el5 set to be updated ---> Package celt051.x86_64 0:0.5.1.3-0.el5 set to be updated ---> Package cyrus-sasl-md5.x86_64 0:2.1.22-5.el5_4.3 set to be updated ---> Package etherboot-zroms-kvm.x86_64 0:5.4.4-13.el5.centos set to be updated ---> Package iscsi-initiator-utils.x86_64 0:6.2.0.871-0.16.el5 set to be updated ---> Package kmod-kvm.x86_64 0:83-164.el5_5.12 set to be updated ---> Package log4cpp.x86_64 0:1.0-9.el5 set to be updated ---> Package qcairo.x86_64 0:1.8.7.1-3.el5 set to be updated --> Processing Dependency: libqpixman-1.so.0()(64bit) for package: qcairo ---> Package qffmpeg-libs.x86_64 0:0.4.9-0.15.20080908.el5 set to be updated ---> Package qspice-libs.x86_64 0:0.3.0-54.el5 set to be updated --> Processing Dependency: libGLU.so.1()(64bit) for package: qspice-libs ---> Package xen-libs.i386 0:3.0.3-105.el5_5.4 set to be updated --> Processing Dependency: libext4fs.so.2 for package: xen-libs --> Processing Dependency: liblzma.so.0 for package: xen-libs ---> Package xen-libs.x86_64 0:3.0.3-105.el5_5.4 set to be updated --> Processing Dependency: liblzma.so.0()(64bit) for package: xen-libs --> Processing Dependency: libext4fs.so.2()(64bit) for package: xen-libs --> Running transaction check ---> Package e4fsprogs-libs.i386 0:1.41.9-3.el5 set to be updated ---> Package e4fsprogs-libs.x86_64 0:1.41.9-3.el5 set to be updated ---> Package mesa-libGLU.x86_64 0:6.5.1-7.8.el5 set to be updated ---> Package qpixman.x86_64 0:0.13.3-4.el5 set to be updated ---> Package xz-libs.i386 0:4.999.9-0.3.beta.20091007git.el5 set to be updated ---> Package xz-libs.x86_64 0:4.999.9-0.3.beta.20091007git.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================== Package Arch Version Repository Size ============================================================================================================================== Installing: bridge-utils x86_64 1.1-2 base 28 k kvm x86_64 83-164.el5_5.12 updates 859 k kvm-qemu-img x86_64 83-164.el5_5.12 updates 157 k libvirt i386 0.6.3-33.el5_5.1 updates 2.0 M libvirt x86_64 0.6.3-33.el5_5.1 updates 2.0 M libvirt-python x86_64 0.6.3-33.el5_5.1 updates 137 k python-virtinst noarch 0.400.3-9.el5 base 379 k Installing for dependencies: SDL x86_64 1.2.10-8.el5 base 214 k celt051 x86_64 0.5.1.3-0.el5 base 51 k cyrus-sasl-md5 x86_64 2.1.22-5.el5_4.3 base 47 k e4fsprogs-libs i386 1.41.9-3.el5 base 108 k e4fsprogs-libs x86_64 1.41.9-3.el5 base 104 k etherboot-zroms-kvm x86_64 5.4.4-13.el5.centos base 151 k iscsi-initiator-utils x86_64 6.2.0.871-0.16.el5 base 804 k kmod-kvm x86_64 83-164.el5_5.12 updates 1.2 M log4cpp x86_64 1.0-9.el5 base 197 k mesa-libGLU x86_64 6.5.1-7.8.el5 base 224 k qcairo x86_64 1.8.7.1-3.el5 base 499 k qffmpeg-libs x86_64 0.4.9-0.15.20080908.el5 base 273 k qpixman x86_64 0.13.3-4.el5 base 109 k qspice-libs x86_64 0.3.0-54.el5 base 232 k xen-libs i386 3.0.3-105.el5_5.4 updates 158 k xen-libs x86_64 3.0.3-105.el5_5.4 updates 155 k xz-libs i386 4.999.9-0.3.beta.20091007git.el5 base 100 k xz-libs x86_64 4.999.9-0.3.beta.20091007git.el5 base 95 k Transaction Summary ============================================================================================================================== Install 25 Package(s) Upgrade 0 Package(s) Total download size: 10 M Is this ok [y/N]: y Downloading Packages: (1/25): bridge-utils-1.1-2.x86_64.rpm | 28 kB 00:00 (2/25): cyrus-sasl-md5-2.1.22-5.el5_4.3.x86_64.rpm | 47 kB 00:00 (3/25): celt051-0.5.1.3-0.el5.x86_64.rpm | 51 kB 00:00 (4/25): xz-libs-4.999.9-0.3.beta.20091007git.el5.x86_64.rpm | 95 kB 00:00 (5/25): xz-libs-4.999.9-0.3.beta.20091007git.el5.i386.rpm | 100 kB 00:00 (6/25): e4fsprogs-libs-1.41.9-3.el5.x86_64.rpm | 104 kB 00:00 (7/25): e4fsprogs-libs-1.41.9-3.el5.i386.rpm | 108 kB 00:00 (8/25): qpixman-0.13.3-4.el5.x86_64.rpm | 109 kB 00:00 (9/25): libvirt-python-0.6.3-33.el5_5.1.x86_64.rpm | 137 kB 00:00 (10/25): etherboot-zroms-kvm-5.4.4-13.el5.centos.x86_64.rpm | 151 kB 00:00 (11/25): xen-libs-3.0.3-105.el5_5.4.x86_64.rpm | 155 kB 00:00 (12/25): kvm-qemu-img-83-164.el5_5.12.x86_64.rpm | 157 kB 00:00 (13/25): xen-libs-3.0.3-105.el5_5.4.i386.rpm | 158 kB 00:00 (14/25): log4cpp-1.0-9.el5.x86_64.rpm | 197 kB 00:00 (15/25): SDL-1.2.10-8.el5.x86_64.rpm | 214 kB 00:00 (16/25): mesa-libGLU-6.5.1-7.8.el5.x86_64.rpm | 224 kB 00:00 (17/25): qspice-libs-0.3.0-54.el5.x86_64.rpm | 232 kB 00:00 (18/25): qffmpeg-libs-0.4.9-0.15.20080908.el5.x86_64.rpm | 273 kB 00:00 (19/25): python-virtinst-0.400.3-9.el5.noarch.rpm | 379 kB 00:00 (20/25): qcairo-1.8.7.1-3.el5.x86_64.rpm | 499 kB 00:00 (21/25): iscsi-initiator-utils-6.2.0.871-0.16.el5.x86_64.rpm | 804 kB 00:00 (22/25): kvm-83-164.el5_5.12.x86_64.rpm | 859 kB 00:00 (23/25): kmod-kvm-83-164.el5_5.12.x86_64.rpm | 1.2 MB 00:00 (24/25): libvirt-0.6.3-33.el5_5.1.i386.rpm | 2.0 MB 00:00 (25/25): libvirt-0.6.3-33.el5_5.1.x86_64.rpm | 2.0 MB 00:00 ------------------------------------------------------------------------------------------------------------------------------ Total 2.7 MB/s | 10 MB 00:03 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : celt051 1/25 Installing : qffmpeg-libs 2/25 Installing : cyrus-sasl-md5 3/25 Installing : bridge-utils 4/25 Installing : log4cpp 5/25 Installing : iscsi-initiator-utils 6/25 Installing : xz-libs 7/25 Installing : e4fsprogs-libs 8/25 Installing : xen-libs 9/25 Installing : SDL 10/25 Installing : mesa-libGLU 11/25 Installing : qpixman 12/25 Installing : qcairo 13/25 Installing : qspice-libs 14/25 Installing : xz-libs 15/25 Installing : e4fsprogs-libs 16/25 Installing : kvm-qemu-img 17/25 Installing : libvirt 18/25 Installing : libvirt-python 19/25 Installing : etherboot-zroms-kvm 20/25 Installing : kmod-kvm 21/25 Installing : xen-libs 22/25 Installing : libvirt 23/25 Installing : kvm 24/25 Installing : python-virtinst 25/25 Installed: bridge-utils.x86_64 0:1.1-2 kvm.x86_64 0:83-164.el5_5.12 kvm-qemu-img.x86_64 0:83-164.el5_5.12 libvirt.i386 0:0.6.3-33.el5_5.1 libvirt.x86_64 0:0.6.3-33.el5_5.1 libvirt-python.x86_64 0:0.6.3-33.el5_5.1 python-virtinst.noarch 0:0.400.3-9.el5 Dependency Installed: SDL.x86_64 0:1.2.10-8.el5 celt051.x86_64 0:0.5.1.3-0.el5 cyrus-sasl-md5.x86_64 0:2.1.22-5.el5_4.3 e4fsprogs-libs.i386 0:1.41.9-3.el5 e4fsprogs-libs.x86_64 0:1.41.9-3.el5 etherboot-zroms-kvm.x86_64 0:5.4.4-13.el5.centos iscsi-initiator-utils.x86_64 0:6.2.0.871-0.16.el5 kmod-kvm.x86_64 0:83-164.el5_5.12 log4cpp.x86_64 0:1.0-9.el5 mesa-libGLU.x86_64 0:6.5.1-7.8.el5 qcairo.x86_64 0:1.8.7.1-3.el5 qffmpeg-libs.x86_64 0:0.4.9-0.15.20080908.el5 qpixman.x86_64 0:0.13.3-4.el5 qspice-libs.x86_64 0:0.3.0-54.el5 xen-libs.i386 0:3.0.3-105.el5_5.4 xen-libs.x86_64 0:3.0.3-105.el5_5.4 xz-libs.i386 0:4.999.9-0.3.beta.20091007git.el5 xz-libs.x86_64 0:4.999.9-0.3.beta.20091007git.el5 Complete!
■カーネルモジュールの確認し、自動起動の設定
[root@gold ~]# lsmod | grep kvm [root@gold ~]# modprobe kvm [root@gold ~]# modprobe kvm_intel [root@gold ~]# lsmod | grep kvm kvm_intel 86920 0 kvm 226208 1 kvm_intel [root@gold ~]# /etc/rc.d/init.d/libvirtd start Starting libvirtd daemon: [ OK ] [root@gold ~]# chkconfig libvirtd on [root@gold ~]# chkconfig --list libvirtd libvirtd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
0 件のコメント:
コメントを投稿