My users'' VM disks are all loopback files. Right now they have to run losetup on each of their files before starting their VMs. This means we have to statically allocate loopback devices. And if they want to change the disks used they have to remember to run "losetup -d". Is there any way, without my writing extra glue logic, for a user to say in his config file "these are my loopback files, I don''t care what loopback devices they get bound to, just bind them for me and then start my VM"? Thanks. -Kip ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> My users'' VM disks are all loopback files. Right now they have to run > losetup on each of their files before starting their VMs. This means > we have to statically allocate loopback devices. And if they want to > change the disks used they have to remember to run "losetup -d". Is > there any way, without my writing extra glue logic, for a user to say > in his config file "these are my loopback files, I don''t care what > loopback devices they get bound to, just bind them for me and then > start my VM"?Check out the ''file:'' syntax for specifying vbd''s. Ian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
That allows me to bypass the losetup, but what about device allocation? - the examples I see all look like disk = [ ''file:/u/kmacy/mdroot-5.3,loop7,w'' ] What I''d really like is to be able to drop the second parameter, or do something like disk = [ ''file:/u/kmacy/mdroot-5.3,*,w'' ] -Kip On Fri, 11 Mar 2005 21:55:39 -0000, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:> > > My users'' VM disks are all loopback files. Right now they have to run > > losetup on each of their files before starting their VMs. This means > > we have to statically allocate loopback devices. And if they want to > > change the disks used they have to remember to run "losetup -d". Is > > there any way, without my writing extra glue logic, for a user to say > > in his config file "these are my loopback files, I don''t care what > > loopback devices they get bound to, just bind them for me and then > > start my VM"? > > Check out the ''file:'' syntax for specifying vbd''s. > > Ian >------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> That allows me to bypass the losetup, but what about device > allocation? - the examples I see all look like > disk = [ ''file:/u/kmacy/mdroot-5.3,loop7,w'' ]file: does do the loop device allocation. The second parameter is the device you want the vbd to appear in the guest as, i.e. usually sda1 or hda1. Ian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
I was confused by the fact that xm insists on it being present in DOM0. disk = [ ''file:/u/kmacy/mdroot-5.3,xbd0,w'' ] kmacy@shemp sh -x ~/xentmp/xenargs.shemp + xm create -f /u/kmacy/xentmp/freebsd.shemp -c name=xen-vm2.lab.netapp.com vmid=10 kernel=/u/kmacy/kernel Using config file "/u/kmacy/xentmp/freebsd.shemp". Error: Error creating domain: vbd: Device not found: xbd0 Thanks. -Kip On Fri, 11 Mar 2005 22:09:04 -0000, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:> > That allows me to bypass the losetup, but what about device > > allocation? - the examples I see all look like > > disk = [ ''file:/u/kmacy/mdroot-5.3,loop7,w'' ] > > file: does do the loop device allocation. The second parameter is the > device you want the vbd to appear in the guest as, i.e. usually sda1 or > hda1. > > Ian >------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Mark Williamson
2005-Mar-12 01:04 UTC
Re: [Xen-devel] dynamically allocating loopback devices?
> I was confused by the fact that xm insists on it being present in DOM0. > > disk = [ ''file:/u/kmacy/mdroot-5.3,xbd0,w'' ] > > kmacy@shemp sh -x ~/xentmp/xenargs.shemp > + xm create -f /u/kmacy/xentmp/freebsd.shemp -c > name=xen-vm2.lab.netapp.com vmid=10 kernel=/u/kmacy/kernel > Using config file "/u/kmacy/xentmp/freebsd.shemp". > Error: Error creating domain: vbd: Device not found: xbd0That''s because it used to stat the device node in dom0 so that it would know what major / minor to tell the domain to use. Xend has since been patched to not require this, I''m not sure what trees it was checked into, though Cheers, Mark> Thanks. > > -Kip > > On Fri, 11 Mar 2005 22:09:04 -0000, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>wrote:> > > That allows me to bypass the losetup, but what about device > > > allocation? - the examples I see all look like > > > disk = [ ''file:/u/kmacy/mdroot-5.3,loop7,w'' ] > > > > file: does do the loop device allocation. The second parameter is the > > device you want the vbd to appear in the guest as, i.e. usually sda1 or > > hda1. > > > > Ian > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xen-devel------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Mark Williamson
2005-Mar-12 01:25 UTC
Re: [Xen-devel] dynamically allocating loopback devices?
> Ahh - makes sense. It is, however, a rather linux-centric approach.Yep! How do you get Xend to tell FreeBSD what disks to expect? I imagine this''ll get fixed in the new tools. It would be rather straightforward to extend the code in Xend to support other numbering schemes, so maybe it''ll get fixed sooner than that. Cheers, Mark ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> That''s because it used to stat the device node in dom0 so that it would know > what major / minor to tell the domain to use. Xend has since been patched to > not require this, I''m not sure what trees it was checked into, though > > Cheers, > MarkAhh - makes sense. It is, however, a rather linux-centric approach. -Kip ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> > That''s because it used to stat the device node in dom0 so > that it would know > > what major / minor to tell the domain to use. Xend has > since been patched to > > not require this, I''m not sure what trees it was checked > into, though > > Ahh - makes sense. It is, however, a rather linux-centric approach.It sucks. The obvious thing to do would be to pass a string, that the guest then looks up, but I seem to recall that doing this at boot time was rather ugly on linux. In the meantime, I''ll take a patch that adds some well known *BSD devices to the exception table in xend. Ian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel