パソいろ トップ > KVMで仮想メモリのサイズを変更

KVMで仮想メモリのサイズを変更

まず仮想サーバーを停止する

shutdown -h now


ホスト側でxmlファイルの書き換え

vi /etc/libvirt/qemu/virt_example.xml

<domain type='kvm'>
  <name>virt_example</name>
  <uuid>4445b234-1516-fef1-23a6-75b38f0c91c3</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>

<memory unit='KiB'>の行と、<currentMemory unit='KiB'>の行の中の数字を書き換える
上記は1Gメモリを割り当てる場合


ホスト側で反映

virsh define /etc/libvirt/qemu/virt_example.xml

仮想サーバーの起動

virsh start virt_example






関連 2012-08-26 11:32:38