System disks quota is 0 for vm imported from Vcenter

Hello,
i imported many vm from Vmware.
I have assigned the VMs to a client and set the quotas. RAM and CPU values ​​are calculated correctly while SYSTEM DISK is always at 0. This way I don’t have a correct disk quota value for the client.
The consumption values ​​on the imported datastores are correct.

[image]

Hello @Zeliko,

Could you please share the output of onevm show <VM_ID> -x and oneimage show <IMAGE_ID> -x for each VM disk.

Best,
Álex.

Hello,
there are the output:
onevm show 77 -x

<VM>
  <ID>77</ID>
  <UID>2</UID>
  <GID>0</GID>
  <UNAME>sdsoluzione</UNAME>
  <GNAME>oneadmin</GNAME>
  <NAME>vps70. - CLUSTER 01</NAME>
  <PERMISSIONS>
    <OWNER_U>1</OWNER_U>
    <OWNER_M>1</OWNER_M>
    <OWNER_A>0</OWNER_A>
    <GROUP_U>0</GROUP_U>
    <GROUP_M>0</GROUP_M>
    <GROUP_A>0</GROUP_A>
    <OTHER_U>0</OTHER_U>
    <OTHER_M>0</OTHER_M>
    <OTHER_A>0</OTHER_A>
  </PERMISSIONS>
  <LAST_POLL>1652172376</LAST_POLL>
  <STATE>3</STATE>
  <LCM_STATE>3</LCM_STATE>
  <PREV_STATE>3</PREV_STATE>
  <PREV_LCM_STATE>3</PREV_LCM_STATE>
  <RESCHED>0</RESCHED>
  <STIME>1651611052</STIME>
  <ETIME>0</ETIME>
  <DEPLOY_ID>vm-2082</DEPLOY_ID>
  <MONITORING>
    <CPU><![CDATA[12.98]]></CPU>
    <DISKRDBYTES><![CDATA[0]]></DISKRDBYTES>
    <DISKRDIOPS><![CDATA[0]]></DISKRDIOPS>
    <DISKWRBYTES><![CDATA[1884160]]></DISKWRBYTES>
    <DISKWRIOPS><![CDATA[3]]></DISKWRIOPS>
    <DISK_0_ACTUAL_PATH><![CDATA[[ST01-16HD-1TB-7K-R10-2HS-H710-1G-2CC] vps70./vps70..vmdk]]></DISK_0_ACTUAL_PATH>
    <GUEST_IP_ADDRESSES><![CDATA[xx.xx.xxx.xxx,192.168.7.170]]></GUEST_IP_ADDRESSES>
    <ID><![CDATA[77]]></ID>
    <MEMORY><![CDATA[5481472]]></MEMORY>
    <NETRX><![CDATA[0]]></NETRX>
    <NETTX><![CDATA[1044480]]></NETTX>
    <TIMESTAMP><![CDATA[1652172376]]></TIMESTAMP>
    <VCENTER_ESX_HOST><![CDATA[10.10.5.13]]></VCENTER_ESX_HOST>
    <VCENTER_GUEST_STATE><![CDATA[running]]></VCENTER_GUEST_STATE>
    <VCENTER_RP_NAME><![CDATA[Priority-High-VM]]></VCENTER_RP_NAME>
    <VCENTER_VMWARETOOLS_RUNNING_STATUS><![CDATA[guestToolsRunning]]></VCENTER_VMWARETOOLS_RUNNING_STATUS>
    <VCENTER_VMWARETOOLS_VERSION><![CDATA[11365]]></VCENTER_VMWARETOOLS_VERSION>
    <VCENTER_VMWARETOOLS_VERSION_STATUS><![CDATA[guestToolsCurrent]]></VCENTER_VMWARETOOLS_VERSION_STATUS>
    <VCENTER_VM_NAME><![CDATA[vps70.]]></VCENTER_VM_NAME>
  </MONITORING>
  <TEMPLATE>
    <AUTOMATIC_DS_REQUIREMENTS><![CDATA[("CLUSTERS/ID" @> 101)]]></AUTOMATIC_DS_REQUIREMENTS>
    <AUTOMATIC_NIC_REQUIREMENTS><![CDATA[("CLUSTERS/ID" @> 101)]]></AUTOMATIC_NIC_REQUIREMENTS>
    <AUTOMATIC_REQUIREMENTS><![CDATA[(CLUSTER_ID = 101) & !(PUBLIC_CLOUD = YES) & !(PIN_POLICY = PINNED)]]></AUTOMATIC_REQUIREMENTS>
    <CONTEXT>
      <DISK_ID><![CDATA[1]]></DISK_ID>
      <ETH0_DNS><![CDATA[]]></ETH0_DNS>
      <ETH0_EXTERNAL><![CDATA[]]></ETH0_EXTERNAL>
      <ETH0_GATEWAY><![CDATA[]]></ETH0_GATEWAY>
      <ETH0_GATEWAY6><![CDATA[]]></ETH0_GATEWAY6>
      <ETH0_IP><![CDATA[xx.xx.xxx.xxx]]></ETH0_IP>
      <ETH0_IP6><![CDATA[]]></ETH0_IP6>
      <ETH0_IP6_GATEWAY><![CDATA[]]></ETH0_IP6_GATEWAY>
      <ETH0_IP6_METHOD><![CDATA[]]></ETH0_IP6_METHOD>
      <ETH0_IP6_METRIC><![CDATA[]]></ETH0_IP6_METRIC>
      <ETH0_IP6_PREFIX_LENGTH><![CDATA[]]></ETH0_IP6_PREFIX_LENGTH>
      <ETH0_IP6_ULA><![CDATA[]]></ETH0_IP6_ULA>
      <ETH0_MAC><![CDATA[00:50:56:b4:39:68]]></ETH0_MAC>
      <ETH0_MASK><![CDATA[]]></ETH0_MASK>
      <ETH0_METHOD><![CDATA[]]></ETH0_METHOD>
      <ETH0_METRIC><![CDATA[]]></ETH0_METRIC>
      <ETH0_MTU><![CDATA[]]></ETH0_MTU>
      <ETH0_NETWORK><![CDATA[]]></ETH0_NETWORK>
      <ETH0_SEARCH_DOMAIN><![CDATA[]]></ETH0_SEARCH_DOMAIN>
      <ETH0_VLAN_ID><![CDATA[]]></ETH0_VLAN_ID>
      <ETH0_VROUTER_IP><![CDATA[]]></ETH0_VROUTER_IP>
      <ETH0_VROUTER_IP6><![CDATA[]]></ETH0_VROUTER_IP6>
      <ETH0_VROUTER_MANAGEMENT><![CDATA[]]></ETH0_VROUTER_MANAGEMENT>
      <ETH1_DNS><![CDATA[]]></ETH1_DNS>
      <ETH1_EXTERNAL><![CDATA[]]></ETH1_EXTERNAL>
      <ETH1_GATEWAY><![CDATA[]]></ETH1_GATEWAY>
      <ETH1_GATEWAY6><![CDATA[]]></ETH1_GATEWAY6>
      <ETH1_IP><![CDATA[192.168.7.170]]></ETH1_IP>
      <ETH1_IP6><![CDATA[]]></ETH1_IP6>
      <ETH1_IP6_GATEWAY><![CDATA[]]></ETH1_IP6_GATEWAY>
      <ETH1_IP6_METHOD><![CDATA[]]></ETH1_IP6_METHOD>
      <ETH1_IP6_METRIC><![CDATA[]]></ETH1_IP6_METRIC>
      <ETH1_IP6_PREFIX_LENGTH><![CDATA[]]></ETH1_IP6_PREFIX_LENGTH>
      <ETH1_IP6_ULA><![CDATA[]]></ETH1_IP6_ULA>
      <ETH1_MAC><![CDATA[00:50:56:b4:70:66]]></ETH1_MAC>
      <ETH1_MASK><![CDATA[]]></ETH1_MASK>
      <ETH1_METHOD><![CDATA[]]></ETH1_METHOD>
      <ETH1_METRIC><![CDATA[]]></ETH1_METRIC>
      <ETH1_MTU><![CDATA[]]></ETH1_MTU>
      <ETH1_NETWORK><![CDATA[]]></ETH1_NETWORK>
      <ETH1_SEARCH_DOMAIN><![CDATA[]]></ETH1_SEARCH_DOMAIN>
      <ETH1_VLAN_ID><![CDATA[]]></ETH1_VLAN_ID>
      <ETH1_VROUTER_IP><![CDATA[]]></ETH1_VROUTER_IP>
      <ETH1_VROUTER_IP6><![CDATA[]]></ETH1_VROUTER_IP6>
      <ETH1_VROUTER_MANAGEMENT><![CDATA[]]></ETH1_VROUTER_MANAGEMENT>
      <NETWORK><![CDATA[YES]]></NETWORK>
      <SSH_PUBLIC_KEY><![CDATA[]]></SSH_PUBLIC_KEY>
      <TARGET><![CDATA[hda]]></TARGET>
    </CONTEXT>
    <CPU><![CDATA[2]]></CPU>
    <DISK>
      <ALLOW_ORPHANS><![CDATA[NO]]></ALLOW_ORPHANS>
      <CLONE><![CDATA[NO]]></CLONE>
      <CLONE_TARGET><![CDATA[SYSTEM]]></CLONE_TARGET>
      <CLUSTER_ID><![CDATA[101]]></CLUSTER_ID>
      <DATASTORE><![CDATA[ST01-16HD-1TB-7K-R10-2HS-H710-1G-2CC(IMG)]]></DATASTORE>
      <DATASTORE_ID><![CDATA[104]]></DATASTORE_ID>
      <DEV_PREFIX><![CDATA[sd]]></DEV_PREFIX>
      <DISK_ID><![CDATA[0]]></DISK_ID>
      <DISK_SNAPSHOT_TOTAL_SIZE><![CDATA[0]]></DISK_SNAPSHOT_TOTAL_SIZE>
      <DISK_TYPE><![CDATA[FILE]]></DISK_TYPE>
      <DRIVER><![CDATA[vmdk]]></DRIVER>
      <FORMAT><![CDATA[vmdk]]></FORMAT>
      <IMAGE><![CDATA[vps70.-02]]></IMAGE>
      <IMAGE_ID><![CDATA[77]]></IMAGE_ID>
      <IMAGE_STATE><![CDATA[8]]></IMAGE_STATE>
      <LN_TARGET><![CDATA[NONE]]></LN_TARGET>
      <OPENNEBULA_MANAGED><![CDATA[NO]]></OPENNEBULA_MANAGED>
      <ORIGINAL_SIZE><![CDATA[51200]]></ORIGINAL_SIZE>
      <PERSISTENT><![CDATA[YES]]></PERSISTENT>
      <READONLY><![CDATA[NO]]></READONLY>
      <SAVE><![CDATA[YES]]></SAVE>
      <SIZE><![CDATA[51200]]></SIZE>
      <SOURCE><![CDATA[vps70./vps70..vmdk]]></SOURCE>
      <TARGET><![CDATA[sda]]></TARGET>
      <TM_MAD><![CDATA[vcenter]]></TM_MAD>
      <TYPE><![CDATA[FILE]]></TYPE>
      <VCENTER_DS_REF><![CDATA[datastore-25]]></VCENTER_DS_REF>
      <VCENTER_INSTANCE_ID><![CDATA[f4ca420f-47bf-4da0-ae48-1bce5bd30242]]></VCENTER_INSTANCE_ID>
    </DISK>
    <GRAPHICS>
      <LISTEN><![CDATA[0.0.0.0]]></LISTEN>
      <PORT><![CDATA[5977]]></PORT>
      <TYPE><![CDATA[vnc]]></TYPE>
    </GRAPHICS>
    <IMPORTED><![CDATA[YES]]></IMPORTED>
    <MEMORY><![CDATA[6144]]></MEMORY>
    <NIC>
      <AR_ID><![CDATA[71]]></AR_ID>
      <BRIDGE><![CDATA[Pubblica-DPortGroup]]></BRIDGE>
      <BRIDGE_TYPE><![CDATA[vcenter_port_groups]]></BRIDGE_TYPE>
      <CLUSTER_ID><![CDATA[101]]></CLUSTER_ID>
      <IP><![CDATA[xx.xx.xxx.xxx]]></IP>
      <MAC><![CDATA[00:50:56:b4:39:68]]></MAC>
      <MAC_IMPORTED><![CDATA[00:50:56:a4:ef:b2]]></MAC_IMPORTED>
      <NAME><![CDATA[VC_NIC0]]></NAME>
      <NETWORK><![CDATA[Pubblica-DPortGroup]]></NETWORK>
      <NETWORK_ID><![CDATA[2]]></NETWORK_ID>
      <NIC_ID><![CDATA[0]]></NIC_ID>
      <OPENNEBULA_MANAGED><![CDATA[NO]]></OPENNEBULA_MANAGED>
      <SECURITY_GROUPS><![CDATA[0]]></SECURITY_GROUPS>
      <TARGET><![CDATA[one-77-0]]></TARGET>
      <VCENTER_INSTANCE_ID><![CDATA[f4ca420f-47bf-4da0-ae48-1bce5bd30242]]></VCENTER_INSTANCE_ID>
      <VCENTER_NET_REF><![CDATA[dvportgroup-109]]></VCENTER_NET_REF>
      <VCENTER_PORTGROUP_TYPE><![CDATA[Distributed Port Group]]></VCENTER_PORTGROUP_TYPE>
      <VCENTER_SWITCH_NAME><![CDATA[Pubblica-Switch]]></VCENTER_SWITCH_NAME>
      <VN_MAD><![CDATA[vcenter]]></VN_MAD>
    </NIC>
    <NIC>
      <AR_ID><![CDATA[75]]></AR_ID>
      <BRIDGE><![CDATA[Privata-DPortGroup]]></BRIDGE>
      <BRIDGE_TYPE><![CDATA[vcenter_port_groups]]></BRIDGE_TYPE>
      <CLUSTER_ID><![CDATA[101]]></CLUSTER_ID>
      <IP><![CDATA[192.168.7.170]]></IP>
      <MAC><![CDATA[00:50:56:b4:70:66]]></MAC>
      <MAC_IMPORTED><![CDATA[00:50:56:a4:2b:28]]></MAC_IMPORTED>
      <NAME><![CDATA[VC_NIC1]]></NAME>
      <NETWORK><![CDATA[Privata-DPortGroup]]></NETWORK>
      <NETWORK_ID><![CDATA[1]]></NETWORK_ID>
      <NIC_ID><![CDATA[1]]></NIC_ID>
      <OPENNEBULA_MANAGED><![CDATA[NO]]></OPENNEBULA_MANAGED>
      <SECURITY_GROUPS><![CDATA[0]]></SECURITY_GROUPS>
      <TARGET><![CDATA[one-77-1]]></TARGET>
      <VCENTER_INSTANCE_ID><![CDATA[f4ca420f-47bf-4da0-ae48-1bce5bd30242]]></VCENTER_INSTANCE_ID>
      <VCENTER_NET_REF><![CDATA[dvportgroup-106]]></VCENTER_NET_REF>
      <VCENTER_PORTGROUP_TYPE><![CDATA[Distributed Port Group]]></VCENTER_PORTGROUP_TYPE>
      <VCENTER_SWITCH_NAME><![CDATA[Privata-DSwitch]]></VCENTER_SWITCH_NAME>
      <VN_MAD><![CDATA[vcenter]]></VN_MAD>
    </NIC>
    <OS>
      <UUID><![CDATA[23121a3c-3291-4599-a1ca-102c2be108d8]]></UUID>
    </OS>
    <SECURITY_GROUP_RULE>
      <PROTOCOL><![CDATA[ALL]]></PROTOCOL>
      <RULE_TYPE><![CDATA[OUTBOUND]]></RULE_TYPE>
      <SECURITY_GROUP_ID><![CDATA[0]]></SECURITY_GROUP_ID>
      <SECURITY_GROUP_NAME><![CDATA[default]]></SECURITY_GROUP_NAME>
    </SECURITY_GROUP_RULE>
    <SECURITY_GROUP_RULE>
      <PROTOCOL><![CDATA[ALL]]></PROTOCOL>
      <RULE_TYPE><![CDATA[INBOUND]]></RULE_TYPE>
      <SECURITY_GROUP_ID><![CDATA[0]]></SECURITY_GROUP_ID>
      <SECURITY_GROUP_NAME><![CDATA[default]]></SECURITY_GROUP_NAME>
    </SECURITY_GROUP_RULE>
    <TM_MAD_SYSTEM><![CDATA[vcenter]]></TM_MAD_SYSTEM>
    <VCPU><![CDATA[2]]></VCPU>
    <VMID><![CDATA[77]]></VMID>
  </TEMPLATE>
  <USER_TEMPLATE>
    <DESCRIPTION><![CDATA[vCenter Template \
                imported by OpenNebula from Cluster ]]></DESCRIPTION>
    <HYPERVISOR><![CDATA[vcenter]]></HYPERVISOR>
    <LOGO><![CDATA[images/logos/windows8.png]]></LOGO>
    <VCENTER_CCR_REF><![CDATA[domain-c7]]></VCENTER_CCR_REF>
    <VCENTER_DS_REF><![CDATA[datastore-25]]></VCENTER_DS_REF>
    <VCENTER_ESX_HOST><![CDATA[10.10.5.15]]></VCENTER_ESX_HOST>
    <VCENTER_INSTANCE_ID><![CDATA[f4ca420f-47bf-4da0-ae48-1bce5bd30242]]></VCENTER_INSTANCE_ID>
  </USER_TEMPLATE>
  <HISTORY_RECORDS>
    <HISTORY>
      <OID>77</OID>
      <SEQ>0</SEQ>
      <HOSTNAME>CLUSTER 01</HOSTNAME>
      <HID>0</HID>
      <CID>101</CID>
      <STIME>1651611052</STIME>
      <ETIME>0</ETIME>
      <VM_MAD><![CDATA[vcenter]]></VM_MAD>
      <TM_MAD><![CDATA[vcenter]]></TM_MAD>
      <DS_ID>105</DS_ID>
      <PSTIME>1651611052</PSTIME>
      <PETIME>1651611052</PETIME>
      <RSTIME>1651611052</RSTIME>
      <RETIME>0</RETIME>
      <ESTIME>0</ESTIME>
      <EETIME>0</EETIME>
      <ACTION>0</ACTION>
      <UID>-1</UID>
      <GID>-1</GID>
      <REQUEST_ID>-1</REQUEST_ID>
    </HISTORY>
  </HISTORY_RECORDS>
</VM>

oneimage show 77 -x

<IMAGE>
  <ID>77</ID>
  <UID>0</UID>
  <GID>0</GID>
  <UNAME>oneadmin</UNAME>
  <GNAME>oneadmin</GNAME>
  <NAME>vps70.-02</NAME>
  <PERMISSIONS>
    <OWNER_U>1</OWNER_U>
    <OWNER_M>1</OWNER_M>
    <OWNER_A>0</OWNER_A>
    <GROUP_U>0</GROUP_U>
    <GROUP_M>0</GROUP_M>
    <GROUP_A>0</GROUP_A>
    <OTHER_U>0</OTHER_U>
    <OTHER_M>0</OTHER_M>
    <OTHER_A>0</OTHER_A>
  </PERMISSIONS>
  <TYPE>0</TYPE>
  <DISK_TYPE>0</DISK_TYPE>
  <PERSISTENT>1</PERSISTENT>
  <REGTIME>1651611049</REGTIME>
  <SOURCE><![CDATA[vps70./vps70..vmdk]]></SOURCE>
  <PATH><![CDATA[vcenter://vps70./vps70..vmdk]]></PATH>
  <FORMAT><![CDATA[vmdk]]></FORMAT>
  <FS><![CDATA[]]></FS>
  <SIZE>51200</SIZE>
  <STATE>8</STATE>
  <PREV_STATE>8</PREV_STATE>
  <RUNNING_VMS>1</RUNNING_VMS>
  <CLONING_OPS>0</CLONING_OPS>
  <CLONING_ID>-1</CLONING_ID>
  <TARGET_SNAPSHOT>-1</TARGET_SNAPSHOT>
  <DATASTORE_ID>104</DATASTORE_ID>
  <DATASTORE>ST01-16HD-1TB-7K-R10-2HS-H710-1G-2CC(IMG)</DATASTORE>
  <VMS>
    <ID>77</ID>
  </VMS>
  <CLONES/>
  <APP_CLONES/>
  <TEMPLATE>
    <DEV_PREFIX><![CDATA[sd]]></DEV_PREFIX>
    <VCENTER_IMPORTED><![CDATA[YES]]></VCENTER_IMPORTED>
  </TEMPLATE>
  <SNAPSHOTS>
    <ALLOW_ORPHANS><![CDATA[NO]]></ALLOW_ORPHANS>
    <CURRENT_BASE><![CDATA[-1]]></CURRENT_BASE>
    <NEXT_SNAPSHOT><![CDATA[0]]></NEXT_SNAPSHOT>
  </SNAPSHOTS>
</IMAGE>

Hello @Zeliko,

It seems that the image is owned by oneadmin user, quotas doesn’t apply to this user, this is why is not computed.

Best,
Álex.

Hello @ahuertas ,
i changed the owner but the quota for system disk it has not changed.
The quota changes only if I create a virtual machine from scratch by importing a template.

Hello @ahuertas,
is it possible to transform images into system datastore? Is it possible to have assistance, even paying for it, since a month has gone by without having a solution?

Hello @Zeliko,

Images cannot be transformed into system datastore, they are completely different concepts. An image is something that is going to be a DISK when the VM template is instantiated, the system datastore is the datastore that contains all the information about running VMs.

You can check opennebula.io for OpenNebula professional services.

Best,
Álex.