KVM-Guest 僅啟動單一使用者模式

KVM-Guest 僅啟動單一使用者模式

我們有一個在具有 KVM/QEMU 的 Ubuntu 12.04 上運行的 Vserver 主機,到目前為止,客人在各種作業系統(Ubuntu 10.04、12.10、Debian 6,7、CentOS 5,6)上運作良好。

安裝 Ubuntu 14.04 Server(透過 PXE 運作正常)後,用戶端在開機過程中會凍結並出現黑屏,然後出現 Ubuntu 載入標誌。

當網路設定錯誤時,會出現 Ubuntu 載入徽標,但係統在「等待 60 秒以上網路」後凍結。

quiet splash $vt_handoff啟動參數替換為singlehelp系統啟動,輸入root密碼後即可啟動ssh,並可透過ssh存取伺服器。

只需刪除quiet splash $vt_handoff,顯示的最後一條訊息是“停止 System V 運行級別相容性 [確定]”

我只是在日誌中找不到任何線索,因為不知何故,在正常啟動凍結時不會產生任何日誌,只有在使用「單一」啟動時才會產生日誌。

我也嘗試添加啟動參數,debug verbose plymouth:debug但沒有成功。

這是 Ubuntu 14.04 guest 虛擬機器的 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 |好的 |
| 12.04.4 | 3.11 | 3.11 12.04.4 | 3.11 | 3.11訪客凍結,無法聯繫 |
| 12.04.4 | 3.13 | 12.04.4 | 3.11 | 3.11控制台/VGA 凍結/訪客可訪問 |
| 12.04.4 | 3.13 | 12.04.4 | 3.13 |控制台/VGA 凍結/訪客可訪問 |
| 12.04.4 | 3.2 | 14.04 | 14.04 3.13 |訪客凍結,無法聯繫 |
| 14.04 | 14.04 3.13 | 12.04.4 | 3.11 | 3.11好的 |
| 14.04 | 14.04 3.13 | 14.04 | 14.04 3.13 |好的 |

使用的 KVM/libvirt 版本是特定儲存庫中的最新版本。

相關內容