VMware vCenter Driver copy_virtual_disk failed with fileType error

Bug #1353977 reported by Fan Guo
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

Test Environment:
     VMware vCenter version: 5.1
     Image: Sparse + ide

Log:
-------
2014-08-07 07:49:18.949 25720 WARNING nova.virt.vmwareapi.driver [-] Task [CopyVirtualDisk_Task] (returnval){
   value = "task-4469"
   _type = "Task"
 } status: error A specified parameter was not correct.
fileType
2014-08-07 07:49:18.950 25720 WARNING nova.virt.vmwareapi.error_util [-] Fault InvalidArgument not matched.
2014-08-07 07:49:18.950 25720 ERROR nova.compute.manager [req-8f4578d9-834d-4e4d-a309-f4d117cc7a13 None] [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] Instance failed to spawn
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] Traceback (most recent call last):
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2111, in _build_resources
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] yield resources
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1997, in _build_and_run_instance
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] block_device_info=block_device_info)
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/driver.py", line 643, in spawn
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] admin_password, network_info, block_device_info)
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/vmops.py", line 399, in spawn
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] copy_spec)
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/vm_util.py", line 1312, in copy_virtual_disk
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] session._wait_for_task(vmdk_copy_task)
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/driver.py", line 1013, in _wait_for_task
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] ret_val = done.wait()
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] File "/usr/lib/python2.6/site-packages/eventlet/event.py", line 120, in wait
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] return hubs.get_hub().switch()
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] File "/usr/lib/python2.6/site-packages/eventlet/hubs/hub.py", line 187, in switch
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] return self.greenlet.switch()
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] VMwareDriverException: A specified parameter was not correct.
2014-08-07 07:49:18.950 25720 TRACE nova.compute.manager [instance: 069fc3ba-52cd-44fe-9035-7551d70f2daf] fileType
---------

The following code causes this issue. When disk_type is 'sparse' and adapter_type is 'ide' copy_spec will be set as None.
API CopyVirtualDisk_Task: If destSpec not specified, a preallocated format and 'busLogic' adapter type is assume. So adapter_type is force modified from 'ide' to 'busLogic'.

----from vmops.py

     if not is_iso and disk_type == "sparse":
         # Copy the sparse virtual disk to a thin virtual disk
         disk_type = "thin"
         copy_spec = self.get_copy_virtual_disk_spec(client_factory,
                                                     adapter_type,
                                                     disk_type)
           vm_util.copy_virtual_disk(self._session, dc_info.ref,
                                     str(sparse_ds_loc),
                                     str(upload_path_loc),
                                     copy_spec)
---------------

Tags: vmware
Fan Guo (faguo)
description: updated
description: updated
Revision history for this message
Vui Lam (vui) wrote :

Hi,

The copy operation invoke through VC is intentionally passed a null copy_spec. That in itself should not be the cause of the failure. Can you confirm the image you used in a monolithic sparse image. I tested with an ide sparse vmdk, and the embedded descriptor information (you can get that by doing head -20 mysparse.vmkd) reads:

KDM6

# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=1e521528
parentCID=ffffffff
isNativeSnapshot="no"
createType="monolithicSparse"

# Extent description
RW 524288 SPARSE "dsl-disk1.vmdk"

# The Disk Data Base
#DDB

ddb.adapterType = "ide"

This disk spawns fine for me.

I used the following to import the image:
glance image-create --name=msp_ide --disk-format=vmdk --container-format=bare --is-public=True --property vmware_adaptertype="ide" --property vmware_disktype="sparse" < msp_ide.vmdk

This is verified on upstream master code today. Please verify the image format and glance properties.
If the problem still persists, we may have to look into the VC/ESX logs to understand the root cause.

Revision history for this message
Vui Lam (vui) wrote :

Just to reiterate, when connecting to VC, the copy_spec should _always_ be None regardless of disktype/adapter type.
The error looks very much like what one would see if somehow copy_spec was not None. Please verify that copy_spec is indeed set to None if possible.

Tracy Jones (tjones-i)
Changed in nova:
status: New → Incomplete
Revision history for this message
Gary Kotton (garyk) wrote :

Can you please retry with the latest code. If it preoduces lets open again an address. There has beena ton of changes since last year...

Changed in nova:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.