Hi list, I'' trying to create my first vm with Xen, and I experience some problems. I follow some How to''s and xen docs to build my own config file, but maybe, there are some errors inside it. I have the following problem, after i start my guest domain, the kernel boot & then a kernel panix is displayed : VFS: Cannot open root device "hda1" or unknown-block(0,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) I try to start this Virtual machine from vmware workstation where i install Xen (Dom0 work perfectly). My config is make up of these lines : kernel = "/boot/vmlinuz-2.6.20-2936.fc7xen" root = "/dev/hda1 ro" name = "test_Linux" cdrom = "/dev/cdrom" memory = "128" builder = "linux" name = "linux" disk = [ "file:/xenroot/linux/linux.xdi,hda1,w" ] Additionnals questions : a) Does i must use a modified Xen linux kernel, or, can I use a "normal/standard" kernel to boot up my VM? b) Is it possible to start a fresh install of Fedora directly from dvd in a guest domain (I mean without creating & mounting disk image/VM partition and copying root file system in it? If yes, how ? Thanks for your replyes. -- Guillaume
Guillaume wrote:> Hi list, > I'' trying to create my first vm with Xen, and I experience some problems. > I follow some How to''s and xen docs to build my own config file, but > maybe, there are some errors inside it. > I have the following problem, after i start my guest domain, the > kernel boot & then a kernel panix is displayed : > > VFS: Cannot open root device "hda1" or unknown-block(0,0) > Please append a correct "root=" boot option > Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) > > I try to start this Virtual machine from vmware workstation where i > install Xen (Dom0 work perfectly). > > My config is make up of these lines : > kernel = "/boot/vmlinuz-2.6.20-2936.fc7xen" > root = "/dev/hda1 ro" > name = "test_Linux" > cdrom = "/dev/cdrom" > memory = "128" > builder = "linux" > name = "linux" > disk = [ "file:/xenroot/linux/linux.xdi,hda1,w" ] > > Additionnals questions : > a) Does i must use a modified Xen linux kernel, or, can I use a > "normal/standard" kernel to boot up my VM? > b) Is it possible to start a fresh install of Fedora directly from dvd > in a guest domain (I mean without creating & mounting disk image/VM > partition and copying root file system in it? If yes, how ? > > Thanks for your replyes. >Hi, I am not sure how you have installed your VM ? You should try to reinstall the VM using virt-install (command line) / virt-manager (GUI). It is not great to try a virtualisation solution inside another one ( you may have strange behaviour / poor performance ). a) You need to run the xen kernel in order to use xen. b) To install a paravirtualise VM you will need to have an install tree exported as http. You can simply mount the DVD on /var/www/html and start the http server. You may want to read http://fedoraproject.org/wiki/Docs/Fedora7VirtQuickStart Good luck, Olivier
In addition, you''re presenting the disk as hda1. You probably mean to present the disk as hda so the partition hda1 on hda isn''t confused. As Olivier has pointed out though, you appear to have many other issues to work through as well. Mark Olivier Renault wrote:> Guillaume wrote: >> Hi list, >> I'' trying to create my first vm with Xen, and I experience some >> problems. >> I follow some How to''s and xen docs to build my own config file, but >> maybe, there are some errors inside it. >> I have the following problem, after i start my guest domain, the >> kernel boot & then a kernel panix is displayed : >> >> VFS: Cannot open root device "hda1" or unknown-block(0,0) >> Please append a correct "root=" boot option >> Kernel panic - not syncing: VFS: Unable to mount root fs on >> unknown-block(0,0) >> >> I try to start this Virtual machine from vmware workstation where i >> install Xen (Dom0 work perfectly). >> >> My config is make up of these lines : >> kernel = "/boot/vmlinuz-2.6.20-2936.fc7xen" >> root = "/dev/hda1 ro" >> name = "test_Linux" >> cdrom = "/dev/cdrom" >> memory = "128" >> builder = "linux" >> name = "linux" >> disk = [ "file:/xenroot/linux/linux.xdi,hda1,w" ] >> >> Additionnals questions : >> a) Does i must use a modified Xen linux kernel, or, can I use a >> "normal/standard" kernel to boot up my VM? >> b) Is it possible to start a fresh install of Fedora directly from dvd >> in a guest domain (I mean without creating & mounting disk image/VM >> partition and copying root file system in it? If yes, how ? >> >> Thanks for your replyes. >> > Hi, > > I am not sure how you have installed your VM ? You should try to > reinstall the VM using virt-install (command line) / virt-manager (GUI). > > It is not great to try a virtualisation solution inside another one ( > you may have strange behaviour / poor performance ). > > a) You need to run the xen kernel in order to use xen. > > b) To install a paravirtualise VM you will need to have an install > tree exported as http. You can simply mount the DVD on /var/www/html > and start the http server. > > You may want to read > http://fedoraproject.org/wiki/Docs/Fedora7VirtQuickStart > > Good luck, > Olivier > > -- > Fedora-xen mailing list > Fedora-xen@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-xen
It has been a while since I have used a paravirtualized vm, so my responses will be vague, but perhaps helpful. Regarding your original install, both previous responses made good points. However, I thought some additional explanation might be helpful: a) -The kernel line you put in your config makes your vm boot that kernel (the one on your local disk), so you are already using a xen kernel to boot that vm. -There are ready made xen compatible installs of OSes on disk images available for download at various places, you should be able to find instructions on how to get thee images into your vm''s virtual drive as well. You may already know this base on your question, but I wasn''t sure (I learned xen before it came on distros and I haven''t read the fedora documentation to see if it mentions that or where you are copying the files from for the vms you create). -Personally, I prefer to use partitions (or even disks) as virtual disks. This can be done by using (for example) phy:/dev/hdb or phy:/dev/hda4 or dev:/mapper/lvmvolgroup/lvmvol (or something, LVM certainly makes the management of multiple virtual but physical disks more manageable) instead of file:/xenroot/linux/linux.xdi in the first portion of the diskarguments. b) -You can use a normal/standard kernel in an HVM vm. This requires that you have a machine with hardware virtualization, but it allows you to install windows, boot with a non-xen livecd, etc. I think there is an example like /etc/xen/xmexample.hvm for these situations. In such a case, you wouldn''t have to fdisk the intended virtual partition because the installer you use when you initially create the machine (windows, linux, whatever) would take care of that. etc) As mentioned by another user, the virtual machine installation executables (virsh-install/virt-install?) will create a virtual machine that is more manageable with fedora tools and uses xen capabilities. I don''t know where config files for these domains are installed, and I prefer the manual creation via config files and whatnot so I have more control when the time comes for major changes. I believe the installer provided on Fedora can make paravirtualized and hvm machines, and from the sound of a previous response, it may take care of copying the filesystem on paravirtualized machines as well. I hope this helps or at least doesn''t hurt. Dustin -----Original Message----- From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Guillaume Sent: Friday, October 26, 2007 06:01 To: fedora-xen@redhat.com Subject: [Fedora-xen] problem creating my 1st VM Hi list, I'' trying to create my first vm with Xen, and I experience some problems. I follow some How to''s and xen docs to build my own config file, but maybe, there are some errors inside it. I have the following problem, after i start my guest domain, the kernel boot & then a kernel panix is displayed : VFS: Cannot open root device "hda1" or unknown-block(0,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) I try to start this Virtual machine from vmware workstation where i install Xen (Dom0 work perfectly). My config is make up of these lines : kernel = "/boot/vmlinuz-2.6.20-2936.fc7xen" root = "/dev/hda1 ro" name = "test_Linux" cdrom = "/dev/cdrom" memory = "128" builder = "linux" name = "linux" disk = [ "file:/xenroot/linux/linux.xdi,hda1,w" ] Additionnals questions : a) Does i must use a modified Xen linux kernel, or, can I use a "normal/standard" kernel to boot up my VM? b) Is it possible to start a fresh install of Fedora directly from dvd in a guest domain (I mean without creating & mounting disk image/VM partition and copying root file system in it? If yes, how ? Thanks for your replyes. -- Guillaume -- Fedora-xen mailing list Fedora-xen@redhat.com https://www.redhat.com/mailman/listinfo/fedora-xen
> It has been a while since I have used a paravirtualized vm, so my responses > will be vague, but perhaps helpful. > Regarding your original install, both previous responses made good points. > However, I thought some additional explanation might be helpful: > a) > -The kernel line you put in your config makes your vm boot that kernel (the > one on your local disk), so you are already using a xen kernel to boot that > vm.Is there a problem by using the kernel use to boot up the system (Dom0) ? If I understand, you mean that I have to use a kernel dedicated to boot all DomU ! Why, is there some limitation by using this kernel (Dom0) for running VM ?> -There are ready made xen compatible installs of OSes on disk images > available for download at various places, you should be able to find > instructions on how to get thee images into your vm''s virtual drive as well.Ok, but I want first, understand how Xen works, and then, i''ll get theses files. I prefer to learn by getting rid of theses problem before, its a godd formation i think. And i tought too, it''s more quick to use ready-to-use Xen images files. Thanks for your time :)
There is no problem using the same kernel. Some people compile a dom0 kernel and a domU kernel when they custom build or manually install xen, but it isn''t necessary, it just makes for a smaller kernel. It is fine to use the same for both, as it is loaded read-only anyway. I was just pointing out that you were using an existing xen kernel in your physical /boot and not a kernel in your vm''s /boot. I don''t remember all of the setup of paravirtualized vms since it has been a while, but you might try Mike''s suggestion: disk = [ ''file:/xenroot/linux/linux.xdi,hda,w'' ] in spite of the fact that xmexample1 had hda1 in the second section of the argument. Whether to use hda or hda1 may depend on the image you are using. Also, since Fedora uses an initial ramdisk, you might need to add this line under your kernel line in your config file: ramdisk = "/boot/initrd-2.6.20-2936.fc7xen" Another thing is, notice I am using '' where you used ". I am not sure if it matters, but I think all of my configs have '' instead of " when inside of []s. Finally, you might need to set up a swap partition. If that was necessary, it would probably mean that you need something more like this: disk = [ ''file:/xenroot/linux/linux.xdi,hda1,w'' , ''file:/xenroot/linux/linuxswap.xdi,hda2,w'' ] In this example, the linuxswap.xdi would have to be loop-mounted and formatted as swap. Keep in mind that it has been a long time since I have dealt with a paravirtualized guest, and also I am not even familiar with the xdi extension / type of file you are using / where it came from and what documentation it came with. It may be that something on your linux.xdi image isn''t xen compatible (perhaps the image was made for hvm), though, and that is why I mentioned downloadable xen-ready images (I was running paravirtualized CentOS on an Ubuntu host with xen manually installed [xen xen kernel vs fedora xen kernel or ubuntu xen kernel]). I doubt I come up with any other ideas on your current situation, but if any of these ideas change anything for you, new information might get you some help from someone else. Dustin -----Original Message----- From: Guillaume [mailto:guillaume.chardin@gmail.com] Sent: Friday, October 26, 2007 11:20 To: Dustin.Henning@prd-inc.com Subject: Re: [Fedora-xen] problem creating my 1st VM 2007/10/26, Dustin Henning <Dustin.Henning@prd-inc.com>:> It has been a while since I have used a paravirtualized vm, so myresponses> will be vague, but perhaps helpful. > Regarding your original install, both previous responses made good points. > However, I thought some additional explanation might be helpful: > a) > -The kernel line you put in your config makes your vm boot that kernel(the> one on your local disk), so you are already using a xen kernel to bootthat> vm.Is there a problem by using the kernel use to boot up the system (Dom0) ? If I understand, you mean that I have to use a kernel dedicated to boot all DomU ! Why, is there some limitation by using this kernel (Dom0) for running VM ?> -There are ready made xen compatible installs of OSes on disk images > available for download at various places, you should be able to find > instructions on how to get thee images into your vm''s virtual drive aswell. Ok, but I want first, understand how Xen works, and then, i''ll get theses files. I prefer to learn by getting rid of theses problem before, its a godd formation i think. And i tought too, it''s more quick to use ready-to-use Xen images files. Thanks for your time :) -- Guillaume
2007/10/26, Guillaume <guillaume.chardin@gmail.com>:> Hi list, > I'' trying to create my first vm with Xen, and I experience some problems. > I follow some How to''s and xen docs to build my own config file, but > maybe, there are some errors inside it. > I have the following problem, after i start my guest domain, the > kernel boot & then a kernel panic is displayed : > > VFS: Cannot open root device "hda1" or unknown-block(0,0) > Please append a correct "root=" boot option > Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)For this problem, it seems that no reference to scsi is made during DomU boot. Maybe SCSI support is loaded with the initrd image. Is there a way to give arguments in VM config file to use any initrd image ? Or I have to "recompile" the kernel and set generic scsi support not in module ! --- Guillaume
In the e-mail I just sent, I showed an example for using initrd. Try that. However, the virtual hda should not be detected as a generic scsi device, it should be detected as a generic ide device. A virtual sda might be detected as a scsi device, but I don''t know if you can even do that in a paravirtualized environment (I think you can in an HVM, but the virtual BIOS won''t boot to a scsi device in that situation). The unknown block device error could be happening because the xdi file is "partitioned" and should be connected as hda (as previously suggested by another member and again by myself in my previous [just sent] e-mail) instead of hda1. If that is the case, you wouldn''t be able to also add an hda2 and might have to use hdb1 if you need additional partitions / drives on your vm, but if it is "partitioned" it likely has a swap partition anyway. Dustin -----Original Message----- From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Guillaume Sent: Friday, October 26, 2007 11:50 To: fedora-xen@redhat.com Subject: [Fedora-xen] Re: problem creating my 1st VM 2007/10/26, Guillaume <guillaume.chardin@gmail.com>:> Hi list, > I'' trying to create my first vm with Xen, and I experience some problems. > I follow some How to''s and xen docs to build my own config file, but > maybe, there are some errors inside it. > I have the following problem, after i start my guest domain, the > kernel boot & then a kernel panic is displayed : > > VFS: Cannot open root device "hda1" or unknown-block(0,0) > Please append a correct "root=" boot option > Kernel panic - not syncing: VFS: Unable to mount root fs onunknown-block(0,0) For this problem, it seems that no reference to scsi is made during DomU boot. Maybe SCSI support is loaded with the initrd image. Is there a way to give arguments in VM config file to use any initrd image ? Or I have to "recompile" the kernel and set generic scsi support not in module ! --- Guillaume -- Fedora-xen mailing list Fedora-xen@redhat.com https://www.redhat.com/mailman/listinfo/fedora-xen
> In the e-mail I just sent, I showed an example for using initrd. > Try that.Sorry, but I just get your message after I mine :) I try your tips, and it seems to work... The initrd image is loaded and... I have a new error message. I''ll investigate on it asap, but for this week its over :)>However, the virtual hda should not be detected as a generic scsi > device, it should be detected as a generic ide device. A virtual sda might > be detected as a scsi device, but I don''t know if you can even do that in a > paravirtualized environment (I think you can in an HVM, but the virtual BIOS > won''t boot to a scsi device in that situation).I''ll try the "hda option" next time. For information about my xdi file, i create it with dd, mount it as a loop device, format it with ext3 FS and after copy my "/" on it. I choose use xdi extension on my own, but its stand for "Xen Disk Image". Its not related with any other ext. Bye :) -- Guillaume
Since your xdi file is mounted loop and formatted ext3, it isn''t partitioned, so hda1 is probably the way to go. It won''t hurt to try it as hda instead of hda1, but I don''t expect that to help. Good luck determining your new problem. Downloading a xen-ready fedora image from someone might be what it takes to fix it, though, something from your real / filesystm might not be compatible with the paravirtualized environment and might be trying to access things that don''t exist in said environment. I am not sure on that, but if documentation suggested it, I would think it would work. Dustin -----Original Message----- From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Guillaume Sent: Friday, October 26, 2007 12:31 To: fedora-xen@redhat.com Subject: Re: [Fedora-xen] Re: problem creating my 1st VM> In the e-mail I just sent, I showed an example for using initrd. > Try that.Sorry, but I just get your message after I mine :) I try your tips, and it seems to work... The initrd image is loaded and... I have a new error message. I''ll investigate on it asap, but for this week its over :)>However, the virtual hda should not be detected as a generic scsi > device, it should be detected as a generic ide device. A virtual sda might > be detected as a scsi device, but I don''t know if you can even do that ina> paravirtualized environment (I think you can in an HVM, but the virtualBIOS> won''t boot to a scsi device in that situation).I''ll try the "hda option" next time. For information about my xdi file, i create it with dd, mount it as a loop device, format it with ext3 FS and after copy my "/" on it. I choose use xdi extension on my own, but its stand for "Xen Disk Image". Its not related with any other ext. Bye :) -- Guillaume -- Fedora-xen mailing list Fedora-xen@redhat.com https://www.redhat.com/mailman/listinfo/fedora-xen