Xen無法啟動(掛載/dev/sda2逾時)

Xen無法啟動(掛載/dev/sda2逾時)

我是 Xen 新手,正在嘗試遵循Debian Wiki 的 Xen 條目。我已經在具有足夠空間的 VMware Workstation 映像上安裝了 squeeze。檔案儲存透過LVM。

我新安裝的來賓作業系統無法啟動 - busybox 引導程式逾時並失敗。這是確切的錯誤:

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Waiting for root file system ... done.
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/sda2 does not exist.  Dropping to a shell!

如何讓我的 Debian Squeeze 來賓作業系統在 Xen 4 上啟動?

我能想到的所有重要訊息:

嘉賓創作:

root@debxentest:/etc/xen-tools# xen-create-image --hostname xenguest1 --scsi --vcpus 1 --pygrub --dist squeeze

General Information
--------------------
Hostname       :  xenguest1
Distribution   :  squeeze
Mirror         :  http://localmirror/debian/
Partitions     :  swap            64Mb  (swap)
                  /               4Gb   (ext3)
Image type     :  full
Memory size    :  64Mb
Kernel path    :  /boot/vmlinuz-2.6.32-5-xen-amd64
Initrd path    :  /boot/initrd.img-2.6.32-5-xen-amd64

Networking Information
----------------------
IP Address     : DHCP [MAC: 00:16:3E:1A:8D:68]


Creating swap on /dev/universe/xenguest1-swap
Done

Creating ext3 filesystem on /dev/universe/xenguest1-disk
Done
Installation method: debootstrap
Done

Running hooks
Done

No role scripts were specified.  Skipping

Creating Xen configuration file
Done
Setting up root password
Generating a password for the new guest.
All done


Logfile produced at:
     /var/log/xen-tools/xenguest1.log

Installation Summary
---------------------
Hostname        :  xenguest1
Distribution    :  squeeze
IP-Address(es)  :  dynamic
RSA Fingerprint :  e3:6e:87:8b:59:78:9d:4d:3b:7f:b2:84:48:95:98:36
Root Password   :  Wppn4eKf

LVM 設定(磁碟區和群組):

  lvm> lvdisplay
  --- Logical volume ---
  LV Name                /dev/universe/xenguest1-swap
  VG Name                universe
  LV UUID                r68Qej-hVOE-ZRMu-KRzU-cXi4-paHN-4FCM0n
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                64.00 MiB
  Current LE             16
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:2

  --- Logical volume ---
  LV Name                /dev/universe/xenguest1-disk
  VG Name                universe
  LV UUID                LBZpOl-sHjU-ec3d-zePZ-B2Nv-eLQ3-1pJeJ6
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:3

  --- Logical volume ---
  LV Name                /dev/debxentest/root
  VG Name                debxentest
  LV UUID                XlMXTu-8IEQ-Ec0P-3kaw-menW-Dcz8-Qmu6Ea
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                18.91 GiB
  Current LE             4840
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Logical volume ---
  LV Name                /dev/debxentest/swap_1
  VG Name                debxentest
  LV UUID                VJkXmY-kr7D-Rvvv-Ekg2-vo54-f8D0-hXGDYr
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                872.00 MiB
  Current LE             218
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1

  lvm> vgdisplay
  --- Volume group ---
  VG Name               debxentest
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               19.76 GiB
  PE Size               4.00 MiB
  Total PE              5058
  Alloc PE / Size       5058 / 19.76 GiB
  Free  PE / Size       0 / 0   
  VG UUID               1tEMNQ-B81G-82nb-SCXq-mNJR-Swh7-UGXV14

  --- Volume group ---
  VG Name               universe
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               20.00 GiB
  PE Size               4.00 MiB
  Total PE              5119
  Alloc PE / Size       1040 / 4.06 GiB
  Free  PE / Size       4079 / 15.93 GiB
  VG UUID               vxAIfs-wMIT-Nxcc-gEOh-oSoY-e5Zx-r2VTum

Xen設定

root@debxentest:/home/tester# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   941     1     r-----     22.4
xenguest1                                    2    64     1     -b----      1.9

答案1

我也遇到了同樣的問題,就是擠壓和喘息。

如果您使用 xen-tools 和 xen-create-image,您可以:

  • 使用 lenny 建立映像:

    xen-create-image --主機名稱 len1 --scsi --dist lenny

  • 不使用 scsi 選項建立擠壓影像:

    xen-create-image --主機名稱 sqz1 --dist 擠壓

我覺得這種情況很奇怪。看來scsi選項應該由squeeze和lenny支援;也許是 udev 的問題?作為Debian Xen 維基頁面狀態:

--scsi 確保虛擬機器使用普通的 SCSI HD 名稱,例如 sda。例如,當建立 Ubuntu Maverick 映像時,如果沒有此選項,它將無法啟動,因為預設值為 xvda。 xvda 用來表明它是一個虛擬化磁碟,但非 xen 核心(如 Ubuntu 中的普通 pv_ops 核心)不知道它們是什麼(不過,請參閱下面有關 xen-blkfront 驅動程式的註釋) 。您也可以在 /etc/xen-tools/xen-tools.conf 中設定 scsi=1 以使其成為預設值。

後來,它也指出:

新的 2.6.32 核心映像具有基於 paravirt_ops 的 Xen dom0 和 domU 支援。當您為 Ubuntu Maverick 建立映像(其中包含具有 pv_ops 的內核)時,它不會使用 Xen 內核,而是使用 Ubuntu 內核,因為它能夠在 Xen 的虛擬機管理程式上運行。

對於想要在較早的 dom0 上測試 2.6.32 核心 domU 的人,您必須確保 xen-blkfront domU 驅動程式已加載,並且可以找到根和其他磁碟分割區。如果您仍然在 domU .cfg 檔案中使用已棄用的 hda* 或 sda* 裝置名稱,則情況不再如此。切換到 xvda* 設備,該設備也適用於 2.6.18 和 2.6.26 dom0 核心。

我已經確認 --scsi 選項適用於 Maverick,它使用 2.6.35 內核,但這應該不重要。這一切看起來都是矛盾的。

此連結也可能有幫助:

相關內容