Dear all, I did play a little bit the with demo CD, but since RH is not really my cup of tea, I wanted to try to run it "from the source". I was able without much effort to successfully build a "hosted" 2.4.22 kernel from the xeno source. Unfortunatly, dumb me, I''ve not been able to find out how to build the "hosting" kernel. Well, maybe I got it plain wrong and xenolinux will run on a standard kernel ?? Could somebody please point me to the right way ? Thanks. -- Nicolas Bougues Axialys Interactive ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Thu, 2003-10-09 at 16:26, Nicolas Bougues wrote:> Dear all, > > I did play a little bit the with demo CD, but since RH is not really > my cup of tea, I wanted to try to run it "from the source". > > I was able without much effort to successfully build a "hosted" 2.4.22 > kernel from the xeno source. > > Unfortunatly, dumb me, I''ve not been able to find out how to build the > "hosting" kernel. Well, maybe I got it plain wrong and xenolinux will > run on a standard kernel ?? > > Could somebody please point me to the right way ?the "hosting kernel" is the virtual machine monitor (or hypervisor) Xen. You can build it from source by typing ''make'' in the xen directory of the source distro. The readme should contain information on how to set up grub to boot xen and the first virtual machine (domain 0) running xenolinux. HTH Rolf> Thanks.------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Thu, Oct 09, 2003 at 04:38:17PM +0100, Rolf Neugebauer wrote:> the "hosting kernel" is the virtual machine monitor (or hypervisor) Xen. > You can build it from source by typing ''make'' in the xen directory of > the source distro. > > The readme should contain information on how to set up grub to boot xen > and the first virtual machine (domain 0) running xenolinux. >Thanks Rolf, it works very fine. I''m now struggling with another stupid bit : I don''t seem to be able to mount a vbd device in domain 0. I was able to create the vd, but the java source doesn''t seem to allow to mount a vbd in domain 0. For a good reason, probably. What I''m trying to do is basically : - create a virtual drive - populate it with a live linux fs and distro (from domain 0) - booting a xenolinux on this virtual drive I have another, more general question : why are the tools based on a java front end ? As far as I understand, the java stuff just calls the low level C stuff. The java build and runtime environnement looks even uglier, when in presence of the nice Xen "do it light and fast" stuff. -- Nicolas Bougues Axialys Interactive ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Fri, 2003-10-10 at 14:04, Nicolas Bougues wrote:> On Thu, Oct 09, 2003 at 04:38:17PM +0100, Rolf Neugebauer wrote: > > the "hosting kernel" is the virtual machine monitor (or hypervisor) Xen. > > You can build it from source by typing ''make'' in the xen directory of > > the source distro. > > > > The readme should contain information on how to set up grub to boot xen > > and the first virtual machine (domain 0) running xenolinux. > > > > Thanks Rolf, it works very fine. > I''m now struggling with another stupid bit : I don''t seem to be able > to mount a vbd device in domain 0. I was able to create the vd, but > the java source doesn''t seem to allow to mount a vbd in domain 0. For > a good reason, probably.I attached an email by Ian Pratt to sven kretzschmar from yesterday providing some details. I haven''t actually tried this myself> What I''m trying to do is basically : > - create a virtual drive > - populate it with a live linux fs and distro (from domain 0) > - booting a xenolinux on this virtual drivethis should be possible> I have another, more general question : why are the tools based on a > java front end ? As far as I understand, the java stuff just calls the > low level C stuff. The java build and runtime environnement looks even > uglier, when in presence of the nice Xen "do it light and fast" stuff.there is a lower level interface with tools called xi_*. you could use them (I normally do). xenctl is a wrapper around these but also keeps some state and default values around. The idea is that the xi_* tools might change if the domain0 control interface changes but that the xenctl interface will be more stable. It''s really up to you what you use. Rolf ---- start of attached email From: Ian Pratt <Ian.Pratt@cl.cam.ac.uk> To: sven.kretzschmar@gmx.de Cc: keir.fraser@cl.cam.ac.uk, xen-devel@lists.sourceforge.net, Ian.Pratt@cl.cam.ac.uk Subject: Re: [Xen-devel] Re:Trying to get HyperSCSI and Xen to work... ;-) Date: Thu, 09 Oct 2003 22:50:39 +0100> 1.) Is it possible to access the created vd (virtual disk) or thecreated> vbd (virtual block device) _without_ booting and logging in to domain1 ??> I have found no way to access either the created vd or vbd in domain 0 > in order to create a filesystem on it and to fill it with somethingusefull. You should be able to use "xenctl vdb create -k<key> -v0 -w -n0" to make the virtual block device accessible from domain0 as /dev/xvda (major 125, minor 0 -- use tools/misc/xen-mkdevnodes if the device doesn''t exist) I haven''t tried this in a while, but it should work unless it got accidentally broken when the "xenctl physical grant" stuff got added.> 2.) Is it possible to boot domains > 1 from a vbd (virtual blockdevice)> which is defined as the root device in the kernel command line ?Yes, e.g. root=/dev/xvdb3 (4th attached vbd, 3rd partition). See xenolinux-2.4.22/init/do_mounts.c for the grim way that Linux selects boot devices.> 3.) Does the number of the created vbd coresspond to the name of > the block device during boot time of domains > 0, such that, if > the vbd number is 1 then the device name is /dev/xvda1 (according > to the README.CD file) ? > At least in domain 0 I could not find such a device entry before > or after creating the vbd in domain 0 ?The numbering is per domain, i.e. it is controlled by the -vX parameter to "xenctl vbd create". You can connect a virtual disk (vd) as the first vbd in one domain (/dev/xvda) and simultaneously as e.g. the 3rd vbd in another domain (/dev/xvdc). The optional number suffixed to a disk is a PC partition number if present. If you don''t put a partition table on a virtual disk, Linux is pretty good at guessing that you mean the whole device. Hope this helps. Ian ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Fri, Oct 10, 2003 at 04:01:59PM +0100, Rolf Neugebauer wrote:> > > 1.) Is it possible to access the created vd (virtual disk) or the > created > > vbd (virtual block device) _without_ booting and logging in to domain > 1 ?? > > I have found no way to access either the created vd or vbd in domain 0 > > in order to create a filesystem on it and to fill it with something > usefull. > > You should be able to use "xenctl vdb create -k<key> -v0 -w -n0" > to make the virtual block device accessible from domain0 as > /dev/xvda (major 125, minor 0 -- use tools/misc/xen-mkdevnodes if > the device doesn''t exist) > > I haven''t tried this in a while, but it should work unless it got > accidentally broken when the "xenctl physical grant" stuff got > added. >That''s what I thought. Unfortunatly, it doesn''t work : it says Expected -n<domain_id> because in the java source, it tests that the domain is != 0. I modified the Java so that it accepts 0 as a domain, and what happened was : error: disk number missing followed by an Oops with a NULL pointer dereference. I didn''t dig further, because I thought that it wasn''t suppose to work this way. But since you (well, Ian) implies that it shall work, I''ll try to get into the kernel source to see what''s going on. Any idea welcomed, however :) -- Nicolas Bougues Axialys Interactive ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> because in the java source, it tests that the domain is != 0. > > I modified the Java so that it accepts 0 as a domain, and what > happened was : > > error: disk number missing > > followed by an Oops with a NULL pointer dereference. > > I didn''t dig further, because I thought that it wasn''t suppose to work > this way. But since you (well, Ian) implies that it shall work, I''ll > try to get into the kernel source to see what''s going on. > > Any idea welcomed, however :)Hmm sorry. I''m afraid we tend to use either physical partitions or NFS roots, so the virtual disk stuff doesn''t get exercised much. It used to work... One trick that may help to debug things is that you can attach a physical partition as a block device. i.e. suppose you had an empty partition hda3. You could use ''physical grant'' to enable another domain to access it (dom0 gets access by default). However, you could also attach it to a domain as a virtual block device i.e. xenctl vbd create -phda3 -v0 -w -n0 You could then access the partition as /dev/xvda (in this instance, you probably wouldn''t want to put a partition table on the ''virtual'' disk). Arrgh. I''ve just tried this and get the error message you reported: "Expected -n<domain_id>" I''ve blown away the three obvious lines in ParseVbdCreate.java and retried it, and it seems to work. I didn''t get an Oops: iap10 > xenctl vbd create -p sda14 -v1 -n0 warning: state file not found [/var/lib/xen/vdstate.xml] Created virtual block device 1 for domain 0 XML.dump_state error [/var/lib/xen/vdstate.xml] java.io.FileNotFoundException: /var/lib/xen/vdstate.xml (No such file or directory) iap10 > mount /dev/xvdb /mnt iap10 > ls /mnt anfs/ dev/ home-old/ lib/ misc/ proc/ tmp/ bin/ etc/ homes/ local/ mnt/ root/ usr/ boot/ home@ initrd/ lost+found/ opt/ sbin/ var/ iap10 > [ignore the warnings about /var/lib/xen/vdstate.xml -- I haven''t created any virtual disks] I haven''t been able to try the "virtual disk" stuff as I haven''t a spare partition on my test machine. I''ll make one free if you''re still having problems ;-) Best, Ian ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> I haven''t been able to try the "virtual disk" stuff as I haven''t a > spare partition on my test machine. I''ll make one free if you''re > still having problems ;-)With the 3 lines hacked out of xenctl, I''ve successfully "formatted" a partition to contain virtual disks, created a virtual disk, attached it as a "virtual block device" to domain0, made a file system on it, and even mounted it. Amazingly, the code hasn''t rotted! (other than the java goop) The log is attached, with comments. The UI for the tools isn''t exactly intuitive. The web-based interface was pretty cool until it rotted. Cheers, Ian iap10 > mkdir /var/lib/xen #we need a directory in which the vdstate.xml file will be #created. This keeps track of which chunks of disk space are used #by which virtual disks. iap10 > xenctl partitions add -psda15 -f warning: state file not found [/var/lib/xen/vdstate.xml] Added partition sda15 #''format'' /dev/sda15 to allow it to hold virtual disks. The ''-f'' #option must be given as the type field in the partition table is #not set to some magic value I can''t remember. iap10 > ll /var/lib/xen/vdstate.xml -rw-rw-r-- 1 root user 2373 Oct 10 17:36 /var/lib/xen/vdstate.xml # The vdstate file has been created and initialised with the # ''chunks'' from sda15. I think the default chunk size is 128MB. iap10 > xenctl partitions list maj:min blocks start sect num sects name 1 3:0 439780 0 879560 hda 2 8:0 143358272 0 286716544 sda 3 8:1 56196 63 112392 sda1 4 8:2 8418060 112455 16836120 sda2 5 8:3 8418060 16948575 16836120 sda3 6 8:4 1 33784695 2 sda4 7 8:5 8418028 33784758 16836057 sda5 8 8:6 8418028 50620878 16836057 sda6 9 8:7 8418028 67456998 16836057 sda7 10 8:8 8418028 84293118 16836057 sda8 11 8:9 4208998 101129238 8417997 sda9 12 8:10 4208998 109547298 8417997 sda10 13 8:11 4208998 117965358 8417997 sda11 14 8:12 2104483 126383418 4208967 sda12 15 8:13 2104483 130592448 4208967 sda13 16 8:14 2104483 134801478 4208967 sda14 [ 17 8:15 2104483 139010508 4208967 sda15 ] # The square brackets indicate that this is a virtual disk # partition. Multiple partitions on a disk can contain virtual # disks. iap10 > xenctl vd create -nMyFirstVD -s100000 Virtual Disk created with key: 6838196657 # Create a 100MB partition. This gets rounded up to 128MB because # of our large chunk size. iap10 > xenctl vd show key expiry name size 6838196657 MyFirstVD 128M # List all virtual disks, along with their keys. This VD is # permanent as it doesn''t have an expiry time. (The disk space # belonging to expired VDs is reclaimed in a # least-recently-expired-first fashion, but VDs that haven''t been # reclaimed can be ''refreshed'' to revive them.) iap10 > xenctl vbd create -k6838196657 -v0 -n0 -w Created virtual block device 0 for domain 0 # attach the first virtual block device of domain0 to our virtual # disk. iap10 > mkfs -t ext3 /dev/xvda # make a file system iap10 > mount /dev/xvda /mnt # it all works! ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel