- Offline installation for Machine Learning Server for Windows
- 9.4.7 Downloads
- 9.3.0 Downloads
- 9.2.1 Downloads
- Transfer and place files
- Run setup
- Check log files
- Set environment variables
- Connect and validate
- Next steps
- GetComputerNameExW function (sysinfoapi.h)
- Syntax
- Parameters
- Return value
- Remarks
- Examples
- Tutorial: Create a virtual machine scale set and deploy a highly available app on Windows with Azure PowerShell
- Launch Azure Cloud Shell
- Scale Set overview
- Create a scale set
- Deploy sample application
- Allow traffic to application
- Test your scale set
- Management tasks
- View VMs in a scale set
- Increase or decrease VM instances
- Configure autoscale rules
- Next steps
Offline installation for Machine Learning Server for Windows
Applies to: Machine Learning Server 9.2.1 | 9.3 | 9.4
By default, installers connect to Microsoft download sites to get required and updated components for Machine Learning Server for Windows. If firewall constraints prevent the installer from reaching these sites, you can use an internet-connected device to download files, transfer files to an offline server, and then run setup.
Before you start, review the following article for requirements and general information about setup: Install Machine Learning Server on Windows.
9.4.7 Downloads
On an internet-connected computer, download all of the following files.
Component | Download | Used for |
---|---|---|
Machine Learning Server setup | Get Machine Learning Server for Windows (en_machine_learning_server_for_windows_x64_.zip) from one of these sites: Visual Studio Dev Essentials | ML Server |
MLM | MLM_9.4.7.0_1033.cab | Pre-trained models, R or Python |
Microsoft R Open | SRO_3.5.2.0_1033.cab | R |
Microsoft Python Open | SPO_4.5.12.0_1033.cab (see note below) | Python |
Microsoft Python Server | SPS_9.4.7.0_1033.cab | Python |
Python script | Install-PyForMLS | Python |
If you are performing offline installation using the Python script Install-PyForMLS.ps1 , then after you download SPO_4.5.12.0_1033.cab , rename the file to SPO_9.4.7.0_1033.cab . The installation script expects this filename.
9.3.0 Downloads
On an internet-connected computer, download all of the following files.
Component | Download | Used for |
---|---|---|
Machine Learning Server setup | Get Machine Learning Server for Windows (en_machine_learning_server_for_windows_x64_.zip) from one of these sites: Visual Studio Dev Essentials | R Server |
Pre-trained Models | MLM_9.3.0.0_1033.cab | Pre-trained models, R or Python |
Microsoft R Open 3.4.3.0 | SRO_3.4.3.0_1033.cab | R |
Microsoft Python Open | SPO_9.3.0.0_1033.cab | Python |
Microsoft Python Server | SPS_9.3.0.0_1033.cab | Python |
Python script | Install-PyForMLS | Python |
9.2.1 Downloads
If you require the previous version, use these links instead.
Component | Download | Used for |
---|---|---|
Machine Learning Server setup | Get Machine Learning Server for Windows (en_machine_learning_server_for_windows_x64_.zip) from one of these sites: Visual Studio Dev Essentials | R Server |
Pre-trained Models | MLM_9.2.1.0_1033.cab | Pre-trained models, R or Python |
Microsoft R Open 3.4.3.0 | SRO_3.4.1.0_1033.cab | R |
Microsoft Python Open | SPO_9.2.1.0_1033.cab | Python |
Microsoft Python Server | SPS_9.2.1.0_1033.cab | Python |
Python script | Install-PyForMLS | Python |
Transfer and place files
Use a tool or device to transfer the files to the offline server.
- Put the unzipped en_machine_learning_server_for_windows_x64_.zip file in a convenient folder.
- Right-click Extract All to unpack the file. You should see a folder named MLS93Win. This folder contains ServerSetup.exe.
- Put the CAB files in the setup user’s temp folder: C:\Users \AppData\Local\Temp.
On the offline server, run ServerSetup.exe /offline from the command line to get links for the .cab files used during installation. The list of .cab files appears in the installation wizard, after you select which components to install.
Run setup
After files are placed, use the wizard or run setup from the command line:
Check log files
If there are errors during Setup, check the log files located in the system temp directory. An easy way to get there is typing %temp% as a Run command or search operation in Windows. If you installed all components, your log file list looks similar to this screenshot:
Set environment variables
Create an MKL_CBWR environment variable to ensure consistent output from Intel Math Kernel Library (MKL) calculations.
In Control Panel, click System and Security > System > Advanced System Settings > Environment Variables.
Create a new User or System variable.
- Set variable name to MKL_CBWR
- Set the variable value to AUTO
This step requires a server restart.
Connect and validate
Machine Learning Server executes on demand as R Server or as a Python application. As a verification step, connect to each application and run a script or function.
For R
R Server runs as a background process, as Microsoft ML Server Engine in Task Manager. Server startup occurs when a client application like Rgui.exe connects to the server.
- Go to C:\Program Files\Microsoft\ML Server\R_SERVER\bin\x64.
- Double-click Rgui.exe to start the R Console application.
- At the command line, type search() to show preloaded objects, including the RevoScaleR package.
- Type print(Revo.version) to show the software version.
- Type rxSummary(
., iris) to return summary statistics on the built-in iris sample dataset. The rxSummary function is from RevoScaleR .
For Python
Python runs when you execute a .py script or run commands in a Python console window.
Go to C:\Program Files\Microsoft\ML Server\PYTHON_SERVER.
Double-click Python.exe.
At the command line, type help() to open interactive help.
Type revoscalepy at the help prompt, followed by microsoftml to print the function list for each module.
Paste in the following revoscalepy script to return summary statistics from the built-in AirlineDemo demo data:
Output from the sample dataset should look similar to the following:
Verify CLI
Before you continue, reboot the machine.
Open an Administrator command prompt.
Enter the following command to check availability of the CLI: az ml admin —help . If you receive the following error: az: error argument _command_package: invalid choice: ml , follow the instructions to re-add the extension to the CLI.
Next steps
We recommend starting with any Quickstart tutorial listed in the contents pane.
GetComputerNameExW function (sysinfoapi.h)
Retrieves a NetBIOS or DNS name associated with the local computer. The names are established at system startup, when the system reads them from the registry.
Syntax
Parameters
The type of name to be retrieved. This parameter is a value from the COMPUTER_NAME_FORMAT enumeration type. The following table provides additional information.
Value | Meaning |
---|---|
ComputerNameDnsDomain | The name of the DNS domain assigned to the local computer. If the local computer is a node in a cluster, lpBuffer receives the DNS domain name of the cluster virtual server. |
ComputerNameDnsFullyQualified | The fully qualified DNS name that uniquely identifies the local computer. This name is a combination of the DNS host name and the DNS domain name, using the form HostName.DomainName. If the local computer is a node in a cluster, lpBuffer receives the fully qualified DNS name of the cluster virtual server. |
ComputerNameDnsHostname | The DNS host name of the local computer. If the local computer is a node in a cluster, lpBuffer receives the DNS host name of the cluster virtual server. |
ComputerNameNetBIOS | The NetBIOS name of the local computer. If the local computer is a node in a cluster, lpBuffer receives the NetBIOS name of the cluster virtual server. |
ComputerNamePhysicalDnsDomain | The name of the DNS domain assigned to the local computer. If the local computer is a node in a cluster, lpBuffer receives the DNS domain name of the local computer, not the name of the cluster virtual server. |
ComputerNamePhysicalDnsFullyQualified | The fully qualified DNS name that uniquely identifies the computer. If the local computer is a node in a cluster, lpBuffer receives the fully qualified DNS name of the local computer, not the name of the cluster virtual server. The fully qualified DNS name is a combination of the DNS host name and the DNS domain name, using the form HostName.DomainName. |
ComputerNamePhysicalDnsHostname | The DNS host name of the local computer. If the local computer is a node in a cluster, lpBuffer receives the DNS host name of the local computer, not the name of the cluster virtual server. |
ComputerNamePhysicalNetBIOS | The NetBIOS name of the local computer. If the local computer is a node in a cluster, lpBuffer receives the NetBIOS name of the local computer, not the name of the cluster virtual server. |
A pointer to a buffer that receives the computer name or the cluster virtual server name.
The length of the name may be greater than MAX_COMPUTERNAME_LENGTH characters because DNS allows longer names. To ensure that this buffer is large enough, set this parameter to NULL and use the required buffer size returned in the lpnSize parameter.
On input, specifies the size of the buffer, in TCHARs. On output, receives the number of TCHARs copied to the destination buffer, not including the terminating null character.
If the buffer is too small, the function fails and GetLastError returns ERROR_MORE_DATA. This parameter receives the size of the buffer required, including the terminating null character.
If lpBuffer is NULL, this parameter must be zero.
Return value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError. Possible values include the following.
Return code | Description |
---|---|
ERROR_MORE_DATA | The lpBuffer buffer is too small. The lpnSize parameter contains the number of bytes required to receive the name. |
Remarks
If group policy is not set for the local machine, the GetComputerNameEx function retrieves the NetBIOS or DNS names established at system startup. If group policy is set, the function returns the primary domain name set by group policy. Name changes made by the SetComputerName or SetComputerNameEx functions do not take effect until the user restarts the computer.
If the local computer is not configured to use DNS names, GetComputerNameEx will not return DNS information. To configure the computer to do this, follow the steps outlined in the operating system help and change the primary DNS suffix of the computer, then restart the computer.
The behavior of this function can be affected if the local computer is a node in a cluster. For more information, see ResUtilGetEnvironmentWithNetName and UseNetworkName.
If you are working with environments that use different DNS layouts, where the computer’s FQDN does not match the FQDN of its domain, use LsaQueryInformationPolicy instead.
To compile an application that uses this function, define the _WIN32_WINNT macro as 0x0500 or later. For more information, see Using the Windows Headers.
Examples
The sysinfoapi.h header defines GetComputerNameEx as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Tutorial: Create a virtual machine scale set and deploy a highly available app on Windows with Azure PowerShell
A virtual machine scale set allows you to deploy and manage a set of identical, autoscaling virtual machines. You can scale the number of VMs in the scale set manually. You can also define rules to autoscale based on resource usage such as CPU, memory demand, or network traffic. In this tutorial, you deploy a virtual machine scale set in Azure and learn how to:
Launch Azure Cloud Shell
The Azure Cloud Shell is a free interactive shell that you can use to run the steps in this article. It has common Azure tools preinstalled and configured to use with your account.
To open the Cloud Shell, just select Try it from the upper right corner of a code block. You can also launch Cloud Shell in a separate browser tab by going to https://shell.azure.com/powershell. Select Copy to copy the blocks of code, paste it into the Cloud Shell, and press enter to run it.
Scale Set overview
A virtual machine scale set allows you to deploy and manage a set of identical, autoscaling virtual machines. VMs in a scale set are distributed across logic fault and update domains in one or more placement groups. Placement groups are groups of similarly configured VMs, similar to availability sets.
VMs are created as needed in a scale set. You define autoscale rules to control how and when VMs are added or removed from the scale set. These rules can trigger based on metrics such as CPU load, memory usage, or network traffic.
Scale sets support up to 1,000 VMs when you use an Azure platform image. For workloads with significant installation or VM customization requirements, you may wish to Create a custom VM image. You can create up to 600 VMs in a scale set when using a custom image.
Create a scale set
Create a virtual machine scale set with New-AzVmss. The following example creates a scale set named myScaleSet that uses the Windows Server 2016 Datacenter platform image. The Azure network resources for virtual network, public IP address, and load balancer are automatically created. When prompted, you can set your own administrative credentials for the VM instances in the scale set:
It takes a few minutes to create and configure all the scale set resources and VMs.
Deploy sample application
To test your scale set, install a basic web application. The Azure Custom Script Extension is used to download and run a script that installs IIS on the VM instances. This extension is useful for post deployment configuration, software installation, or any other configuration / management task. For more information, see the Custom Script Extension overview.
Use the Custom Script Extension to install a basic IIS web server. Apply the Custom Script Extension that installs IIS as follows:
Allow traffic to application
To allow access to the basic web application, create a network security group with New-AzNetworkSecurityRuleConfig and New-AzNetworkSecurityGroup. For more information, see Networking for Azure virtual machine scale sets.
Test your scale set
To see your scale set in action, get the public IP address of your load balancer with Get-AzPublicIPAddress. The following example displays the IP address for myPublicIP created as part of the scale set:
Enter the public IP address in to a web browser. The web app is displayed, including the hostname of the VM that the load balancer distributed traffic to:
To see the scale set in action, you can force-refresh your web browser to see the load balancer distribute traffic across all the VMs running your app.
Management tasks
Throughout the lifecycle of the scale set, you may need to run one or more management tasks. Additionally, you may want to create scripts that automate various lifecycle-tasks. Azure PowerShell provides a quick way to do those tasks. Here are a few common tasks.
View VMs in a scale set
To view a list of VM instances in a scale set, use Get-AzVmssVM as follows:
The following example output shows two VM instances in the scale set:
To view additional information about a specific VM instance, add the -InstanceId parameter to Get-AzVmssVM. The following example views information about VM instance 1:
Increase or decrease VM instances
To see the number of instances you currently have in a scale set, use Get-AzVmss and query on sku.capacity:
You can then manually increase or decrease the number of virtual machines in the scale set with Update-AzVmss. The following example sets the number of VMs in your scale set to 3:
If takes a few minutes to update the specified number of instances in your scale set.
Configure autoscale rules
Rather than manually scaling the number of instances in your scale set, you define autoscale rules. These rules monitor the instances in your scale set and respond accordingly based on metrics and thresholds you define. The following example scales out the number of instances by one when the average CPU load is greater than 60% over a 5-minute period. If the average CPU load then drops below 30% over a 5-minute period, the instances are scaled in by one instance:
For more design information on the use of autoscale, see autoscale best practices.
Next steps
In this tutorial, you created a virtual machine scale set. You learned how to:
- Use the Custom Script Extension to define an IIS site to scale
- Create a load balancer for your scale set
- Create a virtual machine scale set
- Increase or decrease the number of instances in a scale set
- Create autoscale rules
Advance to the next tutorial to learn more about load balancing concepts for virtual machines.