LevT
Platinum Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору KLASS Дык у меня нет такой задачи. Пока народ "зреет", я лучше ещё чего нарою и научусь быстро настраивать. Добавлено: VHDs & differencing disks So, now that we know our lab VMs are based upon ‘media, how do we go from nothing to having the underlying VHDs created for our VMs? In a normal scenario, you might create a VHD, boot the VM from an ISO or PXE server, and install the OS onto the VHD. Or, you might create a single VM, sysprep it and copy that VM and its VHDs. Repeat this process for each VM and youll soon realise that this requires a lot of storage space and a lot of time. To make this process more efficient, Lability starts by creating a ‘master VHD the first time we reference a specific piece of media. This is our base image that includes only the bare essentials (eg. recommended hotfixes, WMF 5.0 if not natively installed) and any VMs that reference this piece of media will create a differencing disk from the master. The differencing disks store only the changes from the master VHD, so instead of having 10 VMs, each with an operating system VHD attached at around 20GB (99% of which may be exactly the same on each VM), each disk will only be a few GB and simply refers back to the master VHD as its ‘base. This also means that instead of spinning up a VM, adding a VHD and then installing the OS onto this disk - which is around a 20 minute process on average - we just create a differencing disk from our existing master image and were up and running in a matter of mere minutes. To recap, when you try to spin up a VM using media youve not used before… The media will be downloaded (if not already present locally). The ‘master VM will be created. The OS will be installed in an unattended fashion (autounattend.xml injected). The VM will be sysprepped and saved wherever we pointed our MasterVirtualHardDisks folder. The ‘master VM will be removed (We only need the VHD after all). The differencing disk will be created for the VM(s) we requested. For any subsequent VMs that use the same media, it will only have to create a differencing disk from the existing master VHD. An aside on differencing disks Whenever differencing disks are used, we have to ensure the master VHD does not change location/get deleted and the contents don't get altered. Altering the master VHD will corrupt all differencing disks in the disk chain, so they are usually marked as Read Only. In our case, it's not the end of the world if our differencing disks did get corrupted as we have all of our config saved, ready to rapidly spin them back up again! http://www.absolutejam.co.uk/blog/lability-ultimate-hyperv-lab-tool/ Добавлено: С дочернего диска можно грузиться на физическом железе, если оба они с родительским заранее исключены из дедупликации (или принудительно разжаты\деоптимизированы) Добавлено: Код: Set-LabHostDefault -IsoPath \\server\share\lability_iso ` [-ParentVhdPath D:\_No_Deduplication_\vhdparents] ` [-DismPath C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Dism\Microsoft.Dism.PowerShell.dll] #и т. п. параметры $customMedia = @{ Id = 'WIN10_x64_Enterprise_EN_1709'; Filename = 'Win10_1709_English_x64.iso'; Description = 'ISO Windows 10 64bit Enterprise 1709 English'; Architecture = 'x64'; MediaType = 'ISO'; Uri = '\\server\share\IsoSvalka\Win10_1709_English_x64.iso'; ImageName = 'Windows 10 Enterprise' } Register-LabMedia @customMedia |
| Всего записей: 17749 | Зарегистр. 14-10-2001 | Отправлено: 08:51 06-11-2017 | Исправлено: LevT, 09:59 06-11-2017 |
|