Lines Matching defs:medium

906     /* In some cases (medium registry related), it is necessary to be able to
908 * has a sensible medium registry. */
3798 ComObjPtr<Medium> medium = static_cast<Medium*>(aM);
3799 if (aMedium && medium.isNull())
3800 return setError(E_INVALIDARG, "The given medium pointer is invalid");
3802 AutoCaller mediumCaller(medium);
3805 AutoWriteLock mediumLock(medium COMMA_LOCKVAL_SRC_POS);
3807 if ( (pAttachTemp = i_findAttachment(mMediaData->mAttachments, medium))
3808 && !medium.isNull()
3812 medium->i_getLocationFull().c_str());
3814 if (!medium.isNull())
3816 MediumType_T mtype = medium->i_getType();
3827 // two reasons: The medium type is a property of the media registry tree, which
3831 // As a result, we can only use these two new types if the medium is NOT in the
3834 if ( medium->i_isInRegistry(uuidGlobalRegistry)
3838 tr("Cannot attach medium '%s': the media type 'MultiAttach' can only be attached "
3840 medium->i_getLocationFull().c_str());
3845 if (!medium.isNull())
3846 fIndirect = medium->i_isReadOnly();
3856 /* check if the medium was attached to the VM before we started
3859 if ((pAttachTemp = i_findAttachment(oldAtts, medium)))
3870 /* Reattach the medium to the VM. */
3879 rc = medium->i_createMediumLockList(true /* fFailIfInaccessible */,
3928 if (medium->i_getParent().isNull())
3949 if (pMedium->i_getBase(&level) == medium)
3960 * descendant of medium will be used
3968 /* Reattach the medium to the VM. */
3977 rc = medium->i_createMediumLockList(true /* fFailIfInaccessible */,
4023 medium = (*foundIt)->i_getMedium();
4024 mediumCaller.attach(medium);
4026 mediumLock.attach(medium);
4035 /* must give up the medium lock and medium tree lock as below we
4063 if (pMedium->i_getBase(&level) == medium)
4068 * descendant of medium will be used
4097 /* re-lock medium tree and the medium, as we need it below */
4104 medium = base;
4105 mediumCaller.attach(medium);
4107 mediumLock.attach(medium);
4118 if (!medium->i_getFirstRegistryMachineId(uuidRegistryParent))
4121 // image that has not yet been attached (medium then points to the base and we're
4127 i_addMediumToRegistry(medium);
4131 medium->i_getFirstRegistryMachineId(uuidRegistryParent);
4134 medium->i_getPreferredDiffFormat(),
4147 medium,
4160 tr("Could not lock medium when creating diff '%s'"),
4173 rc = medium->i_createDiffStorage(diff,
4193 medium = diff;
4194 mediumCaller.attach(medium);
4196 mediumLock.attach(medium);
4203 medium,
4217 if (associate && !medium.isNull())
4219 // as the last step, associate the medium to the VM
4220 rc = medium->i_addBackReference(mData->mUuid);
4227 i_addMediumToRegistry(medium);
4244 if (!medium.isNull())
4248 rc = medium->i_createMediumLockList(true /* fFailIfInaccessible */,
4485 tr("Setting the non-rotational medium flag rejected as the device attached to device slot %d on port %d of controller '%s' is not a hard disk"),
4528 tr("Setting the discard medium flag rejected as the device attached to device slot %d on port %d of controller '%s' is not a hard disk"),
4717 /* Remember previously mounted medium. The medium before taking the
4725 return setError(E_INVALIDARG, "The given medium pointer is invalid");
5107 // This list collects the medium objects from all medium attachments
5133 // add the media from the medium attachments of the snapshots to llMedia
5278 /* Close the medium, deliberately without checking the return
5281 * as above we even managed to delete the medium. */
5292 // medium storage files from the IMedium list passed in, and the
5412 return setError(E_INVALIDARG, "The given medium pointer with index %d is invalid", i);
5416 /* At this point the medium should not have any back references
8558 * for each attached medium in the config.
9213 ComObjPtr<Medium> medium;
9221 false /* fRefresh */, medium);
9227 medium);
9230 // ahead without this removeable medium attachment
9237 rc = mParent->i_findHardDiskById(dev.uuid, true /* aDoSetError */, &medium);
9254 AutoWriteLock hdLock(medium COMMA_LOCKVAL_SRC_POS);
9256 if (medium->i_getType() == MediumType_Immutable)
9262 medium->i_getLocationFull().c_str(),
9270 medium->i_getLocationFull().c_str(),
9276 if (medium->i_getType() == MediumType_MultiAttach)
9282 medium->i_getLocationFull().c_str(),
9290 medium->i_getLocationFull().c_str(),
9297 && medium->i_getChildren().size() != 0
9302 medium->i_getLocationFull().c_str(),
9306 medium->i_getChildren().size());
9309 medium))
9312 medium->i_getLocationFull().c_str(),
9323 medium->i_getLocationFull().c_str(),
9340 medium->i_getLocationFull().c_str(),
9351 medium,
9365 /* associate the medium with this machine and snapshot */
9366 if (!medium.isNull())
9368 AutoCaller medCaller(medium);
9370 AutoWriteLock mlock(medium COMMA_LOCKVAL_SRC_POS);
9373 rc = medium->i_addBackReference(mData->mUuid, *puuidSnapshot);
9375 rc = medium->i_addBackReference(mData->mUuid);
9376 /* If the medium->addBackReference fails it sets an appropriate
9381 medium->i_addRegistry(*puuidRegistry);
10542 * Ensures that the given medium is added to a media registry. If this machine
10546 * Caller must NOT hold machine lock, media tree or any medium locks!
10562 /* Paranoia checks: do not hold medium locks. */
10566 // decide which medium registry to use now that the medium is attached:
10578 * medium isn't yet associated with any medium registry. Do that now. */
10731 aProgress->SetNextOperation(Bstr(tr("Skipping attachment without medium")).raw(),
10734 aProgress->SetNextOperation(BstrFmt(tr("Skipping medium '%s'"),
10767 * the push_back? Looks like we're going to release medium with the
10778 /* The currently attached medium will be read-only, change
10973 /* Was this medium attached before? */
10987 * map contents (which will unlock all media) since the medium
11012 // Remove medium associated with this attachment.
11160 LogFlowThisFunc(("Entering, medium of attachment is %s\n", oldmedium ? oldmedium->i_getLocationFull().c_str() : "NULL"));
11263 * medium lock, and the lock order is parent to child. */
11271 * - are of normal medium type
11346 LogFlowThisFunc(("Examining current medium '%s' (implicit: %d)\n",
11387 /* was this medium attached before? */
11393 LogFlowThisFunc(("--> medium '%s' was attached before, will not remove\n", pMedium->i_getName().c_str()));
11414 LogFlowThisFunc(("detaching medium '%s' from machine\n", pMedium->i_getName().c_str()));
11422 /* unlock since medium is not used anymore */
13527 /* Remember previously mounted medium. The medium before taking the
14200 * extended error info objects per each inaccessible medium.
14224 /* Collect locking information for all medium objects attached to the VM. */
14234 // There can be attachments without a medium (floppy/dvd), and thus
14235 // it's impossible to create a medium lock list. It still makes sense
14236 // to have the empty medium lock list in the map in case a medium is