           mode: if readonly then 'RO' else 'RW'
           position: String(position)
           vdi: diskUuid
-          vm: $scope.VM.UUID
+          vm: $scope.VM.id
         }
 
         # console.log(params)

      position++

      params = {
        vm: $scope.VM.UUID
        network: network.UUID
        position: String(position) # TODO
        mtu: String(mtu) || String(network.mtu)
      }

      {CPUs, memory, name_label, name_description, high_availability, auto_poweron} = $data

      $data = {
        id: VM.id
      }
      if memory isnt $scope.memorySize and (memory = sizeToBytesFilter memory)
        $data.memory = memory
