[Openstack] boot from ISO

Michaël Van de Borne michael.vandeborne at cetic.be
Thu Mar 29 14:30:52 UTC 2012


Hi Donal,

Still about this good old 'Boot From ISO' feature inside the XenAPI: I 
packaged a custom netinstall.iso image which boots and installs the OS 
with kickstart. So that everything is custom and in 5minutes, I've got a 
complete running brand new machine freshly installed that has booted 
from the CDROM. But then at the end of install process, I ask kickstart 
to reboot the machine so that I can enjoy the new install.

But the ISO image remains attached and the VM reboots again on the ISO.

So, my question: Is it possible to automatically (using the API) empty 
CD drive every time a VM that's been booted from ISO reboots? If not, is 
it possible to change boot order when rebooting?

thanks



Le 02/12/11 11:44, Donal Lafferty a écrit :
>
> The background is that having provided a sample implementation, 
> developers targeting libvirt would offer the same functionality.
>
> DL
>
> *From:*Michaël Van de Borne [mailto:michael.vandeborne at cetic.be]
> *Sent:* 01 December 2011 16:34
> *To:* Anne Gentle
> *Cc:* Donal Lafferty; openstack at lists.launchpad.net
> *Subject:* Re: [Openstack] boot from ISO
>
> That's right, it's a Xen*Server* only feature. I insist on XenServer 
> because it's been implemented only inside the xenapi.
> If you wish to manage VMs using KVM or Xen hypervisor (the community 
> hypervisor packaged in Linux distributions), this will utilize the 
> libvirt API, and not XenAPI.
>
> So, one needs to use XenServer (btw, openstack works great with 
> XenServer 6.0 even if documentation claims that the supported release 
> is 5.5 
> <http://docs.openstack.org/diablo/openstack-compute/admin/content/hypervisors.html>) 
> in order for the XenAPI to be used.
>
> I made use of this documentation 
> <http://wiki.openstack.org/XenServerDevelopment> in order to set up 
> the environement. What is missing is that, in order to activate the 
> "Boot From ISO <http://wiki.openstack.org/bootFromISO>" feature, the 
> SR elements on XenServer host must be configured that way:
>
> 1. create an ISO-typed SR, such as an NFS ISO library, for instance. 
> For this, using XenCenter is pretty easy. You need to export an NFS 
> volume from a remote NFS server. Make sure it is exported in RW mode.
> 2. on the host, find the uuid of this ISO SR:
> # xe host-list
> write the uuid down
> 3. # xe sr-list content-type=iso
> locate the uuid of the NFS ISO library
> 4. # xe sr-param-set uuid=<iso sr uuid> 
> other-config:i18n-key=local-storage-iso
> Even if an NFS mount point isn't local storage, you must specify 
> "local-storage-iso".
> 5. # xe pbd-list sr-uuid=<iso sr uuid>
> make sure the host-uuid from "xe pbd-list" equals the uuid of the host 
> you found at step 2
>
> then apply the rest of the tutorial 
> <http://wiki.openstack.org/XenServerDevelopment#Configure_SR_storage> 
> and publish an ISO image this way:
> glance add name=fedora_iso disk_format=iso container_format=bare < 
> Fedora-16-x86_64-netinst.iso
> nova boot test_iso --flavor <flavor ID> --image <image ID>
>
> I've posted this in the bug you filed, Anne.
>
> By the way, I'm going to work on porting this feature on libvirt API 
> and VMWare API (if nobody works on it yet).
>
> Is the config drive yet available for Diablo??
>
> cheers,
>
> michaël
>
>
> Michaël Van de Borne
> R&D Engineer, SOA team, CETIC
> Phone: +32 (0)71 49 07 45 Mobile: +32 (0)472 69 57 16, Skype: mikemowgli
> www.cetic.be  <http://www.cetic.be>, rue des Frères Wright, 29/3, B-6041 Charleroi
>
>
> Le 01/12/11 16:29, Anne Gentle a écrit :
>
> Thanks for the info! I've logged bug 898682 [1] to ensure it gets
> added to the documentation. Based on this note, is this a solution for
> Xen only?
>   
> Is this the same as using a config drive? I had heard a config drive
> works on KVM but not Xen.
>   
>   If someone who's familiar with this area could work on the docs that
> would be great.
>   
> Thanks,
> Anne
>   
> [1]https://bugs.launchpad.net/openstack-manuals/+bug/898682
>   
> On Thu, Dec 1, 2011 at 9:14 AM, Michaël Van de Borne
> <michael.vandeborne at cetic.be>  <mailto:michael.vandeborne at cetic.be>  wrote:
>
>     It finally works. The problem was the flag checks while looking for the ISO
>
>     SR.
>
>       
>
>     inside the find_iso_sr method (in nova/virt/xenapi/vm_utils.py), I found
>
>     that the ISO SR must have these settings:
>
>     content type: iso
>
>     other-config:i18n-key=local-storage-iso
>
>       
>
>     As far as I know, this wasn't documented anywhere. Hope this can be useful
>
>     for people from the future.
>
>       
>
>     cheers,
>
>       
>
>       
>
>     michaël
>
>       
>
>       
>
>     Michaël Van de Borne
>
>     R&D Engineer, SOA team, CETIC
>
>     Phone: +32 (0)71 49 07 45 Mobile: +32 (0)472 69 57 16, Skype: mikemowgli
>
>     www.cetic.be  <http://www.cetic.be>, rue des Frères Wright, 29/3, B-6041 Charleroi
>
>       
>
>       
>
>     Le 29/11/11 23:10, Donal Lafferty a écrit :
>
>       
>
>     Off the top of my head, I'd look to see if the compute node can see that ISO
>
>     SR.
>
>       
>
>       
>
>       
>
>     DL
>
>       
>
>       
>
>       
>
>       
>
>       
>
>     From: Michaël Van de Borne [mailto:michael.vandeborne at cetic.be]
>
>     Sent: 29 November 2011 18:15
>
>     To: Donal Lafferty;openstack at lists.launchpad.net  <mailto:openstack at lists.launchpad.net>
>
>     Subject: Re: [Openstack] boot from ISO
>
>       
>
>       
>
>       
>
>     Hi Donal, hi all,
>
>       
>
>     I'm trying to test the Boot From ISO feature. So I've set a XenServer host
>
>     and installed a Ubuntu 11.10 PV DomU in it.
>
>       
>
>     Then I used the following commands but, as you can see in the attached
>
>     nova-compute log excerpt, there was a problem.
>
>       
>
>     glance add name=fedora_iso disk_format=iso<
>
>     ../Fedora-16-x86_64-Live-LXDE.iso
>
>     ID: 4
>
>     nova boot test_iso --flavor 2 --image 4
>
>       
>
>     I can see the ISO images using "nova list" but not using "glance index".
>
>       
>
>     The error seems to be: 'Cannot find SR of content-type ISO'. However, I've
>
>     set a NFS ISO Library using XenCenter, so that there is an actual ISO
>
>     content-typed SR. How to tell OpenStack to use this SR for the ISO images I
>
>     post using glance?
>
>       
>
>     Any clue? I feel I'm rather close to make it work.
>
>       
>
>       
>
>     thanks,
>
>       
>
>     michaël
>
>       
>
>       
>
>       
>
>     Michaël Van de Borne
>
>       
>
>     R&D Engineer, SOA team, CETIC
>
>       
>
>     Phone: +32 (0)71 49 07 45 Mobile: +32 (0)472 69 57 16, Skype: mikemowgli
>
>       
>
>     www.cetic.be  <http://www.cetic.be>, rue des Frères Wright, 29/3, B-6041 Charleroi
>
>       
>
>       
>
>     Le 22/11/11 00:18, Donal Lafferty a écrit :
>
>       
>
>     Hi Michaël,
>
>       
>
>       
>
>       
>
>     "Boot from ISO" should be ISO image agnostic.  The feature overcomes
>
>     restrictions placed on the  distribution of modified Windows' images.
>
>     People can use their ISO instead, but they may still need to use dedicated
>
>     hardware.
>
>       
>
>       
>
>       
>
>     You should have no problem with a Linux distribution.
>
>       
>
>       
>
>       
>
>     However, I wrote it for XenAPI, so we need someone to duplicate the work for
>
>     KVM and VMWare.
>
>       
>
>       
>
>       
>
>     DL
>
>       
>
>       
>
>       
>
>       
>
>       
>
>     From:openstack-bounces+donal.lafferty=citrix.com at lists.launchpad.net  <mailto:openstack-bounces+donal.lafferty=citrix.com at lists.launchpad.net>
>
>     [mailto:openstack-bounces+donal.lafferty=citrix.com at lists.launchpad.net] On
>
>     Behalf Of Michaël Van de Borne
>
>     Sent: 21 November 2011 17:28
>
>     To:openstack at lists.launchpad.net  <mailto:openstack at lists.launchpad.net>
>
>     Subject: Re: [Openstack] boot from ISO
>
>       
>
>       
>
>       
>
>     up? anybody?
>
>       
>
>       
>
>     Le 14/11/11 14:44, Michaël Van de Borne a écrit :
>
>       
>
>     Hi all,
>
>       
>
>     I'm very interested in the "Boot From ISO" feature described here:
>
>     http://wiki.openstack.org/bootFromISO
>
>       
>
>     In a few words, it's about the ability to boot a VM from the CDROM with an
>
>     ISO image attached. A blank hard disk being attached to install the OS files
>
>     in it.
>
>       
>
>     I've got some questions about this:
>
>     1. Is the feature available today using a standard Diablo install? I've seen
>
>     the code about this feature is stored under nova/tests and glance/tests.
>
>     Does this mean it isn't finished yet and could only be tested under specific
>
>     conditions? Which ones?
>
>     2. the spec tells about a Windows use case. Why just Windows? What should I
>
>     do to test with a Linux distribution?
>
>     3. I can see here that the Xen hypervisor only has been impacted by the
>
>     source code changes. Are KVM and VMWare planned to be supported in the
>
>     future? May I help/be helped to develop KVM and VMWare support for this
>
>     'Boot From Iso' feature?
>
>       
>
>     Any help appreaciated
>
>       
>
>     thank you,
>
>       
>
>       
>
>     michaël
>
>       
>
>       
>
>       
>
>       
>
>     --
>
>       
>
>     Michaël Van de Borne
>
>       
>
>     R&D Engineer, SOA team, CETIC
>
>       
>
>     Phone: +32 (0)71 49 07 45 Mobile: +32 (0)472 69 57 16, Skype: mikemowgli
>
>       
>
>     www.cetic.be  <http://www.cetic.be>, rue des Frères Wright, 29/3, B-6041 Charleroi
>
>       
>
>       
>
>       
>
>       
>
>       
>
>     _______________________________________________
>
>       
>
>     Mailing list:https://launchpad.net/~openstack  <https://launchpad.net/%7Eopenstack>
>
>       
>
>     Post to     :openstack at lists.launchpad.net  <mailto:openstack at lists.launchpad.net>
>
>       
>
>     Unsubscribe :https://launchpad.net/~openstack  <https://launchpad.net/%7Eopenstack>
>
>       
>
>     More help   :https://help.launchpad.net/ListHelp
>
>       
>
>       
>
>     _______________________________________________
>
>     Mailing list:https://launchpad.net/~openstack  <https://launchpad.net/%7Eopenstack>
>
>     Post to     :openstack at lists.launchpad.net  <mailto:openstack at lists.launchpad.net>
>
>     Unsubscribe :https://launchpad.net/~openstack  <https://launchpad.net/%7Eopenstack>
>
>     More help   :https://help.launchpad.net/ListHelp
>
>       
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120329/faca6356/attachment.html>


More information about the Openstack mailing list