歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> xen-tools創建虛擬機找不到root fs的解決辦法

xen-tools創建虛擬機找不到root fs的解決辦法

日期:2017/2/28 15:53:30   编辑:Linux教程

用xen-create-image創建映像和cfg文件後,用xm create -c vm.cfg啟動虛擬機實例,過程中找不到root fs,報錯如下:

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/xvda2 does not exist. Dropping to a shell!

BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty; job control turned off
(initramfs)

主要原因在於所使用的內核缺block device driver,所以要安裝帶有block device driver的內核,解決方法如下:

1.# apt-get install -y linux-image-3.0.0-12-virtual

2.# vi /etc/xen/vm.cfg

=======================vm.cfg========================

[...]

kernel = '/boot/vmlinuz-3.0.0-13-virtual'
ramdisk = '/boot/initrd.img-3.0.0-13-virtual'
[...]

3.問題解決

Copyright © Linux教程網 All Rights Reserved