@@ -24,11 +24,20 @@ public static async Task<CloudBlobContainer> Run(
2424 const string appPackageVersion = "1.0" ;
2525
2626 // Create and configure an unbound pool.
27- CloudPool pool = batchClient . PoolOperations . CreatePool (
28- poolId : poolId ,
29- virtualMachineSize : "standard_d1_v2" ,
27+ Func < ImageReference , bool > imageScanner = imageRef =>
28+ imageRef . Publisher . Equals ( "MicrosoftWindowsServer" , StringComparison . InvariantCultureIgnoreCase ) &&
29+ imageRef . Offer . Equals ( "WindowsServer" , StringComparison . InvariantCultureIgnoreCase ) &&
30+ imageRef . Sku . IndexOf ( "2012-R2-Datacenter" , StringComparison . InvariantCultureIgnoreCase ) > - 1 ;
31+
32+ ImageInformation imageInfo = await SampleHelpers . GetNodeAgentSkuReferenceAsync ( batchClient , imageScanner ) ;
33+
34+ // Create and configure an unbound pool.
35+ CloudPool pool = batchClient . PoolOperations . CreatePool ( poolId : poolId ,
36+ virtualMachineSize : "standard_d2_v3" ,
3037 targetDedicatedComputeNodes : nodeCount ,
31- cloudServiceConfiguration : new CloudServiceConfiguration ( osFamily : "5" ) ) ;
38+ virtualMachineConfiguration : new VirtualMachineConfiguration (
39+ imageInfo . ImageReference ,
40+ imageInfo . NodeAgentSkuId ) ) ;
3241
3342 // Specify the application and version to deploy to the compute nodes. You must
3443 // first build PersistOutputsTask, then upload it as an application package.
0 commit comments