Revision 1743b05e

View differences:

src/tm_mad/vcenter/clone
93 93

  
94 94
    # Unmanaged disks are those with OPENNEBULA_MANAGED=NO or volatile disks
95 95
    # that are created in StorageDRS clusters
96
    unmanaged_disk = (!!disk['OPENNEBULA_MANAGED'] && disk['OPENNEBULA_MANAGED'] == "NO") ||
96
    unmanaged_disk = (!!disk['OPENNEBULA_MANAGED'] && disk['OPENNEBULA_MANAGED'].downcase == "no") ||
97 97
                     (target_ds_ref.start_with?('group-') && !!disk["TYPE"] && disk["TYPE"].downcase == "fs")
98 98

  
99 99
    if !unmanaged_disk
src/tm_mad/vcenter/cpds
79 79
    source_ds_ref = ""
80 80

  
81 81
    # If disk is unmanaged get the reference from template
82
    if disk["OPENNEBULA_MANAGED"] && disk["OPENNEBULA_MANAGED"] == "NO"
82
    if disk["OPENNEBULA_MANAGED"] && disk["OPENNEBULA_MANAGED"].downcase == "no"
83 83
        unmanaged_keys = vm.get_unmanaged_keys
84 84
        device_key = unmanaged_keys["opennebula.disk.#{disk["DISK_ID"]}"].to_i
85 85
        image_path, source_ds_ref = vm.get_device_filename_and_ds_from_key(device_key)
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