code: def disk_xml(identifier, pool_xml, base_volume_xml, cow):
      
      pool = etree.fromstring(pool_xml)
      base_volume = etree.fromstring(base_volume_xml)
      pool_path = pool.find('.//path').text
      base_path = base_volume.find('.//target/path').text
      target_path = os.path.join(pool_path, '%s.qcow2' % identifier)
      volume_xml = VOLUME_DEFAULT_CONFIG.format(identifier, target_path)
      volume = etree.fromstring(volume_xml)
      base_volume_capacity = base_volume.find(".//capacity")
  
      volume.append(base_volume_capacity)
  
      if cow:
          backing_xml = BACKING_STORE_DEFAULT_CONFIG.format(base_path)
          backing_store = etree.fromstring(backing_xml)
          volume.append(backing_store)
  
      return etree.tostring(volume).decode('utf-8')
docs: Clones volume_xml updating the required fields.
  
       * name
       * target path
       * backingStore