Adding Foreign Disks to a Pack
Most commonly, a foreign disk is a dynamic disk that is allocated on one computer and physically moved to another computer. However, any disk that belongs to a pack other than the online pack is considered to be a foreign disk that belongs to a foreign disk pack.
A foreign pack has the VDS_PKF_FOREIGN flag set in the ulFlags member of the VDS_PACK_PROP structure. Foreign packs are always offline.
The following procedure describes how to import one or more foreign disks.
To import one or more foreign disks
- Move disks to the new computer.
- On the new computer, use the IVdsService::Reenumerate method to install the foreign disks.
- Select the online pack to be the target pack that receives the foreign disks. If no online pack exists, use the IVdsSwProvider::CreatePack method to create a new empty pack.
- Use the IVdsPack::MigrateDisks method to import the disks to the new dynamic pack.
- Use the IVdsSwProvider::QueryPacks method to enumerate the packs and IVdsPack::GetProperties to determine which pack is now the online pack.
If you create a new empty target pack, the foreign disks are not actually migrated to that pack. Instead, the foreign pack is marked online, the VDS_PKF_FOREIGN flag for the pack is cleared (so the pack is no longer foreign), and the target pack that you created is discarded.
- Using VDS