KVM-ゲストはシングルユーザーモードでのみ起動します

KVM-ゲストはシングルユーザーモードでのみ起動します

当社では、KVM/QEMU を搭載した Ubuntu 12.04 で Vserver ホストを実行しており、これまでのところ、ゲストはさまざまな OS (Ubuntu 10.04、12.10、Debian 6、7、CentOS 5、6) で正常に実行されています。

Ubuntu 14.04 Server (PXE 経由で問題なく動作します) をインストールした後、Ubuntu の読み込みロゴが表示される前に、ゲストが起動中に黒い画面でフリーズします。

間違ったネットワーク設定を行うと、Ubuntu の読み込みロゴが表示されますが、「ネットワークを 60 秒以上待機しています」というメッセージが表示された後、システムがフリーズします。

quiet splash $vt_handoffブート パラメータを に置き換えるとsingle、システムの起動が容易になり、ルート パスワードを入力すると、ssh を起動して、ssh 経由でサーバーにアクセスできるようになります。

を削除するとquiet splash $vt_handoff、最後に表示されるメッセージは「System V ランレベル互換性を停止しています [OK]」です。

ログには手がかりがまったく見つかりません。フリーズによる通常の起動ではログが生成されず、「シングル」による起動でのみログが生成されます。

ブートパラメータの追加も試みましたが、debug verbose plymouth:debug効果はありませんでした。

これは Ubuntu 14.04 ゲストの XML 設定です。

<domain type='kvm' id='254'>
  <name>name</name>
  <uuid>cb6cb7e9-4399-603e-56ce-887f77985bc2</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <sysinfo type='smbios'>
    <system>
      <entry name='manufacturer'>Name</entry>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-0.14'>hvm</type>
    <boot dev='network'/>
    <boot dev='hd'/>
    <bios useserial='yes'/>
    <smbios mode='sysinfo'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/volumes/name'/>
      <target dev='sda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='ab:cd:ef:ab:cd:ef'/>
      <source bridge='br0'/>
      <target dev='vnet14'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/31'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/32'>
      <source path='/dev/pts/32'/>
      <target type='virtio' port='0'/>
      <alias name='console0'/>
    </console>
    <input type='mouse' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5914' autoport='yes' listen='0.0.0.0' keymap='de'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='cirrus' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

これはサーバーインストールなので、GUI はインストールされず、ディスプレイマネージャーもインストールされません。

したがって、これは使用されているカーネルと出荷された kvm/qemu バージョンの組み合わせの問題であると思われます。

試してみるために新しいサーバーをセットアップしたところ、次のことがわかりました。

| ホスト | ホスト カーネル | ゲスト | ゲスト カーネル | 結果 |
| 12.04.4 | 3.2 | 12.04.4 | 3.2 | OK |
| 12.04.4 | 3.11 | 12.04.4 | 3.11 | ゲストがフリーズし、アクセス不能 |
| 12.04.4 | 3.13 | 12.04.4 | 3.11 | コンソール/VGA フリーズ / ゲストがアクセス可能 |
| 12.04.4 | 3.13 | 12.04.4 | 3.13 | コンソール/VGA フリーズ / ゲストがアクセス可能 |
| 12.04.4 | 3.2 | 14.04 | 3.13 | ゲストがフリーズし、アクセス不能 |
| 14.04 | 3.13 | 12.04.4 | 3.11 | OK |
| 14.04 | 3.13 | 14.04 | 3.13 | OK |

使用された KVM/libvirt バージョンは、特定のリポジトリからの最新のものでした。

関連情報