Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

Virt-Manager GUI で、32GB 以上のメモリを VM に割り当てることができない

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6 および 前バージョンの virt-manager-0.8.6-4.el6
  • Virt-Manager
  • KVM および XEN

Issue

  • virt-manager GUI が kvm の VM に対して 32GB 以上のメモリを割り当てることはできないのはなぜですか?
  • virt-manager を使用して KVM ゲストに割り当てられるメモリの大きさは?
  • Virtualization limits page によると、KVM ゲストは 512 GB 以下のメモリをサポートしていますが、virt-manager では完全仮想化された KVM ゲストに 32G 以上のメモリを割り当てることができません。

Resolution

KVM の場合

  • ゲスト XML 設定ファイルを編集して、ゲストメモリを手動で追加または拡張します。
  • バーチャルマシンを停止します。
  • 次のコマンドを実行して、VM の XML 定義を編集します。

    \#virsh edit <VM Name> 
    
  • たとえば、以下のようになります (ここでは <memory> は "setmaxmem" 値になり、<currentMemory> は "setmem" 値になります)。

    virsh # edit <domain-name>
    <domain type='kvm'>
     ...
    <memory>514144</memory>
    <currentMemory>262144</currentMemory>
    ...
    </domain>
    
  • メモリの値を必要に応じて変更し、設定を保存します。

  • libvirtd サービスを再起動します。

XEN の場合

  • /etc/xen/にあるゲスト名の xml ファイルを編集します。

    • たとえば、次のようになります。

      maxmem = 512   <-- These are the parameters which need to be modified. It is mentioned in MB
      memory = 512    <-- So for 32 GB mention 32000
      
    • libvirtd service サービスを再起動します。

  • この問題は、Red Hat Enterprise Linux 6 上の virt-manager-0.8.6-4.el6 で解決しました (Bugzilla 640781)。

Root Cause

  • GUIで virt-manager が最大メモリを設定することについて、制限がいくつかあります。
  • RHEL5 では、virt-manager を使用して 32GB 以上のメモリを VM に割り当てることはできません。

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments