KVM インストール2014/08/03 |
KVM ( Kernel-based Virtual Machine ) +QEMU での仮想化です。
搭載しているCPUが仮想化機構( Intel VT, AMD-V 等 )を備えている必要があります。
|
|
[1] | 必要なパッケージをインストールします。 |
[root@dlp ~]#
[root@dlp ~]# yum -y install qemu-kvm libvirt python-virtinst bridge-utils /etc/rc.d/init.d/libvirtd start Starting libvirtd daemon: [ OK ] [root@dlp ~]# /etc/rc.d/init.d/messagebus start Starting system message bus: [ OK ] [root@dlp ~]# chkconfig libvirtd on [root@dlp ~]# chkconfig messagebus on |
[2] | ゲストOSがブリッジ接続できるようにブリッジネットワークを構成しておきます。物理 NIC を複数枚搭載し、ゲスト側からも複数のインターフェースを使いたい場合は、インターフェース名の末尾の数字を増やして同じ要領で設定してください。 |
[root@dlp ~]# mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-br0
[root@dlp ~]#
vi /etc/sysconfig/network-scripts/ifcfg-br0 # 変更 DEVICE= br0 HWADDR=00:0C:29:5F:03:42 # 変更 TYPE= Bridge UUID=c1539085-73d7-4455-ac82-88f26464458a ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=10.0.0.30 NETMASK=255.255.255.0 GATEWAY=10.0.0.1 DNS1=10.0.0.1 IPV6INIT=no USERCTL=no
[root@dlp ~]#
vi /etc/sysconfig/network-scripts/ifcfg-eth0 # 新規作成
DEVICE=eth0
TYPE=Ethernet ONBOOT=yes BRIDGE=br0 /etc/rc.d/init.d/network restart Shutting down interface br0: [ OK ] Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ] Bringing up interface br0: Determining if ip address 10.0.0.30 is already in use for device br0... [ OK ][root@dlp ~]# br0 Link encap:Ethernet HWaddr 00:0C:29:5F:03:38 inet addr:10.0.0.30 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe5f:338/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:65 errors:0 dropped:0 overruns:0 frame:0 TX packets:71 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4370 (4.2 KiB) TX bytes:13742 (13.4 KiB) eth0 Link encap:Ethernet HWaddr 00:0C:29:5F:03:38 inet6 addr: fe80::20c:29ff:fe5f:338/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:38727 errors:0 dropped:0 overruns:0 frame:0 TX packets:20836 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:52608947 (50.1 MiB) TX bytes:1867883 (1.7 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1152 (1.1 KiB) TX bytes:1152 (1.1 KiB) virbr0 Link encap:Ethernet HWaddr 52:54:00:73:7E:F3 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
Sponsored Link |
|