Hi all, I''m new on xen and I''m sure this is gonna be a "stupid" question. I have a Fedora 16 with a working xen: [root@minicloud merda]# xm info host : minicloud.di.unipmn.it release : 3.3.7-1.fc16.x86_64 version : #1 SMP Tue May 22 13:59:39 UTC 2012 machine : x86_64 nr_cpus : 4 nr_nodes : 1 cores_per_socket : 4 threads_per_core : 1 cpu_mhz : 2400 hw_caps : bfebfbff:20100800:00000000:00000940:0000e3bd:00000000:00000001:00000000 virt_caps : hvm total_memory : 4094 free_memory : 717 free_cpus : 0 xen_major : 4 xen_minor : 1 xen_extra : .2 xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : unavailable xen_commandline : placeholder cc_compiler : gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC) cc_compile_by : mockbuild cc_compile_domain : phx2.fedoraproject.org cc_compile_date : Mon May 7 23:28:57 UTC 2012 xend_config_format : 4 [root@minicloud merda]# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 3326 4 r----- 28.0 Unfortunately, it''s all day long than I''m fighting with a very simple problem: try to make a ttylinux (or any other small linux distro) up and running over Xen. I saw many config files which "xm create -c" says they are wrong (for example: Error: Cannot find kernel "/boot/vmlinuz-2.6-xenU" -- or it is missing the initrd file...). Moreover the ttylinux (from its web page) comes with an "iso" file and many tutorials are not using this kind of file. So, I would ask if you know some place (tutorial/blog) where I can find the very basic steps in order to accomplish my task. I do not care about ttylinux, I just want a very simple example. Thanks for your time and sorry again for the question. Massimo
El 08/06/12 10:44, Massimo Canonico escribió:> Unfortunately, it''s all day long than I''m fighting with a very simple > problem: try to make a ttylinux (or any other small linux distro) up and > running over Xen. > > I saw many config files which "xm create -c" says they are wrong (for > example: Error: Cannot find kernel "/boot/vmlinuz-2.6-xenU" -- or it is > missing the initrd file...). Moreover the ttylinux (from its web page) > comes with an "iso" file and many tutorials are not using this kind of > file.In the most "simple" case, the config file instructs Xen to read the kernel and initrd form Dom0 (your host system), via a path. If the file is not on the disk, it will fail with that error message. Extract your ttylinux''s kernel and initrd, place them somewhere under your Dom0, make sure the VM config file has the correct path to them. Please note that the kernel need to have Xen support. Before 3.0, it''s not the same kernel you would use to boot on a baremetal machine.> So, I would ask if you know some place (tutorial/blog) where I can find > the very basic steps in order to accomplish my task. I do not care about > ttylinux, I just want a very simple example.It has been boarded a few days ago, here is a reference: http://www.gossamer-threads.com/lists/xen/users/246910 (not sure if there is a more oficial source of this mailing list archive) -- Alexandre Kouznetsov
Hi, On 06/08/2012 06:47 PM, Alexandre Kouznetsov wrote:> El 08/06/12 10:44, Massimo Canonico escribió: > > Extract your ttylinux''s kernel and initrd, place them somewhere under > your Dom0, make sure the VM config file has the correct path to them. > Please note that the kernel need to have Xen support. Before 3.0, it''s > not the same kernel you would use to boot on a baremetal machine.How can I extract a kernel/initdr from the ttylinux? Thanks, Massimo> >> So, I would ask if you know some place (tutorial/blog) where I can find >> the very basic steps in order to accomplish my task. I do not care about >> ttylinux, I just want a very simple example. > It has been boarded a few days ago, here is a reference: > http://www.gossamer-threads.com/lists/xen/users/246910 > (not sure if there is a more oficial source of this mailing list archive) >
El 11/06/12 03:35, Massimo Canonico escribió:> Hi, > > On 06/08/2012 06:47 PM, Alexandre Kouznetsov wrote: >> El 08/06/12 10:44, Massimo Canonico escribió: >> >> Extract your ttylinux''s kernel and initrd, place them somewhere under >> your Dom0, make sure the VM config file has the correct path to them. >> Please note that the kernel need to have Xen support. Before 3.0, it''s >> not the same kernel you would use to boot on a baremetal machine. > How can I extract a kernel/initdr from the ttylinux?That depends on your particular setup. In general terms, you need to mount under Dom0 the root (or /boot, if separated) partition of your DomU, copy the files to Dom0, than unmount the partition. If you post your VM''s .cfg file, it would be possible to give you a more specific hint. Please note, it seems like the setup you are dealing with is not very common. Not a big deal, but the "standard" way is some bit different, and this one does not falls too well under "simplest example". Although, if you get it work, it will be a nice illustration of various aspects of Xen in the nutshell. Little pain, but great didactic value. -- Alexandre Kouznetsov
Alexander, thanks for your reply. Maybe my problem could be summarized with this question: how can I run a VM by using ttylinux image (or other minimal linux distro)? In many website, they propose to download an ttylinux image and then use this config file: kernel="/boot/kernel/xen-3.0.2/vmlinuz-2.6-xenU" memory=64 name="ttylinux" disk=[''file:/boot/ttylinux-5.0/rootfs,sda1,w''] dhcp="dhcp" root="/dev/sda1 ro" extra="4" Unfortunately, this it is not enough (ehre can I find the vmlinux-2.6-xenU required?). So, please, if anyone has a complete example (img + kernel + ramdisk + config file) I would be very happy to see xen able to run a very minimal linux image. Thanks in advance, Massimo On 06/11/2012 06:22 PM, Alexandre Kouznetsov wrote:> El 11/06/12 03:35, Massimo Canonico escribió: >> Hi, >> >> On 06/08/2012 06:47 PM, Alexandre Kouznetsov wrote: >>> El 08/06/12 10:44, Massimo Canonico escribió: >>> >>> Extract your ttylinux''s kernel and initrd, place them somewhere under >>> your Dom0, make sure the VM config file has the correct path to them. >>> Please note that the kernel need to have Xen support. Before 3.0, it''s >>> not the same kernel you would use to boot on a baremetal machine. >> How can I extract a kernel/initdr from the ttylinux? > That depends on your particular setup. In general terms, you need to > mount under Dom0 the root (or /boot, if separated) partition of your > DomU, copy the files to Dom0, than unmount the partition. > > If you post your VM''s .cfg file, it would be possible to give you a > more specific hint. > > Please note, it seems like the setup you are dealing with is not very > common. Not a big deal, but the "standard" way is some bit different, > and this one does not falls too well under "simplest example". > Although, if you get it work, it will be a nice illustration of > various aspects of Xen in the nutshell. Little pain, but great > didactic value. >
On Tue, Jun 12, 2012 at 4:03 PM, Massimo Canonico <mex@di.unipmn.it> wrote:> Maybe my problem could be summarized with this question: how can I run a VM > by using ttylinux image (or other minimal linux distro)?Why not follow the official documentation? http://wiki.xen.org/wiki/Xen_Beginners_Guide It''s actually better to read that if you''re a beginner. Or if you like redhat-based distros, see RHEL5''s virtualization guide: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/Virtualization/index.html I have a somewhat custom, minimal linux kernel + initrd, based on busybox, without the need of a disk image. But I wouldn''t recommend that for beginners. Why, you may ask? Because it''s not worthed: - you need either a specially-compiled kernel (with essential modules built-in), or hijack an existing distro''s kernel (which is usually bloated, thus not really useful for "minimal" setup - busybox''s udhcpc doesn''t work. Or at least, my version keep on failing with checksum errors (static ip works fine though) If your concern is "I don''t want to download a big ISO file", then use a small linux distro (like floppyfw, which comes in a 10M-iso or a floppy disk image), and use the example from the first link to create a HVM domU (i.e. the type of guest needed for non xen-aware OS, including windows and floppyfw). -- Fajar
Hello. El 12/06/12 04:03, Massimo Canonico escribió:> Maybe my problem could be summarized with this question: how can I run a > VM by using ttylinux image (or other minimal linux distro)?Can''t tell, not familiar with ttylinux. It seems to be distributed as ISO image, but your description suggests that it''s a disk image.> In many website, they propose to download an ttylinux image and then use > this config fileMention some URL, maybe there is a small but relevant detail you are missing.> kernel="/boot/kernel/xen-3.0.2/vmlinuz-2.6-xenU"In short, if this file is not on your Dom0 disk, it won''t work.> disk=[''file:/boot/ttylinux-5.0/rootfs,sda1,w'']I believe /boot/ttylinux-5.0/rootfs is a FS image, which you could mount.> Unfortunately, this it is not enough (ehre can I find the > vmlinux-2.6-xenU required?).In short, you need to create a mount point (a empty directory), then try to mount the file as block device. mount -o loop e/boot/ttylinux-5.0/rootfs /your/mountpoint (Consult "man mount" and online documentation, for future reference. If you need more help, you probably wish to ask in some general Linux list) Browse to the dir, locate the kernel and initrd images (if any), copy them to some place within you Dom0, unmount the image. Then fix the reference in in your config, it must point to a real file.> So, please, if anyone has a complete example (img + kernel + ramdisk + > config file) I would be very happy to see xen able to run a very minimal > linux image.Never used this stuff myself, but this looks promising: http://stacklet.com/downloads/images/list/> > On 06/11/2012 06:22 PM, Alexandre Kouznetsov wrote: >> El 11/06/12 03:35, Massimo Canonico escribió: >>> Hi, >>> >>> On 06/08/2012 06:47 PM, Alexandre Kouznetsov wrote: >>>> El 08/06/12 10:44, Massimo Canonico escribió: >>>> >>>> Extract your ttylinux''s kernel and initrd, place them somewhere under >>>> your Dom0, make sure the VM config file has the correct path to them. >>>> Please note that the kernel need to have Xen support. Before 3.0, it''s >>>> not the same kernel you would use to boot on a baremetal machine. >>> How can I extract a kernel/initdr from the ttylinux? >> That depends on your particular setup. In general terms, you need to >> mount under Dom0 the root (or /boot, if separated) partition of your >> DomU, copy the files to Dom0, than unmount the partition. >> >> If you post your VM''s .cfg file, it would be possible to give you a >> more specific hint. >> >> Please note, it seems like the setup you are dealing with is not very >> common. Not a big deal, but the "standard" way is some bit different, >> and this one does not falls too well under "simplest example". >> Although, if you get it work, it will be a nice illustration of >> various aspects of Xen in the nutshell. Little pain, but great >> didactic value. >> > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users