[one-users] VM template disk type cdrom
florian chazal
florianchazal at gmail.com
Tue May 18 04:56:20 PDT 2010
Hi,
Is it normal that when you create a virtual machine and you configure one of
its disk as a cdrom :
#########Open nebula VM Template #########
...
OS = [ BOOT = \"cdrom\" ]
...
DISK = [ TYPE = "cdrom" ,
SOURCE = "/srv/cloud/one/IM_template/debian-504-i386-netinst.iso" ,
TARGET = "hdc" ,
CLONE = "no" ,
SAVE = "no" ,
READONLY = "no" ]
DISK = [ TYPE = "disk" ,
SOURCE = "/srv/cloud/one/IM_template/test.qcow2" ,
TARGET = "hda" ,
CLONE = "no" ,
SAVE = "no" ,
READONLY = "no" ]
...
################################
the libvirt driver translate it like this :
#########LibVirt VM Template #########
...
<os>
<type>hvm</type>
<boot dev='"cdrom"'/>
</os>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/srv/cloud/one/var/94/images/disk.0'/>
<target dev='hdc'/>
</disk>
<disk type='file' device='disk'>
<source file='/srv/cloud/one/var/94/images/disk.1'/>
<target dev='hda'/>
</disk>
...
################################
That is to say the translation doesn't care about my cdrom type . And the vm
failed. but if I put cdrom in the device attirbute it works ...
I searched in the code and I realized that if the type is block in the ON
template the device attirbute will be set as disk and if not it will be set
at disk again :
root<http://dev.opennebula.org/projects/opennebula/repository/revisions/master/show>/
src<http://dev.opennebula.org/projects/opennebula/repository/revisions/master/show/src>/
vmm<http://dev.opennebula.org/projects/opennebula/repository/revisions/master/show/src/vmm>/
LibVirtDriver.cc<http://dev.opennebula.org/projects/opennebula/repository/revisions/master/changes/src/vmm/LibVirtDriver.cc>line
687 to 697 ...
--
Florian Chazal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20100518/67884def/attachment.htm>
More information about the Users
mailing list