"secureBoot": true
},
2.7) Minimum space requirement in bytes:
"requirements": {
"diskSpace": 0
},
If left at 0, no warning will be displayed.To calculate how much storage space on your default virtual hard drive will be required, simply double the maximum size of the extended VHDX file and add a few GB to be sure.
There is a simple rule like this: A virtual machine will need twice the maximum size of its VHD.Virtual machines with 50 GB virtual hard drives need about 100 GB of free storage on the server to work properly.
For example, if you created a virtual machine using the default 127 GB VHDX file extension.although its file size on the server after installing Windows 10 on a virtual machine is only about 10 GB, but it can and is allowed to expand up to 127 GB in size when the software is installed and the files Information added to virtual machine.In addition, to run a virtual machine requires free storage equivalent to the maximum file size (127 GB in this case) on the same drive to be extended when used.
If you change the DiskSpace value to 280 billion bytes, this warning will show when the user selects this virtual machine in Quick Create:
Note that you must enter the size in bytes without the separator:
"requirements": {
"diskSpace": 2.8 billion
},
2.8) Next is the most important part, setting the location of the VHDX file:
"disk": {"uri": "file: // H: / VHD_Repo / W10PRO_EN -GB.vhdx ", "hash": "sha256: CD662725B917EAF17BCE0AE27D62A75D427DAF69DBAB610DE83D4E283EE535FD", "size": 8862564352, "archiveRelativePath": ""},
2.9) URI (Common Resource Identifier), the repository where the hosted VHD can be located in any of the following locations:
- http:///
http://myfilestorage.mysite.com/W10PRx64.vhdx
- https: //
https://myfilestorage.mysite.com/W10PRx64.vhdx
- ftp: //
ftp://myfilestorage.myFTPServer.com/W10PRx64.vhdx
- file://
file: //MyComputer/MyExternalHDD_Storage/VirtualHardDisks/W10PRx64.vhdx
If your VHDX storage directory is called VHDX_Repo on the local computer drive F: and the VHDX file name is W10PRx64.vhdx , the URI will be as follows:
file: // F: /VHDX_Repo/W10PRx64.vhdx
Attention
Note that if your URI is a network location like a PC or NAS share, you need to use IP plus the port number.In most cases, port 8080 will work, otherwise refer to your NAS manual.
For example, if I have a WD My Cloud Mirror NAS using port 8080, my URI will look like this:
http://192.168.2.106:8080/Public/VHDX_Repo/W10PRx64.vhdx
In case you have access to Azure Blob Storage, the URI will look like this:
https://STORAGE_ACCOUNT.blob.core.windows.net/RESOURCE_GROUP/FOLDER/FILENAME.vhdx
2.10) A SHA256 hash function is required for VHDX file. To get the hash function, use the following command in PowerShell "
Get-FileHash -Path "PATHFILENAME" -Algorithm SHA256
In the screenshot is the SHA256 hash function for a VHDX W10 PRO IP x64 EN-GB (Skippy) .vhdx file in the folder D: Virtual Hard Disks.
Double-click the hash value in PowerShell and press Enter to copy it to Clipboard, then paste it into your configuration file.
2.11) File size is calculated in bytes, with no separator. You will find the exact size of the file by right-clicking on the VHDX file and selecting Properties :
The size of VHDX shown in the screenshot above is 19767754752. In case the two values Size and Size on disk do not match, or only interested in the Size value .
2.12) Logo is a JPG image with dimensions of 130 * 30 pixels.Get the SHA256 hash value as mentioned above in step 2.10 and size as mentioned in step 2.11:
"logo": {"uri": "file: // E: / Users / Kari / OneDrive / Pictures / Hyper-V / TF_Logo.jpg ", "hash": "sha256: 567577C39FFD817A30752FC50004137F85EEB84DD8988C3F6F4EEFC2DDA0BD57", "size": 8325, "archiveRelativePath": ""},
2.13) Icon is a JPG image of 35 * 35 pixels in size:
"symbol": {
"uri": "file: // E: /Users/Kari/OneDrive/Pictures/Hyper-V/W10_35.jpg",
"hash": "sha256: B64B86CB68A35BBFC642D0725D5C570041DFEF66986C4A77EABFDDCB6D33467D",
"size": 1913,
"archiveRelativePath": ""
},
2.14) Thumbnails are images 800 * 450 pixels:
"thumbnail": {"uri": "file: // E: / Users / Kari / OneDrive / Pictures / Hyper-V / W10G -TF.jpg ", "hash": "sha256: 3630837726027EB4E5DCD5259577886ECB7F1EF61332086656D64FF6AAFD4268", "size": 39466, "archiveRelativePath": ""},
2.15) Details section displays additional information in Quick Create. For example, you don't want to count the minimum disk space needed as in step 2.7 above, or use Details.
"details": [
{
"name": "Space required",
"value": "256 GB"
},
{
"name": "Additional info",
"value": "Boots to OOBE (no users)"
}
]
Note that in each block (from step 2.5 to this step), curly braces are always followed by commas, but in the last block, as here is Details , there will be no commas followed}.
Specifically:
"details": [{"name": "Space required", "value": "256 GB" }, < This is a comma followed by curly braces} {"name": "Additional info", "value": "Boots to OOBE (no users)" } < In curly braces in the last block, there are no commas after that ]
2.16) Save the JSON configuration file as you want, with the extension.json .Note that you need a separate JSON file for each virtual machine you want to add to Quick Create.
3.1) Open Registry Editor (WIN + R or, type regedit in Cortana, press Enter).Browse to the following key:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionVirtualization
3.2) Right-click on the right pane, select New> Multi-String Value.
3.3) Rename Multi-String Value to GalleryLocations :
3.4) Double-click Multi-String Value GalleryLocations , add all your JSON files to it, one file corresponding to one line, click OK to save.
Now you have created your own Hyper-V Online Gallery and can create new virtual machines with Windows pre-installed with just one click:
Good luck!
See more: