Revision 1743b05e src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb

View differences:

src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb
1212 1212
        device_change = []
1213 1213

  
1214 1214
        # Get unmanaged disks in OpenNebula's VM template
1215
        xpath = "TEMPLATE/DISK[OPENNEBULA_MANAGED=\"NO\"]"
1215
        xpath = "TEMPLATE/DISK[OPENNEBULA_MANAGED=\"NO\" or OPENNEBULA_MANAGED=\"no\"]"
1216 1216
        unmanaged_disks = one_item.retrieve_xmlelements(xpath)
1217 1217

  
1218 1218
        if !unmanaged_disks.empty?
......
1241 1241
        end
1242 1242

  
1243 1243
        # Add info for existing nics in template in vm xml
1244
        xpath = "TEMPLATE/NIC[OPENNEBULA_MANAGED=\"NO\"]"
1244
        xpath = "TEMPLATE/NIC[OPENNEBULA_MANAGED=\"NO\" or OPENNEBULA_MANAGED=\"no\"]"
1245 1245
        unmanaged_nics = one_item.retrieve_xmlelements(xpath)
1246 1246

  
1247 1247
        if !unmanaged_nics.empty?
......
1273 1273
        vc_disks = get_vcenter_disks
1274 1274

  
1275 1275
        # Look for unmanaged disks with original size changed
1276
        xpath = "TEMPLATE/DISK[OPENNEBULA_MANAGED=\"NO\" and boolean(ORIGINAL_SIZE)]"
1276
        xpath = "TEMPLATE/DISK[(OPENNEBULA_MANAGED=\"NO\" or OPENNEBULA_MANAGED=\"no\") and boolean(ORIGINAL_SIZE) and ORIGINAL_SIZE != SIZE]"
1277 1277
        unmanaged_resized_disks = one_item.retrieve_xmlelements(xpath)
1278 1278

  
1279 1279
        return if unmanaged_resized_disks.empty?

Also available in: Unified diff