ユーザ用ツール

サイト用ツール


サイドバー

このページの翻訳:



最近の更新



Tag Cloud

01_linux:08_仮想化:kvm:05_centos5_virtio

05 ゲストCentOS5をVirtio化

virtioを使ったほうが早い

1.先にゲストでvirtioを組み込み

virtioドライバを入れたinitrdを用意しておく

root# cd /boot
root# cp -p initrd-$(uname -r).img initrd-$(uname -r)_ide.img
root# mkinitrd -v -f --with=virtio_pci --with=virtio_blk initrd-$(uname -r).img  $(uname -r)

2.起動ファイル修正

# virsh edit [VM]

Disk

target dev をvda へ、busをvirtioに変更

<disk type='block' device='disk'>
 <driver name='qemu' type='raw' cache='none' io='native'/>
 <source dev='/dev/mapper/VolG00-Volmatsui'/>
 <target dev='hda' bus='ide'/>
</disk>
 ↓ ↓ 変更
<disk type='block' device='disk'>
  <driver name='qemu' type='raw' cache='none' io='native'/>
  <source dev='/dev/mapper/VolG00-Volmatsui'/>
  <target dev='vda' bus='virtio'/>
</disk>

NIC

「<model type='virtio'/>」を追加

<interface type='bridge'>
  <mac address='52:54:00:ff:92:5e'/>
  <source bridge='br1'/>
  <target dev='vnet1'/>
  <alias name='net1'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
↓ ↓ 追加
<interface type='bridge'>
  <mac address='52:54:00:ff:92:5e'/>
  <source bridge='br1'/>
  <target dev='vnet1'/>
  <model type='virtio'/>
  <alias name='net1'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
01_linux/08_仮想化/kvm/05_centos5_virtio.txt · 最終更新: 2022/09/22 14:28 by matsui