       sr = @getObject(vdi.$SR)
       objectIds.push(sr.id)
 
-    return {
+    return $assign({}, vdi, {
       size,
-      $SR: sr and sr._xapiId,
-      type: vdi.type
-    }
+      $SR: sr and sr._xapiId
+    })
   )
 
   forEach(diskSizesByDevice, (size) => limits.disk += size)

  )

  xapiExistingVdis = existingDisks and map(existingDisks, (vdi, device) =>

    if vdi.size?
      size = parseSize(vdi.size)
      diskSizesByDevice[device] = size

$assign = require 'lodash.assign'
$debug = (require 'debug') 'xo:api:vm'
$filter = require 'lodash.filter'
$findIndex = require 'lodash.findindex'
