I heve VMWare cluster with Opennebula. I need add blank image to VM. I go to Images adm try create DATABLOCK image and get error:
> Fri Jan 6 22:48:53 2017 [Z0][ImM][I]: Command execution fail: /var/lib/one/remotes/datastore/vcenter/monitor PERTX0RSSVZFUl9BQ1RJT05fREFUQT48REFUQVNUT1JFPjxJRD4xMDA8L0lEPjxVSUQ+MDwvVUlEPjxHSUQ+MDwvR0lEPjxVTkFNRT5vbmVhZG1pbjwvVU5BTUU+PEdOQU1FPm9uZWFkbWluPC9HTkFNRT48TkFNRT5TQU4yPC9OQU1FPjx
Hi Anton!
when creating an empty/blank image in vCenter, could you try to define both the Disk provisioning type, and the Bus adapter controller type under Advanced Options?
It could be related to this ticket, some defaults should be possible to be defined so for example when creating an empty datastore the provisioning type and bus adapter would get that defaults so the image creation doesnāt fail. Letās see if that solves your issue.
Hi Anton!
in OpenNebula 5.2, I confirm that the image is created (state shows READY) if selecting for example: thin for disk provisioning and lsiLogic for bus adapter type:
If I donāt set disk provisioning and adapter controller the following error is shown: Not enough information to create the image, so could you try to find and post the error message for the datablock creation failure? try to search for āCommand execution fail: /var/lib/one/remotes/datastore/vcenter/mkfsā? in /var/log/one/oned.log. Letās see what itās happening.
Hi Anton!
Iāve been reviewing your outputs and according to your logs there are two issues:
The datastore SAN and SAN2 canāt be monitored. The reason is an exception: Error monitoring SAN2. Reason: undefined method āidā for nil:NilClass and Error monitoring SAN. Reason: undefined method `idā for nil:NilClass
The datablock canāt be created and the reason looks the same exception: Error creating virtual disk in SAN2. Reason: undefined method `idā for nil:NilClass
Iāve been following the code and I think that the issue would be caused by one of the following two situations:
Possible situation #1. If you run the onedatastore show 100 -x | grep VCENTER_CLUSTER and onedatastore show 101 -x | grep VCENTER_CLUSTER you should get the name of the vCenter cluster associated to those datastores (Datastore SAN has the ID 100 while Datastore SAN2 has the ID 101 according to your logs).
Do you get any output from those commands? If you get no output, then the issue is that OpenNebula does not have a cluster name associated with the datastores and it needs one to get the vCenter connection info like host, user and password (it fails trying to get the id attribute for a nil / not found cluster).
Possible situation #2. If you get the cluster name from the previous command you should now run the onehost list command. You should get a list of the vCenter clusters managed by OpenNebula. If you canāt find the cluster name in that list then that would be the issue, OpenNebula tries to get the id attribute of a not found cluster.
The solution for issue number 1. I guess you could try to add a VCENTER_CLUSTER=cluster_name where cluster_name is the name of an ESX cluster that knows how to connect to datastores SAN and SAN2. that cluster_name should be listed if you run a onehost list.
The solution for issue number 2. I guess you could try to import a cluster with access to datastore SAN and SAN2 using the onevcenter host command or the Import button in Sunstone.
In any case please proceed with caution!, and let me know if any of the possible situations that Iāve presented here may explain the issue.