VMware Cloud Community
s4muz
Contributor
Contributor

windows 2012 volume attach error vio 3.0

Hello

I successfully created and deployed a win 2012 image whith a lsilogicsas adapter.  But when i try to attach a volume, i received this error in vsphere client: Cannot modify existing device 'scsi0'.

So, i was looking to the created shadow vm and i saw that the volume was created using the lsi logic parallel. I changed to lsi logic sas and worked. The volume was attached sucessfully to my win 2012 instance.

So how can i fix this problem? Because the final user won't be able to change the lsi sas adapter. Is there a problem with my image?

Thanks

Reply
0 Kudos
10 Replies
v_bala
VMware Employee
VMware Employee

What is the value of image property 'vmware_adaptertype'?

Reply
0 Kudos
v_bala
VMware Employee
VMware Employee

The image property 'vmware_adaptertype' must be set to 'lsiLogicsas' in your case.

Thanks.

Reply
0 Kudos
s4muz
Contributor
Contributor

Thanks v_bala

But look the properties of my image:

root@controller01:~# nova image-show win2012-x64R2-dc-img

+-----------------------------+--------------------------------------+

| Property                    | Value                                |

+-----------------------------+--------------------------------------+

| OS-EXT-IMG-SIZE:size        | 5926262272                           |

| created                     | 2016-10-31T14:04:56Z                 |

| id                          | 9c8b9cd0-0724-4108-9750-ab95b1e3a03e |

| metadata hw_vif_model       | VirtualVmxnet3                       |

| metadata vmware_adaptertype | lsiLogicsas                          |

| metadata vmware_disktype    | streamOptimized                      |

| metadata vmware_ostype      | windows8Server64Guest                |

| minDisk                     | 40                                   |

| minRam                      | 2                                    |

| name                        | win2012-x64R2-dc-img                 |

| progress                    | 100                                  |

| status                      | ACTIVE                               |

| updated                     | 2016-11-04T10:46:43Z                 |

+-----------------------------+--------------------------------------+

As i said, i can deploy the image correctly, but when i create a new volume and i try to attach to .... i receive that message. When the new volume is created (inside of a shadow vm), it should  be lazy created based on the source instance, right?

Reply
0 Kudos
v_bala
VMware Employee
VMware Employee

Could you please check the glance_api_version in cinder.conf? Also, upload the cinder-volume logs collected during the volume create operation.

Reply
0 Kudos
s4muz
Contributor
Contributor

Hey v_bala

glance_api_version = 2

The logs are attached. Thank you again

Reply
0 Kudos
v_bala
VMware Employee
VMware Employee

Thanks s4muz.

I couldn't find any volume create from image operations in the attached logs. How did you create the volume? For the volume to honor the adapter type mentioned in the image, we should create the volume specifying the image source.

Reply
0 Kudos
s4muz
Contributor
Contributor

v_bala

I created in many ways, via cli and via horizon. Using horizon once, i tried to specify the image source but what it does is cloning the source image and attach to the deployed instance. So in the windows disk manager i saw the new disk with the windows partitions of the image cloned. Is this correct? 

Reply
0 Kudos
v_bala
VMware Employee
VMware Employee

I think there is some confusion. I thought that you tried to create a volume from an image with vmware_adaptertype=lsiLogicsas, but the volume shadow VM was created with lsiLogic. I checked that and there are no issues with volume creation.

It looks like your steps were:

* Boot an instance from an image with vmware_adaptertype=lsiLogicsas

* Create and attach a volume

The attach will fail in this case and it is due to a known bug. It happens when Nova tries to create a new SCSI controller (to attach the volume)  and there are some SCSI controllers of different type already in the instance.

When you change the adapter type of the volume shadow VM to lsiLogicsas, Nova doesn't have to create a new controller (hence no error) because there is already an existing one of type lsiLogicsas. I will update this thread once we have a patch with the fix.

Reply
0 Kudos
s4muz
Contributor
Contributor

Yes, you are right about my steps. So if it's a known bug i'll wait for a patch to fix.But to work around i took this steps:

* Boot an instance from an image with vmware_adaptertype=lsiLogicsas

* Create and attach a "volume-base" 1GB (Received the error)

* After the error, In vcenter i changed the adapter type from lsiLogic to lsiLogicsas of the created shadow vm called "volume-base-xxxxxxx"

* for every new volume to be created, the source "volume-base" will be used. So because my source "volume-base" is an 1GB empty volume it will be fast provisioned, and successfully attached to the lsiLogicsas booted instance.

If we could change the metadata for the shadow vm we can work normally. Just set vmware_adaptertype=lsiLogicsas to the shadow vm volumes it will work this out.

Reply
0 Kudos
rgerganov
VMware Employee
VMware Employee

Thanks for reporting the problem, it will be fixed in VIO 3.1

Reply
0 Kudos