You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: Detailed-Setup-Instructions.md
+62-29Lines changed: 62 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ Please refer to this document to assist in installing and setting up the `PSAuto
4
4
5
5
It is also assumed that you have administrator rights to your computer and can makes changes. If your computer is controlled by Group Policy, you may encounter problems. You should also be logged in with a local or domain user account. The setup process may not work properly if using an O365 or Microsoft account to logon to Windows.
6
6
7
-
> It is *possible* to run this module with nested virtualization inside a Windows 10 Hyper-V virtual machine but it is **not** recommended. Some networking features may not work properly and overall performance will likely be reduced.
7
+
It is *possible* to run this module with nested virtualization inside a Windows 10 Hyper-V virtual machine but it is **not** recommended. Some networking features may not work properly and overall performance will likely be reduced.
8
8
9
9
## Pre-Check
10
10
11
-
TYou can run these commands to verify your computer meets the minimum requirements. Run all PowerShell commands in an elevated session.
11
+
You can run these commands to verify your computer meets the minimum requirements. Run all PowerShell commands in an elevated session.
12
12
13
13
### Operating System and Memory
14
14
@@ -22,7 +22,7 @@ Microsoft Windows 10 Pro 32
22
22
23
23
If the Caption shows anything other than Pro or Enterprise this module may not work. Although it appears that Windows 10 Education might be supported. In fact, if you can't even open a PowerShell prompt, this module won't work on your computer.
24
24
25
-
The memory size should be at least 12. 16 or greater is recommended. If the number is less than 12, **STOP**. It is unlikely you have enough installed memory. Depending on the configuration you want to run, it *might* be possible to proceed with less memory. Open an Issue and ask for guidance indicating your memory settings from this command:
25
+
The memory size should be at least 12GB. 16GB or greater is recommended. If the number is less than 12, **STOP**. It is unlikely you have enough installed memory. Depending on the configuration you want to run, it *might* be possible to proceed with less memory. Open an Issue and ask for guidance indicating your memory settings from this command:
This is what you should see as a result. Any errors mean that PowerShell remoting is disabled. Enable it from your **elevated** PowerShell session. This will fail if your only network connection is over a public network.
51
51
52
-
```text
53
-
PS C:\ Enable-PSRemoting -force
52
+
```powershell
53
+
Enable-PSRemoting -force
54
54
```
55
55
56
56
If this fails, **STOP**. Do not proceed with this module until this is working and `Test-WSMan` gives you a result. If you are running as Administrator and this command fails it is most likely because the related settings are controlled by a Group Policy or your network is public. Run `Get-NetConnectionProfile` and look at the NetworkCategory. If must be `Private` or `DomainAuthenticated`.
@@ -68,20 +68,20 @@ D 477 183 38.41 Healthy
68
68
C 237 87 36.71 Healthy
69
69
```
70
70
71
-
You should have close to 100GB of free space on a fixed hard drive such as C or D. This module has not been tested running from a externally connected drive.
71
+
You should have close to 100GB of free space on a fixed hard drive such as C or D. The module will setup an Autolab folder on drive C: by default, although you can specify an alternate drive. This module has not been tested running from a externally connected drive.
72
72
73
73
### Virtualization
74
74
75
-
The module requires the Hyper-V feature on Windows 10. Please refer to documentation for your computer to determine if it supports virtualization. You may need to configure settings in your BIOS. You don't need to manually enable the Hyper-V feature now, although you are welcome to if you want to verify it is available.
75
+
The module requires the Hyper-V feature on Windows 10. Please refer to documentation for your computer hardware to determine if it supports virtualization. You may need to configure settings in your BIOS. You don't need to manually enable the Hyper-V feature now, although you are welcome to if you want to verify it is available.
76
76
77
77
## Installation and Configuration
78
78
79
79
### Install the Module
80
80
81
81
If you meet the requirements, you are ready to download and install this module. **Do not download anything from this GitHub repository.** In your PowerShell session run this command:
You may be prompted to update to a newer version of `nuget`. Answer "yes". You might also be prompted about installing from an untrusted source. Again, you will need to say "yes". After installation you can verify using `Get-Module`.
You may see a newer version number than what is indicated here. The `README` file indicates the current version in the PowerShell Gallery.
101
101
102
102
### Setup the Host
103
103
104
-
You have to setup your computer one-time to use this module. In your elevated PowerShell session run this command:
104
+
There is a one-time step to setup your computer for the AutoLab environment. In your elevated PowerShell session run this command:
105
105
106
-
```text
107
-
PS C:\> Setup-Host
106
+
```powershell
107
+
Setup-Host
108
108
```
109
109
110
110
This command will create a directory structure for the module and all of its files. The default is `C:\Autolab` which you should be able to accept. If you are low on space or want to use an alternate drive, then you can specify an alternative top level path.
111
111
112
-
```text
113
-
PS C:\> Setup-Host -DestinationPath D:\Autolab
112
+
```powershell
113
+
Setup-Host -DestinationPath D:\Autolab
114
114
```
115
115
116
-
If you select a drive other than C:\ it is recommended you use the `Autolab` folder name. The setup process will install additional modules and files. If necessary, it will enable the Hyper-V feature. If Hyper-V is enabled, please reboot your computer before proceeding.
116
+
If you select a drive other than C:\ it is recommended you use the `Autolab` folder name. The setup process will install additional modules and files. If necessary, it will enable the Hyper-V feature. If Hyper-V is enabled during the setup, please reboot your computer before proceeding.
117
117
118
118
To verify your configuration, run `Get-PSAutolabSetting`.
Another option is to use the `Get-LabSummary` command. This will show you what computers will be created and how they will be created. The Computername will also be the virtual machine name.
The very first time you run a setup, the command will download ISO images of evaluation software from Microsoft. These files will be at least 4GB in size. If you are setting up a domain-based configuration, this means you will be downloading ISO images for Windows Server and Windows 10. This download only happens once.
167
184
168
185
Note that during the validation phase you may see errors. This is to be expected until all of the configurations merge. You can press `Ctrl+C` to break out of the testing. The virtual machines will continue to prepare themselves. Later, you can manually validate the lab:
If you encounter errors running an unattended setup, you should step through the process manually to identify where exactly an error is occurring. Make sure you are in an elevated PowerShell session and you have changed location to the configuration folder. If you have tried to setup the lab before run `Wipe-Lab` to remove previous set up files. Then run each of these commands individually:
193
+
If you encounter errors running an unattended setup, you should step through the process manually to identify where exactly an error is occurring. Make sure you are in an elevated PowerShell session and you have *changed location to the configuration folder*. If you have tried to setup the lab before run `Wipe-Lab` to remove previous set up files. Then run each of these commands individually:
177
194
178
195
*`Setup-Lab`
179
196
*`Enable-Internet`
@@ -193,15 +210,31 @@ You might still see errors or failures, in which case try again in 10 minute int
193
210
194
211
All of the commands in this module have help and examples. You are also encouraged to read the about help topic.
195
212
196
-
```text
197
-
PS C:\> help about_PSAutoLab
213
+
```powershell
214
+
help about_PSAutoLab
198
215
```
199
216
200
217
## Using the Environment Prefix
201
218
202
-
In the `VMConfigurationData.psd1` file for each lab, you will see a commented out section for an environment prefix value. This value exists for special situations where you might have a virtual machine naming collision or want to be able to identify the virtual machines that belong to the AutoLab module. In a normal setup, the Hyper-V virtual machine name will be the same as the hostname in the VM guest. If the lab creates a guest with a computername of `S1`, the Hyper-V virtual machine will also be called `S1`. If you enable prefix setting, the Hyper-V virtual machine name will use the prefix, **but the guest computer name will not.** For example, if you enable the default prefix (you can change it to anything you'd like), you will create a Hyper-V virtual machine with a VMName of `Autolab-S1` but the actual computername will still be `S1`. The validation tests will reference the guest computer name, not the Hyper-V virtual machine name.
219
+
In the `VMConfigurationData.psd1` file for each lab, you will see a commented out section for an environment prefix value. This value exists for special situations where you might have a virtual machine naming collision or want to be able to identify the virtual machines that belong to the AutoLab module. In a normal setup and for almost all users, the Hyper-V virtual machine name will be the same as the hostname (computername) in the VM guest. If the lab creates a guest with a computername of `S1`, the Hyper-V virtual machine will also be called `S1`. If you enable the prefix setting, the Hyper-V virtual machine name will use the prefix, **but the guest computer name will not.** For example, if you enable the default prefix (you can change it to anything you'd like), you will create a Hyper-V virtual machine with a VMName of `Autolab-S1` but the actual computername will still be `S1`. The validation tests will reference the guest computer name, not the Hyper-V virtual machine name.
220
+
221
+
If you must use this feature, open the `VMConfigurationData.psd1` file in a text or code editor. Scroll down to the `NonNodeData` section.
222
+
223
+
```powershell
224
+
NonNodeData = @{
225
+
Lability = @{
226
+
227
+
# You can uncomment this line to add a prefix to the virtual machine name.
228
+
# It will not change the guest computername
229
+
# See https://github.com/pluralsight/PS-AutoLab-Env/blob/master/Detailed-Setup-Instructions.md
230
+
# for more information.
231
+
232
+
#EnvironmentPrefix = 'AutoLab-'
233
+
```
234
+
235
+
Remove the `#` character before `EnvironmentPrefix`. If you want to change the value from `Autolab-` to something else go ahead. The prefix will be inserted before the computername to create the virtual machine name.
203
236
204
-
This setting should only be used in special situations as it can be confusing. While every effort has been made to ensure compatibility with commands in this module, there is no guarantee of 100% success. Also note that any changes you make to the configuration files could be overwritten in future updates.
237
+
This setting should only be used in special situations as it can be confusing. While every effort has been made to ensure compatibility with commands in this module, there is no guarantee of 100% success. Also note that any changes you make to the configuration files could be overwritten in future updates or when you run `Refresh-Host`.
205
238
206
239
## Troubleshooting Tips
207
240
@@ -223,4 +256,4 @@ Wait about 5 minutes and then test again.
223
256
224
257
If encounter problems getting any of this to work, you are welcome to post an Issue. If you get the module installed, please include the results of `Get-PSAutolabSetting`. If your problem is meeting one of the requirements, we will do our best to help. Although if your computer is locked down or otherwise controlled by corporate policies there may not be much that we can do.
0 commit comments