Bug #2252
Guest XML incorrect for CDROM images in a ceph datastore
| Status: | Closed | Start date: | 07/31/2013 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | Core & System | |||
| Target version: | Release 4.4 | |||
| Resolution: | fixed | Pull request: | ||
| Affected Versions: | OpenNebula 4.2 |
Description
Assuming you have a ceph datastore set up, you can create an image from cdrom in the ceph pool, with the following command:
oneimage create -d ceph_datastore --name my_cdrom --type cdrom --path /tmp/my_cdrom.iso
However, when you try to use this cdrom image with a guest the guest creation fails:
onevm create -n guest1 --cpu 1 --vcpu 1 --memory 512 --disk my_hdd,my_cdrom
The xml for the CDROM image references a nonexistent file associated with the VM, rather than a network rbd source.
Compare the rbd 'os' disk with the 'cdrom' disk here:
<disk type='network' device='disk'>
<source protocol='rbd' name='one/one-16'/>
<target dev='vda'/>
<driver name='qemu' type='raw' cache='writethrough'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/var/lib/one//datastores/0/88/disk.1'/>
<target dev='hda'/>
<readonly/>
<driver name='qemu' type='raw' cache='writethrough'/>
</disk>
I manually edited the cdrom section of this xml and used it to create a vm with 'libvirt create':
<disk type='network' device='cdrom'>
<source protocol='rbd' name='one/one-23'/>
<target dev='hda'/>
<readonly/>
<driver name='qemu' type='raw' cache='writethrough'/>
</disk>
and the guest can successfully see the cdrom image.
Associated revisions
Bug #2252: Guest XML incorrect for CDROM images in a ceph datastore
Also prepare a new DiskType for Gluster, which might be useful in the future
History
#1
Updated by Ruben S. Montero almost 8 years ago
- Category set to Core & System
- Status changed from Pending to New
- Assignee set to Jaime Melis
- Target version set to Release 4.4
Thanks for the great feedback!
#2
Updated by Ruben S. Montero almost 8 years ago
The idea is to add a new disk type: RBD-CDROM. The disk type is derived from the ImageType and the DiskType of the Datastore.
#3
Updated by Ruben S. Montero over 7 years ago
- Status changed from New to Closed
- Resolution set to fixed