Stefan Kooman <[email protected]> writes: > Quoting Daniel Dehennin ([email protected]): >> Daniel Dehennin <[email protected]> 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:
#+begin_src
OS=[ARCH="x86_64",BOOT="hd"]
RAW=[DATA="
<os>
<boot dev='cdrom'/>
</os>
",TYPE="kvm"]
#+end_src
This result in the following xml:
#+begin_src
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>one-20</name>
<cputune>
<shares>512</shares>
</cputune>
<memory>1048576</memory>
<os>
<type arch='x86_64'>hvm</type>
<boot dev='hd'/>
</os>
<devices>
<emulator>/usr/bin/kvm</emulator>
<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>
<disk type='file' device='cdrom'>
<source file='/var/lib/one//datastores/100/20/disk.1'/>
<target dev='hda'/>
<readonly/>
<driver name='qemu' type='raw' cache='default'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/var/lib/one//datastores/100/20/disk.2'/>
<target dev='hdb'/>
<readonly/>
<driver name='qemu' type='raw'/>
</disk>
<interface type='bridge'>
<source bridge='vswitch'/>
<virtualport type='openvswitch'/>
<mac address='02:00:ac:10:2a:65'/>
<model type='virtio'/>
</interface>
<graphics type='vnc' listen='0.0.0.0' port='5920' keymap='fr'/>
<input type='tablet' bus='usb'/>
</devices>
<features>
<acpi/>
</features>
<os>
<boot dev='cdrom'/>
</os>
</domain>
#+end_src
In that case the VM try to boot on hard drive first and then CDROM.
Regards.
--
Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6 2AAD CC1E 9E5B 7A6F E2DF
signature.asc
Description: PGP signature
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
