[one-users] creating a template with install cd

Daniel Dehennin daniel.dehennin at baby-gnu.org
Tue May 27 02:17:13 PDT 2014

Stefan Kooman <stefan at bit.nl> writes:

> Quoting Daniel Dehennin (daniel.dehennin at baby-gnu.org):
>> Daniel Dehennin <daniel.dehennin at baby-gnu.org> writes:
>> [...]
>> > Or libvirt, forcing OS=[BOOT="cdrom"] makes it working.
>> I have an issue when setting OS=[BOOT="cdrom"], when the installation is
>> finished, it reboot on the ISO and not the hard drive and I can not
>> detach the ISO.
> Yeah, installing a VM with ONE is a bit cumbersome. The only way I know
> is to shutdown the vm (or delete it, if it's already powered off),
> update the template and re-instantiate. Having the possibility to do
> (offline) attach/detach and changing of boot device would help in
> install scenarios.

I found a solution:

                    <boot dev='cdrom'/>

This result in the following xml:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
                <type arch='x86_64'>hvm</type>
                <boot dev='hd'/>
                <disk type='file' device='disk'>
                        <source file='/var/lib/one//datastores/100/20/disk.0'/>
                        <target dev='vda'/>
                        <driver name='qemu' type='qcow2' cache='default'/>
                <disk type='file' device='cdrom'>
                        <source file='/var/lib/one//datastores/100/20/disk.1'/>
                        <target dev='hda'/>
                        <driver name='qemu' type='raw' cache='default'/>
                <disk type='file' device='cdrom'>
                        <source file='/var/lib/one//datastores/100/20/disk.2'/>
                        <target dev='hdb'/>
                        <driver name='qemu' type='raw'/>
                <interface type='bridge'>
                        <source bridge='vswitch'/>
                        <virtualport type='openvswitch'/>
                        <mac address='02:00:ac:10:2a:65'/>
                        <model type='virtio'/>
                <graphics type='vnc' listen='' port='5920' keymap='fr'/>
                <input type='tablet' bus='usb'/>

                <boot dev='cdrom'/>


In that case the VM try to boot on hard drive first and then CDROM.


Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6  2AAD CC1E 9E5B 7A6F E2DF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 359 bytes
Desc: not available
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140527/023b29f2/attachment.pgp>

More information about the Users mailing list