[one-users] cannot use a iso based cdrom in vmware

Tino Vazquez tinova at opennebula.org
Wed May 25 03:26:10 PDT 2011


Hi Carlos,

I've just realized that I didn't attached the tm_clone.sh, my
apologies, please find it in this email.

I would appreciate it if you could try it out when you have the time,
and provide with some feedback.

Instructions are in the mail below.

Regards and many thanks,

-Tino

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



On Wed, May 18, 2011 at 4:18 PM, Tino Vazquez <tinova at opennebula.org> wrote:
> Hi Carlos,
>
> Ok, I think I have a better understanding of the problem now. I've
> opened a ticket [1] since this is definitely a bug.
>
> Let's try the following to see if we got it right:
>
>  * Change line 222 with
>
>         file << "\t\t\t<source file=[" <<  datastore << "] " << vm->get_oid()
>                << "/images/disk."  << i << ".iso'/>"  << endl;
>
>   * Copy the attached tm_clone.sh to $ONE_LOCATION/lib/tm_commands/nfs
>
> Recompile and try again, many thanks again for the feedback. If this
> works I'll add the changes both to the core and the VMware addon.
>
> Regards,
>
> -Tino
>
> [1] http://dev.opennebula.org/issues/649
> --
> Constantino Vázquez Blanco, MSc
> OpenNebula Major Contributor
> www.OpenNebula.org | @tinova79
>
>
>
> On Tue, May 17, 2011 at 5:32 PM, Carlos A. <caralla at upv.es> wrote:
>> Sorry,
>>
>> I provided you with wrong information
>>
>> ----------------------cut here--------------------------------
>>
>> <domain type='vmware'>
>> <name>one-567</name>
>> <vcpu>1</vcpu>
>> <memory>262144</memory>
>> <os>
>> <type arch='i686'>hvm</type>
>> </os>
>> <devices>
>> <disk type='file' device='cdrom'>
>> <source file='[standard] 567/images/isofile.iso'/>
>> <target dev='hda' bus='ide'/>
>> <driver name='raw'/>
>> </disk>
>> </devices>
>> </domain>
>>
>> ----------------------cut here--------------------------------
>>
>>
>> $ ls -l /var/lib/vmware/VirtualMachines/567/images
>> total 738176
>> -rw-r--r-- 1 oneadmin oneadmin 755144704 2011-05-17 17:21 disk.0
>>
>> In fact, the "disk.0" is the iso file. Now
>>
>> $ /srv/cloud/one/bin/tty_expect -u myadmin -p XXXXXX virsh -c
>> gsx://myhost?no_verify=1 define /srv/cloud/one/var/567/deployment.0
>>
>> provides an error that is not related to the cdrom file but to the fact that
>> I am not providing a disk for the VM (I am just testing)
>>
>> Now the problem is about the name of the file
>>
>> Regards.
>>
>> El 17/05/2011 17:16, Tino Vazquez escribió:
>>>
>>> Hi Carlos,
>>>
>>> Couple of questions:
>>>
>>>  * What are the contents of
>>> /var/lib/vmware/VirtualMachines/566/images/disk.0?
>>>
>>>  * I take it that /tmp/iso is a file, could you rename it to
>>> "something.iso" and try again?
>>>
>>> Regards,
>>>
>>> -Tino
>>>
>>> --
>>> Constantino Vázquez Blanco | dsa-research.org/tinova
>>> Virtualization Technology Engineer / Researcher
>>> OpenNebula Toolkit | opennebula.org
>>>
>>>
>>>
>>> On Tue, May 17, 2011 at 5:12 PM, Carlos A.<caralla at upv.es>  wrote:
>>>>
>>>> Hi,
>>>>
>>>> for generated domain:
>>>> ----------------------cut here--------------------------------
>>>> <domain type='vmware'>
>>>> <name>one-566</name>
>>>> <vcpu>1</vcpu>
>>>> <memory>262144</memory>
>>>> <os>
>>>> <type arch='i686'>hvm</type>
>>>> </os>
>>>> <devices>
>>>> <disk type='file' device='cdrom'>
>>>> <source file='[standard] 566/images/iso'/>
>>>> <target dev='hda' bus='ide'/>
>>>> <driver name='raw'/>
>>>> </disk>
>>>> </devices>
>>>> </domain>
>>>> ----------------------cut here--------------------------------
>>>>
>>>> now I get the next error:
>>>>
>>>> $ /srv/cloud/one/bin/tty_expect -u myadmin -p XXXXXX virsh -c
>>>> gsx://myhost?no_verify=1 define /srv/cloud/one/var/566/deployment.0
>>>>
>>>> error: Failed to define domain from /srv/cloud/one/var/566/deployment.0
>>>> error: internal error Image file for IDE cdrom 'hda' has unsupported
>>>> suffix,
>>>> expecting '.iso'
>>>>
>>>> The files have been properly copied but in fact they have a name other
>>>> than
>>>> *.iso. What I have in the VMWare repository is
>>>>
>>>> myadmin at myhost:/var/lib/vmware/VirtualMachines/566/images$ ls -l
>>>> total 4
>>>> drwxrwxrwx 2 myadmin myadmin 4096 2011-05-17 17:03 disk.0
>>>>
>>>> As you can see cdrom file types are not properly copied.
>>>>
>>>> It seems to be easy to find a workaround (just rename the file in case
>>>> that
>>>> it is a cdrom type), but also use the proper file name. But currently
>>>> vmware
>>>> files are transfered in a different way (they are stored into folders to
>>>> deal with parted disk files).
>>>>
>>>> Regards,
>>>> Carlos A.
>>>>
>>>> El 17/05/2011 15:33, Tino Vazquez escribió:
>>>>>
>>>>> Hi Carlos,
>>>>>
>>>>> thanks for your feedback! This looks like a bug. Could you please try
>>>>> changing src/vmm/LibVirtDriverVMware.cc:
>>>>>
>>>>>    * add this include at the beginning
>>>>>
>>>>> #include<unistd.h>
>>>>>
>>>>>    * replace line 222 (file<<    "\t\t\t<source file='"<<    source<<
>>>>> "'/>"<<    endl;)  with the following:
>>>>>
>>>>>             file<<    "\t\t\t<source file=["<<     datastore<<    "] "<<
>>>>> vm->get_oid()
>>>>>                  <<    "/images/"<<    basename((char
>>>>> *)source.c_str())<<
>>>>>  "'/>"<<    endl;
>>>>>
>>>>>
>>>>> You will need to recompile ONE and restart it.
>>>>>
>>>>> If this works, please come back and I'll open a ticket and fix this
>>>>> issue in the repo.
>>>>>
>>>>> Regards,
>>>>>
>>>>> -Tino
>>>>>
>>>>> --
>>>>> Constantino Vázquez Blanco | dsa-research.org/tinova
>>>>> Virtualization Technology Engineer / Researcher
>>>>> OpenNebula Toolkit | opennebula.org
>>>>>
>>>>>
>>>>>
>>>>> On Tue, May 17, 2011 at 1:04 PM, Carlos A.<caralla at upv.es>    wrote:
>>>>>>
>>>>>> A template like this
>>>>>>
>>>>>> -----------cut here-------------------
>>>>>>
>>>>>> NAME = vm-vmware
>>>>>>
>>>>>> VCPU    = 1
>>>>>> MEMORY = 512
>>>>>> OS = [ ARCH = "i686" ]
>>>>>>
>>>>>> DISK = [
>>>>>>        source = "/tmp/iso" ,
>>>>>>        target="hda",
>>>>>>        bus="ide",
>>>>>>        type="cdrom"
>>>>>> ]
>>>>>>
>>>>>> -----------cut here-------------------
>>>>>>
>>>>>> generates a deployment file like this one
>>>>>>
>>>>>> -----------cut here-------------------
>>>>>>
>>>>>> <domain type='vmware'>
>>>>>> <name>one-559</name>
>>>>>> <vcpu>1</vcpu>
>>>>>> <memory>524288</memory>
>>>>>> <os>
>>>>>> <type arch='i686'>hvm</type>
>>>>>> </os>
>>>>>> <devices>
>>>>>> <disk type='file' device='cdrom'>
>>>>>> <source file='/tmp/iso'/>
>>>>>> <target dev='hda' bus='ide'/>
>>>>>> <driver name='raw'/>
>>>>>> </disk>
>>>>>> </devices>
>>>>>> </domain>
>>>>>>
>>>>>> -----------cut here-------------------
>>>>>>
>>>>>> The problem is the line that states<source file='/tmp/iso'/>    while
>>>>>> it
>>>>>> should state<source file='[datastore] path/to/iso'/>    or something
>>>>>> like
>>>>>> that.
>>>>>>
>>>>>> I found that file "LibVirtDriverVMware.cc" does not generate the proper
>>>>>> datastore substitution, although ISO file is copied.
>>>>>>
>>>>>> Is there any way to make isos work in vmware?
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users at lists.opennebula.org
>>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>>>>
>>>>
>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tm_clone.sh
Type: application/x-sh
Size: 2088 bytes
Desc: not available
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110525/5275a6a2/attachment-0003.sh>


More information about the Users mailing list