diff --git a/src/zabbix_server/poller/checks_simple_vmware.c b/src/zabbix_server/poller/checks_simple_vmware.c
index 3e44bae850..27f295e2d0 100644
--- a/src/zabbix_server/poller/checks_simple_vmware.c
+++ b/src/zabbix_server/poller/checks_simple_vmware.c
@@ -440,7 +440,7 @@ static int	get_vcenter_vmprop(AGENT_REQUEST *request, const char *username, cons
 {
 	zbx_vmware_service_t	*service;
 	zbx_vmware_vm_t		*vm = NULL;
-	char			*url, *uuid, *value;
+	const char		*url, *uuid, *value;
 	int			ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s() propid:%d", __func__, propid);
@@ -559,7 +559,7 @@ int	check_vcenter_cluster_discovery(AGENT_REQUEST *request, const char *username
 		AGENT_RESULT *result)
 {
 	struct zbx_json		json_data;
-	char			*url;
+	const char		*url;
 	zbx_vmware_service_t	*service;
 	int			i, ret = SYSINFO_RET_FAIL;
 
@@ -608,7 +608,7 @@ out:
 int	check_vcenter_cluster_status(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *name;
+	const char		*url, *name;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_cluster_t	*cluster;
 	int			ret = SYSINFO_RET_FAIL;
@@ -774,7 +774,7 @@ out:
 int	check_vcenter_version(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url;
+	const char		*url;
 	zbx_vmware_service_t	*service;
 	int			ret = SYSINFO_RET_FAIL;
 
@@ -846,7 +846,7 @@ out:
 int	check_vcenter_hv_cluster_name(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	zbx_vmware_hv_t		*hv;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_cluster_t	*cluster = NULL;
@@ -914,7 +914,7 @@ int	check_vcenter_hv_cpu_usage(AGENT_REQUEST *request, const char *username, con
 int	check_vcenter_hv_cpu_usage_perf(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	int			ret = SYSINFO_RET_FAIL;
@@ -960,7 +960,7 @@ out:
 int	check_vcenter_hv_cpu_utilization(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	int			ret = SYSINFO_RET_FAIL;
@@ -1000,8 +1000,7 @@ out:
 int	check_vcenter_hv_power(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid, *max;
-	const char		*path;
+	const char		*path, *url, *uuid, *max;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	int 			ret = SYSINFO_RET_FAIL;
@@ -1061,7 +1060,7 @@ int	check_vcenter_hv_discovery(AGENT_REQUEST *request, const char *username, con
 		AGENT_RESULT *result)
 {
 	struct zbx_json		json_data;
-	char			*url, *name;
+	const char		*url, *name;
 	zbx_vmware_service_t	*service;
 	int			ret = SYSINFO_RET_FAIL;
 	zbx_vmware_hv_t		*hv;
@@ -1470,7 +1469,7 @@ out:
 int	check_vcenter_hv_network_in(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *mode, *uuid;
+	const char		*url, *mode, *uuid;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	int			ret = SYSINFO_RET_FAIL;
@@ -1517,7 +1516,7 @@ out:
 int	check_vcenter_hv_network_out(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *mode, *uuid;
+	const char		*url, *mode, *uuid;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	int			ret = SYSINFO_RET_FAIL;
@@ -1564,7 +1563,7 @@ out:
 int	check_vcenter_hv_datacenter_name(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	int			ret = SYSINFO_RET_FAIL;
@@ -1605,7 +1604,7 @@ out:
 int	check_vcenter_hv_datastore_discovery(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	struct zbx_json		json_data;
@@ -1638,8 +1637,7 @@ int	check_vcenter_hv_datastore_discovery(AGENT_REQUEST *request, const char *use
 	for (i = 0; i < hv->dsnames.values_num; i++)
 	{
 		zbx_vmware_dsname_t	*dsname = hv->dsnames.values[i];
-		zbx_uint64_t		total = 0;
-		int			j;
+		int			j, total = 0;
 
 
 		for (j = 0; j < dsname->hvdisks.values_num; j++)
@@ -1647,8 +1645,8 @@ int	check_vcenter_hv_datastore_discovery(AGENT_REQUEST *request, const char *use
 
 		zbx_json_addobject(&json_data, NULL);
 		zbx_json_addstring(&json_data, "{#DATASTORE}", dsname->name, ZBX_JSON_TYPE_STRING);
-		zbx_json_adduint64(&json_data, "{#MULTIPATH.COUNT}", total);
-		zbx_json_adduint64(&json_data, "{#MULTIPATH.PARTITION.COUNT}", dsname->hvdisks.values_num);
+		zbx_json_adduint64(&json_data, "{#MULTIPATH.COUNT}", (unsigned int)total);
+		zbx_json_adduint64(&json_data, "{#MULTIPATH.PARTITION.COUNT}", (unsigned int)dsname->hvdisks.values_num);
 
 		zbx_json_close(&json_data);
 	}
@@ -1671,7 +1669,7 @@ out:
 static int	check_vcenter_hv_datastore_latency(AGENT_REQUEST *request, const char *username, const char *password,
 		const char *perfcounter, zbx_uint64_t access_filter, AGENT_RESULT *result)
 {
-	char			*url, *mode, *uuid, *name;
+	const char		*url, *mode, *uuid, *name;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	zbx_vmware_datastore_t	*datastore;
@@ -1975,8 +1973,8 @@ unlock:
 int	check_vcenter_hv_datastore_size(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char	*url, *uuid, *name, *param;
-	int	ret = SYSINFO_RET_FAIL, mode;
+	const char	*url, *uuid, *name, *param;
+	int		ret = SYSINFO_RET_FAIL, mode;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
 
@@ -2004,8 +2002,7 @@ out:
 int	check_vcenter_hv_perfcounter(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid, *path;
-	const char 		*instance;
+	const char		*instance, *url, *uuid, *path;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	zbx_uint64_t		counterid;
@@ -2064,7 +2061,8 @@ out:
 int	check_vcenter_hv_datastore_list(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *hv_uuid, *ds_list = NULL;
+	const char		*url, *hv_uuid;
+	char			*ds_list = NULL;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	int			i, ret = SYSINFO_RET_FAIL;
@@ -2116,12 +2114,12 @@ out:
 int	check_vcenter_hv_datastore_multipath(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *hv_uuid, *ds_name, *partition;
+	const char		*url, *hv_uuid, *ds_name, *partition;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	zbx_vmware_dsname_t	*dsname;
-	int			ret = SYSINFO_RET_FAIL, i, j;
-	zbx_uint64_t		partitionid = 0, multipath_count = 0;
+	int			ret = SYSINFO_RET_FAIL, i, j, multipath_count = 0;
+	zbx_uint64_t		partitionid = 0;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
 
@@ -2226,7 +2224,7 @@ int	check_vcenter_hv_datastore_multipath(AGENT_REQUEST *request, const char *use
 		}
 	}
 
-	SET_UI64_RESULT(result, multipath_count);
+	SET_UI64_RESULT(result, (unsigned int)multipath_count);
 	ret = SYSINFO_RET_OK;
 unlock:
 	zbx_vmware_unlock();
@@ -2239,7 +2237,8 @@ out:
 int	check_vcenter_datastore_hv_list(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *ds_name, *hv_list = NULL, *hv_name;
+	const char		*url, *ds_name, *hv_name;
+	char			*hv_list = NULL;
 	zbx_vmware_service_t	*service;
 	int			i, ret = SYSINFO_RET_FAIL;
 	zbx_vmware_datastore_t	*datastore = NULL;
@@ -2310,8 +2309,8 @@ out:
 int	check_vcenter_datastore_size(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char	*url, *name, *param;
-	int	ret = SYSINFO_RET_FAIL, mode;
+	const char	*url, *name, *param;
+	int		ret = SYSINFO_RET_FAIL, mode;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
 
@@ -2338,7 +2337,7 @@ out:
 int	check_vcenter_datastore_discovery(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url;
+	const char		*url;
 	zbx_vmware_service_t	*service;
 	struct zbx_json		json_data;
 	int			i, j, ret = SYSINFO_RET_FAIL;
@@ -2399,7 +2398,7 @@ out:
 static int	check_vcenter_datastore_latency(AGENT_REQUEST *request, const char *username, const char *password,
 		const char *perfcounter, zbx_uint64_t access_filter, AGENT_RESULT *result)
 {
-	char			*url, *mode, *name;
+	const char		*url, *mode, *name;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	zbx_vmware_datastore_t	*datastore;
@@ -2545,7 +2544,7 @@ int	check_vcenter_vm_cpu_num(AGENT_REQUEST *request, const char *username, const
 int	check_vcenter_vm_cluster_name(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_cluster_t	*cluster = NULL;
 	int			ret = SYSINFO_RET_FAIL;
@@ -2652,7 +2651,7 @@ int	check_vcenter_vm_datacenter_name(AGENT_REQUEST *request, const char *usernam
 {
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	int			ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
@@ -2697,7 +2696,7 @@ int	check_vcenter_vm_discovery(AGENT_REQUEST *request, const char *username, con
 		AGENT_RESULT *result)
 {
 	struct zbx_json		json_data;
-	char			*url, *vm_name, *hv_name;
+	const char		*url, *vm_name, *hv_name;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
 	zbx_vmware_vm_t		*vm;
@@ -2784,7 +2783,7 @@ int	check_vcenter_vm_hv_name(AGENT_REQUEST *request, const char *username, const
 {
 	zbx_vmware_service_t	*service;
 	zbx_vmware_hv_t		*hv;
-	char			*url, *uuid, *name;
+	const char		*url, *uuid, *name;
 	int			ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
@@ -2992,7 +2991,7 @@ int	check_vcenter_vm_net_if_discovery(AGENT_REQUEST *request, const char *userna
 	zbx_vmware_service_t	*service;
 	zbx_vmware_vm_t		*vm = NULL;
 	zbx_vmware_dev_t	*dev;
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	int			i, ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
@@ -3058,9 +3057,8 @@ out:
 int	check_vcenter_vm_net_if_in(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid, *instance, *mode;
 	zbx_vmware_service_t	*service;
-	const char		*path;
+	const char		*path, *url, *uuid, *instance, *mode;
 	int 			coeff, ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
@@ -3121,9 +3119,8 @@ out:
 int	check_vcenter_vm_net_if_out(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid, *instance, *mode;
 	zbx_vmware_service_t	*service;
-	const char		*path;
+	const char		*path, *url, *uuid, *instance, *mode;
 	int 			coeff, ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
@@ -3244,7 +3241,7 @@ int	check_vcenter_vm_vfs_dev_discovery(AGENT_REQUEST *request, const char *usern
 	zbx_vmware_service_t	*service;
 	zbx_vmware_vm_t		*vm = NULL;
 	zbx_vmware_dev_t	*dev;
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	int			i, ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
@@ -3309,9 +3306,8 @@ out:
 int	check_vcenter_vm_vfs_dev_read(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid, *instance, *mode;
 	zbx_vmware_service_t	*service;
-	const char		*path;
+	const char		*path, *url, *uuid, *instance, *mode;
 	int			coeff, ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
@@ -3372,9 +3368,8 @@ out:
 int	check_vcenter_vm_vfs_dev_write(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid, *instance, *mode;
 	zbx_vmware_service_t	*service;
-	const char		*path;
+	const char		*path, *url, *uuid, *instance, *mode;
 	int			coeff, ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
@@ -3438,7 +3433,7 @@ int	check_vcenter_vm_vfs_fs_discovery(AGENT_REQUEST *request, const char *userna
 	struct zbx_json		json_data;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_vm_t		*vm = NULL;
-	char			*url, *uuid;
+	const char		*url, *uuid;
 	int			i, ret = SYSINFO_RET_FAIL;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
@@ -3500,7 +3495,7 @@ int	check_vcenter_vm_vfs_fs_size(AGENT_REQUEST *request, const char *username, c
 {
 	zbx_vmware_service_t	*service;
 	zbx_vmware_vm_t		*vm;
-	char			*url, *uuid, *fsname, *mode;
+	const char		*url, *uuid, *fsname, *mode;
 	int			i, ret = SYSINFO_RET_FAIL;
 	zbx_vmware_fs_t		*fs = NULL;
 
@@ -3576,8 +3571,7 @@ out:
 int	check_vcenter_vm_perfcounter(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid, *path;
-	const char 		*instance;
+	const char 		*instance, *url, *uuid, *path;
 	zbx_vmware_service_t	*service;
 	zbx_vmware_vm_t		*vm;
 	zbx_uint64_t		counterid;
@@ -3636,7 +3630,7 @@ out:
 int	check_vcenter_dc_discovery(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url;
+	const char		*url;
 	zbx_vmware_service_t	*service;
 	struct zbx_json		json_data;
 	int			i, ret = SYSINFO_RET_FAIL;
@@ -3686,9 +3680,9 @@ out:
 int	check_vcenter_vm_net_if_usage(AGENT_REQUEST *request, const char *username, const char *password,
 		AGENT_RESULT *result)
 {
-	char			*url, *uuid, *instance;
 	zbx_vmware_service_t	*service;
-	int 			ret = SYSINFO_RET_FAIL;
+	int			ret = SYSINFO_RET_FAIL;
+	const char		*url, *uuid, *instance;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
 
diff --git a/src/zabbix_server/vmware/vmware.c b/src/zabbix_server/vmware/vmware.c
index 55e7994625..02ad1ef9fd 100644
--- a/src/zabbix_server/vmware/vmware.c
+++ b/src/zabbix_server/vmware/vmware.c
@@ -294,18 +294,24 @@ static zbx_uint64_t	evt_req_chunk_size;
 #define ZBX_XPATH_VMWARE_ABOUT(property)								\
 	"/*/*/*/*/*[local-name()='about']/*[local-name()='" property "']"
 
+#define ZBX_XPATH_HV_SCSI_TOPOLOGY									\
+		"/*/*/*/*/*/*[local-name()='propSet'][*[local-name()='name']"				\
+		"[text()='config.storageDevice.scsiTopology']][1]"					\
+		"/*[local-name()='val']/*[local-name()='adapter']/*[local-name()='target']"		\
+		"/*[local-name()='lun']/*[local-name()='scsiLun']"
+
+#define ZBX_XPATH_HV_LUN()										\
+		"substring-before(substring-after(/*/*/*/*/*/*[local-name()='propSet']"			\
+		"[*[local-name()='val'][text()='%s']][1]/*[local-name()='name'],'\"'),'\"')"
+
+#define ZBX_XPATH_HV_MULTIPATH(state)									\
+		"count(/*/*/*/*/*/*[local-name()='propSet'][1]/*[local-name()='val']"			\
+		"/*[local-name()='lun'][*[local-name()='lun'][text()='%s']][1]"				\
+		"/*[local-name()='path']" state ")"
+
+#define ZBX_XPATH_HV_MULTIPATH_PATHS()	ZBX_XPATH_HV_MULTIPATH("")
 #define ZBX_XPATH_HV_MULTIPATH_ACTIVE_PATHS()								\
-		"count(/*/*/*/*/*/*/*[local-name()='val']/*[local-name()='lun']"			\
-		"/*[local-name()='path'][*[local-name()='state'][text()='active'] and "			\
-		"../*[local-name()='id']=../../../../*[local-name()='propSet']/*[local-name()='val']"	\
-		"/*[local-name()='ScsiLun']/*[local-name()='uuid'][../*[local-name()='canonicalName']"	\
-		"[text()='%s']]])"
-
-#define ZBX_XPATH_HV_MULTIPATH_PATHS()									\
-		"count(/*/*/*/*/*/*/*[local-name()='val']/*[local-name()='lun']"			\
-		"/*[local-name()='path'][../*[local-name()='id']=../../../../*[local-name()='propSet']"	\
-		"/*[local-name()='val']/*[local-name()='ScsiLun']/*[local-name()='uuid']"		\
-		"[../*[local-name()='canonicalName'][text()='%s']]])"
+		ZBX_XPATH_HV_MULTIPATH("[*[local-name()='state'][text()='active']]")
 
 #define ZBX_XPATH_DS_INFO_EXTENT()									\
 		ZBX_XPATH_PROP_NAME("info") "/*/*[local-name()='extent']"
@@ -543,6 +549,7 @@ ZBX_HTTPPAGE;
 static int	zbx_xml_read_values(xmlDoc *xdoc, const char *xpath, zbx_vector_str_t *values);
 static int	zbx_xml_try_read_value(const char *data, size_t len, const char *xpath, xmlDoc **xdoc, char **value,
 		char **error);
+static int	zbx_xml_read_doc_num(xmlDoc *xdoc, const char *xpath, int *num);
 static char	*zbx_xml_read_node_value(xmlDoc *doc, xmlNode *node, const char *xpath);
 static char	*zbx_xml_read_doc_value(xmlDoc *xdoc, const char *xpath);
 
@@ -2873,10 +2880,7 @@ static int	vmware_service_get_diskextents_list(xmlDoc *doc, zbx_vector_vmware_di
 		goto out;
 
 	if (0 != xmlXPathNodeSetIsEmpty(xpathObj->nodesetval))
-	{
-		xmlXPathFreeObject(xpathObj);
 		goto out;
-	}
 
 	nodeset = xpathObj->nodesetval;
 
@@ -2902,9 +2906,13 @@ static int	vmware_service_get_diskextents_list(xmlDoc *doc, zbx_vector_vmware_di
 		zbx_vector_vmware_diskextent_append(diskextents, diskextent);
 	}
 
+	zbx_vector_vmware_diskextent_sort(diskextents, ZBX_DEFAULT_UINT64_PTR_COMPARE_FUNC);
+
 	ret = SUCCEED;
-	xmlXPathFreeObject(xpathObj);
 out:
+	if (NULL != xpathObj)
+		xmlXPathFreeObject(xpathObj);
+
 	xmlXPathFreeContext(xpathCtx);
 
 	return ret;
@@ -3070,8 +3078,7 @@ static int	vmware_service_get_hv_data(const zbx_vmware_service_t *service, CURL
 					"<ns0:pathSet>parent</ns0:pathSet>"				\
 					"<ns0:pathSet>datastore</ns0:pathSet>"				\
 					"<ns0:pathSet>config.virtualNicManagerInfo.netConfig</ns0:pathSet>"\
-					"<ns0:pathSet>config.storageDevice.scsiLun</ns0:pathSet>"	\
-					"<ns0:pathSet>config.storageDevice.multipathInfo</ns0:pathSet>"	\
+					"<ns0:pathSet>config.storageDevice.scsiTopology</ns0:pathSet>"	\
 					"%s"								\
 				"</ns0:propSet>"							\
 				"<ns0:propSet>"								\
@@ -3125,6 +3132,8 @@ out:
 	zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%s", __func__, zbx_result_string(ret));
 
 	return ret;
+
+#	undef	ZBX_POST_HV_DETAILS
 }
 
 /******************************************************************************
@@ -3262,6 +3271,95 @@ out:
 	zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%s", __func__, zbx_result_string(ret));
 
 	return ret;
+
+#	undef	ZBX_POST_HV_DATACENTER_NAME
+#	undef	ZBX_POST_SOAP_FOLDER
+#	undef	ZBX_POST_SOAP_CUSTER
+}
+
+/******************************************************************************
+ *                                                                            *
+ * Function: vmware_service_hv_get_multipath_data                             *
+ *                                                                            *
+ * Purpose: gets the vmware hypervisor data about ds multipath                *
+ *                                                                            *
+ * Parameters: service      - [IN] the vmware service                         *
+ *             easyhandle   - [IN] the CURL handle                            *
+ *             hv_data      - [IN] the hv data with scsi topology info        *
+ *             hvid         - [IN] the vmware hypervisor id                   *
+ *             xdoc         - [OUT] a reference to output xml document        *
+ *             error        - [OUT] the error message in the case of failure  *
+ *                                                                            *
+ * Return value: SUCCEED - the operation has completed successfully           *
+ *               FAIL    - the operation has failed                           *
+ *                                                                            *
+ ******************************************************************************/
+static int	vmware_service_hv_get_multipath_data(const zbx_vmware_service_t *service, CURL *easyhandle,
+		xmlDoc *hv_data, const char *hvid, xmlDoc **xdoc, char **error)
+{
+#	define ZBX_POST_HV_MP_DETAILS									\
+		ZBX_POST_VSPHERE_HEADER									\
+		"<ns0:RetrievePropertiesEx>"								\
+			"<ns0:_this type=\"PropertyCollector\">%s</ns0:_this>"				\
+			"<ns0:specSet>"									\
+				"<ns0:propSet>"								\
+					"<ns0:type>HostSystem</ns0:type>"				\
+					"<ns0:pathSet>config.storageDevice.multipathInfo</ns0:pathSet>"	\
+					"%s"								\
+				"</ns0:propSet>"							\
+				"<ns0:objectSet>"							\
+					"<ns0:obj type=\"HostSystem\">%s</ns0:obj>"			\
+					"<ns0:skip>false</ns0:skip>"					\
+				"</ns0:objectSet>"							\
+			"</ns0:specSet>"								\
+			"<ns0:options/>"								\
+		"</ns0:RetrievePropertiesEx>"								\
+		ZBX_POST_VSPHERE_FOOTER
+
+#	define ZBX_POST_SCSI_INFO									\
+		"<ns0:pathSet>config.storageDevice.scsiLun[\"%s\"].canonicalName</ns0:pathSet>"
+
+	zbx_vector_str_t	scsi_luns;
+	char			*tmp = NULL, *scsi_req = NULL, *hvid_esc;
+	int			i, ret = FAIL;
+
+	zabbix_log(LOG_LEVEL_DEBUG, "In %s() hvid:'%s'", __func__, hvid);
+
+	zbx_vector_str_create(&scsi_luns);
+	zbx_xml_read_values(hv_data, ZBX_XPATH_HV_SCSI_TOPOLOGY, &scsi_luns);
+	zabbix_log(LOG_LEVEL_DEBUG, "%s() scsiLun:'%d'", __func__, scsi_luns.values_num);
+
+	if (0 == scsi_luns.values_num)
+	{
+		ret = SUCCEED;
+		goto out;
+	}
+
+	for (i = 0; i < scsi_luns.values_num; i++)
+	{
+		scsi_req = zbx_strdcatf(scsi_req , ZBX_POST_SCSI_INFO, scsi_luns.values[i]);
+	}
+
+	hvid_esc = xml_escape_dyn(hvid);
+	tmp = zbx_dsprintf(tmp, ZBX_POST_HV_MP_DETAILS,
+			vmware_service_objects[service->type].property_collector, scsi_req, hvid_esc);
+	zbx_free(hvid_esc);
+	zbx_free(scsi_req);
+
+	if (SUCCEED != zbx_soap_post(__func__, easyhandle, tmp, xdoc, error))
+		goto out;
+
+	ret = SUCCEED;
+out:
+	zbx_free(tmp);
+	zbx_vector_str_clear_ext(&scsi_luns, zbx_str_free);
+	zbx_vector_str_destroy(&scsi_luns);
+	zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%s", __func__, zbx_result_string(ret));
+
+	return ret;
+
+#	undef	ZBX_POST_SCSI_INFO
+#	undef	ZBX_POST_HV_MP_DETAILS
 }
 
 /******************************************************************************
@@ -3393,44 +3491,6 @@ clean:
 	return mi_access;
 }
 
-/******************************************************************************
- *                                                                            *
- * Function: vmware_get_multipath_count                                       *
- *                                                                            *
- * Purpose: retrieves multipath count                                         *
- *                                                                            *
- * Parameters: xdoc           - [IN] xml document                             *
- *             xpath          - [IN] xpath                                    *
- *             multipath_num  - [OUT] count                                   *
- *                                                                            *
- * Return value: SUCCEED - the count was retrieved successfully               *
- *               FAIL    - otherwise                                          *
- *                                                                            *
- ******************************************************************************/
-static int	vmware_get_multipath_count(xmlDoc *xdoc, const char *xpath, int *multipath_num)
-{
-	xmlXPathContext	*xpathCtx;
-	xmlXPathObject	*xpathObj;
-	int		ret = FAIL;
-
-	xpathCtx = xmlXPathNewContext(xdoc);
-
-	if (NULL == (xpathObj = xmlXPathEvalExpression((xmlChar *)xpath, xpathCtx)))
-		goto out;
-
-	if (XPATH_NUMBER == xpathObj->type)
-	{
-		*multipath_num = (int)xpathObj->floatval;
-		ret = SUCCEED;
-	}
-
-	xmlXPathFreeObject(xpathObj);
-out:
-	xmlXPathFreeContext(xpathCtx);
-
-	return ret;
-}
-
 /******************************************************************************
  *                                                                            *
  * Function: vmware_dsname_compare                                            *
@@ -3467,7 +3527,7 @@ static int	vmware_service_init_hv(zbx_vmware_service_t *service, CURL *easyhandl
 		zbx_vector_vmware_datastore_t *dss, zbx_vmware_hv_t *hv, char **error)
 {
 	char			*value;
-	xmlDoc			*details = NULL;
+	xmlDoc			*details = NULL, *multipath_data = NULL;
 	zbx_vector_str_t	datastores, vms;
 	int			i, j, ret = FAIL;
 
@@ -3510,6 +3570,11 @@ static int	vmware_service_init_hv(zbx_vmware_service_t *service, CURL *easyhandl
 
 	zbx_xml_read_values(details, ZBX_XPATH_HV_DATASTORES(), &datastores);
 	zbx_vector_vmware_dsname_reserve(&hv->dsnames, datastores.values_num);
+	zabbix_log(LOG_LEVEL_DEBUG, "%s(): %d datastore are connected to hypervisor \"%s\"", __func__,
+			datastores.values_num, hv->id);
+
+	if (SUCCEED != vmware_service_hv_get_multipath_data(service, easyhandle, details, id, &multipath_data, error))
+		goto out;
 
 	for (i = 0; i < datastores.values_num; i++)
 	{
@@ -3533,25 +3598,43 @@ static int	vmware_service_init_hv(zbx_vmware_service_t *service, CURL *easyhandl
 		dsname = (zbx_vmware_dsname_t *)zbx_malloc(NULL, sizeof(zbx_vmware_dsname_t));
 		dsname->name = zbx_strdup(NULL, ds->name);
 		zbx_vector_vmware_hvdisk_create(&dsname->hvdisks);
+		zabbix_log(LOG_LEVEL_DEBUG, "%s(): for %d diskextents check multipath at ds:\"%s\"", __func__,
+				ds->diskextents.values_num, ds->name);
 
-		for (j = 0; j < ds->diskextents.values_num; j++)
+		for (j = 0; NULL != multipath_data && j < ds->diskextents.values_num; j++)
 		{
 			zbx_vmware_diskextent_t	*diskextent = ds->diskextents.values[j];
 			zbx_vmware_hvdisk_t	hvdisk;
-			char			tmp[MAX_STRING_LEN];
+			char			tmp[MAX_STRING_LEN], *lun;
 
-			zbx_snprintf(tmp, sizeof(tmp), ZBX_XPATH_HV_MULTIPATH_PATHS(), diskextent->diskname);
+			zbx_snprintf(tmp, sizeof(tmp), ZBX_XPATH_HV_LUN(),diskextent->diskname);
 
-			if (SUCCEED != vmware_get_multipath_count(details, tmp, &hvdisk.multipath_total))
+			if (NULL == (lun = zbx_xml_read_doc_value(multipath_data, tmp)))
+			{
+				zabbix_log(LOG_LEVEL_DEBUG, "%s(): not found diskextent: %s",
+						__func__, diskextent->diskname);
 				continue;
+			}
 
-			zbx_snprintf(tmp, sizeof(tmp), ZBX_XPATH_HV_MULTIPATH_ACTIVE_PATHS(), diskextent->diskname);
+			zbx_snprintf(tmp, sizeof(tmp), ZBX_XPATH_HV_MULTIPATH_PATHS(), lun);
+
+			if (SUCCEED != zbx_xml_read_doc_num(multipath_data, tmp, &hvdisk.multipath_total) ||
+					0 == hvdisk.multipath_total)
+			{
+				zabbix_log(LOG_LEVEL_DEBUG, "%s(): for diskextent: %s not found for lun: %s",
+						__func__, diskextent->diskname, lun);
+				zbx_free(lun);
+				continue;
+			}
 
-			if (SUCCEED != vmware_get_multipath_count(details, tmp, &hvdisk.multipath_active))
+			zbx_snprintf(tmp, sizeof(tmp), ZBX_XPATH_HV_MULTIPATH_ACTIVE_PATHS(), lun);
+
+			if (SUCCEED != zbx_xml_read_doc_num(multipath_data, tmp, &hvdisk.multipath_active))
 				hvdisk.multipath_active = 0;
 
 			hvdisk.partitionid = diskextent->partitionid;
 			zbx_vector_vmware_hvdisk_append(&dsname->hvdisks, hvdisk);
+			zbx_free(lun);
 		}
 
 		zbx_vector_vmware_hvdisk_sort(&dsname->hvdisks, ZBX_DEFAULT_UINT64_COMPARE_FUNC);
@@ -3580,6 +3663,7 @@ static int	vmware_service_init_hv(zbx_vmware_service_t *service, CURL *easyhandl
 
 	ret = SUCCEED;
 out:
+	zbx_xml_free_doc(multipath_data);
 	zbx_xml_free_doc(details);
 
 	zbx_vector_str_clear_ext(&vms, zbx_str_free);
@@ -6554,6 +6638,12 @@ static char	*zbx_xml_read_node_value(xmlDoc *doc, xmlNode *node, const char *xpa
 	if (NULL == (xpathObj = xmlXPathEvalExpression((const xmlChar *)xpath, xpathCtx)))
 		goto clean;
 
+	if (XPATH_STRING == xpathObj->type)
+	{
+		value = zbx_strdup(NULL, (const char *)xpathObj->stringval);
+		goto clean;
+	}
+
 	if (0 != xmlXPathNodeSetIsEmpty(xpathObj->nodesetval))
 		goto clean;
 
@@ -6594,6 +6684,44 @@ static char	*zbx_xml_read_doc_value(xmlDoc *xdoc, const char *xpath)
 	return zbx_xml_read_node_value(xdoc, root_element, xpath);
 }
 
+/******************************************************************************
+ *                                                                            *
+ * Function: zbx_xml_read_doc_num                                             *
+ *                                                                            *
+ * Purpose: retrieves numeric xpath value                                     *
+ *                                                                            *
+ * Parameters: xdoc  - [IN] xml document                                      *
+ *             xpath - [IN] xpath                                             *
+ *             num   - [OUT] numeric value                                    *
+ *                                                                            *
+ * Return value: SUCCEED - the count was retrieved successfully               *
+ *               FAIL    - otherwise                                          *
+ *                                                                            *
+ ******************************************************************************/
+static int	zbx_xml_read_doc_num(xmlDoc *xdoc, const char *xpath, int *num)
+{
+	xmlXPathContext	*xpathCtx;
+	xmlXPathObject	*xpathObj;
+	int		ret = FAIL;
+
+	xpathCtx = xmlXPathNewContext(xdoc);
+
+	if (NULL == (xpathObj = xmlXPathEvalExpression((xmlChar *)xpath, xpathCtx)))
+		goto out;
+
+	if (XPATH_NUMBER == xpathObj->type)
+	{
+		*num = (int)xpathObj->floatval;
+		ret = SUCCEED;
+	}
+
+	xmlXPathFreeObject(xpathObj);
+out:
+	xmlXPathFreeContext(xpathCtx);
+
+	return ret;
+}
+
 /******************************************************************************
  *                                                                            *
  * Function: zbx_xml_read_values                                              *
diff --git a/src/zabbix_server/vmware/vmware.h b/src/zabbix_server/vmware/vmware.h
index 37ca8cd05d..f34b5e51b7 100644
--- a/src/zabbix_server/vmware/vmware.h
+++ b/src/zabbix_server/vmware/vmware.h
@@ -97,8 +97,8 @@ zbx_vmware_perf_entity_t;
 
 typedef struct
 {
-	char		*diskname;
 	zbx_uint64_t	partitionid;
+	char		*diskname;
 }
 zbx_vmware_diskextent_t;
 
