[one-users] CDROM doesn't mount for KVM virts?

Tino Vazquez tinova at opennebula.org
Wed Apr 27 02:35:00 PDT 2011


Dear Rich,

You can try changing line 390 of src/vmm/LibVirtDriverKVM.cc

               file << "\t\t<disk type='file' device='cdrom'>" << endl;

you will need to compile, install and run OpenNebula again.

If this works, please come back and we will evaluate the possibility
of having type of cdrom as a variable in the VM template.

Regards,

-Tino

--
Constantino Vázquez Blanco, MSc
OpenNebula Major Contributor
www.OpenNebula.org | @tinova79



On Thu, Apr 21, 2011 at 9:25 AM, Whiffen, Richard
<Richard_Whiffen at cable.comcast.com> wrote:
> Ok, with the 'restart trick' that Héctor provided I was able to narrow down
> my problem.
> If the XML says this:
>                  <disk type='file' device='cdrom'>
>                         <source file='/srv/cloud/one/var/58/images/disk.1'/>
>                         <target dev='hdb'/>
>                         <readonly/>
>                         <driver name='qemu' type='raw'/>
>                 </disk>
> It doesn't work.  But if I change it to device='disk' it works correctly.
>                  <disk type='file' device='disk'>
>                         <source file='/srv/cloud/one/var/58/images/disk.1'/>
>                         <target dev='hdb'/>
>                         <readonly/>
>                         <driver name='qemu' type='raw'/>
>                 </disk>
> Is there a way I can change the script or ruby code that sets that value to
> device='cdrom' so it will be device=disk instead?  I still have to get to
> the bottom of why cdrom doesn't work for me.
> libvirt-0.6.3-33.el5 and qemu-0.10.5-1.el5.2 if anyone has any ideas.
> Rich
>
> --
> Rich Whiffen
> richard_whiffen at cable.comcast.com
> AIM: richwhiffen
> Yahoo: richwhiffen
> Phone: 202-449-1312
> From: Rich Whiffen <richard_whiffen at cable.comcast.com>
> Date: Mon, 18 Apr 2011 16:46:57 -0400
> To: "users at lists.opennebula.org" <users at lists.opennebula.org>
> Subject: CDROM doesn't mount for KVM virts?
>
> I'm making pretty good strides at understanding OpenNebula, but it seems the
> more a learn, the more I discover I don't understand.  Here's the next area
> I'm hoping someone can point me in the right direction again.  The context
> cdrom device is never getting mounted on my virts, so things like the
> hostname are never being set.  I can see it's defined:
> root     11229     1  6 16:02 ?        00:00:42 /usr/bin/kvm -S -M rhel5.4.0
> -m 32768 -smp 4 -name one-58 -uuid 4bae869f-3e93-1e4a-0224-2c01cf4610fd
> -no-kvm-pit-reinjection -monitor pty -pidfile
> /var/run/libvirt/qemu//one-58.pid -no-acpi -boot c -drive
> file=/srv/cloud/one/var/58/images/disk.0,if=ide,index=0,boot=on,format=qcow2
> -drive
> file=/srv/cloud/one/var/58/images/disk.1,if=ide,media=cdrom,index=1,format=raw
> -net nic,macaddr=02:00:c0:a8:a8:02,vlan=0 -net
> tap,fd=18,script=,vlan=0,ifname=vnet1 -serial none -parallel none -usb -vnc
> localhost:58
> -drive
> file=/srv/cloud/one/var/58/images/disk.1,if=ide,media=cdrom,index=1,format=raw
>
> The deploy.0 says:
>                  <disk type='file' device='cdrom'>
>                         <source file='/srv/cloud/one/var/58/images/disk.1'/>
>                         <target dev='hdb'/>
>                         <readonly/>
>                         <driver name='qemu' type='raw'/>
>                 </disk>
> I also see this device being created in the oned log but /dev/sdb doesn't
> show up as a device on the machine via fdisk or other methods.   So there's
> something off about either my virts or the disk definition in the deploy.0.
>  Not sure how to troubleshoot this.    One thing that would be helpful to
> me, would be a way to manually envoke a virt the same way oned does.  How
> can I run the one/vmm/kvm/deploy commands by hand so I could kill and
> relauch the kvm processes?  (It's a pain to wait for the control box to SCP
> the 60gb disk.0 file).
> Cheers,
> Rich
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>



More information about the Users mailing list