@@ -44,17 +44,17 @@ private static CloudPool createPoolIfNotExists(BatchClient client, String poolId
4444 // See detail of creating IaaS pool at
4545 // https://blogs.technet.microsoft.com/windowshpc/2016/03/29/introducing-linux-support-on-azure-batch/
4646 // Get the sku image reference
47- List <NodeAgentSku > skus = client .accountOperations ().listNodeAgentSkus ();
47+ List <ImageInformation > skus = client .accountOperations ().listSupportedImages ();
4848 String skuId = null ;
4949 ImageReference imageRef = null ;
5050
51- for (NodeAgentSku sku : skus ) {
51+ for (ImageInformation sku : skus ) {
5252 if (sku .osType () == OSType .LINUX ) {
53- for ( ImageReference imgRef : sku .verifiedImageReferences () ) {
54- if (imgRef .publisher ().equalsIgnoreCase (osPublisher )
55- && imgRef .offer ().equalsIgnoreCase (osOffer )) {
56- imageRef = imgRef ;
57- skuId = sku .id ();
53+ if ( sku .verificationType () == VerificationType . VERIFIED ) {
54+ if (sku . imageReference () .publisher ().equalsIgnoreCase (osPublisher )
55+ && sku . imageReference () .offer ().equalsIgnoreCase (osOffer )) {
56+ imageRef = sku . imageReference () ;
57+ skuId = sku .nodeAgentSKUId ();
5858 break ;
5959 }
6060 }
@@ -208,7 +208,7 @@ private static void submitJobAndAddTask(BatchClient client, CloudBlobContainer c
208208 String jobId )
209209 throws BatchErrorException , IOException , StorageException , InvalidKeyException , URISyntaxException {
210210 String BLOB_FILE_NAME = "test.txt" ;
211- String LOCAL_FILE_PATH = "./" + BLOB_FILE_NAME ;
211+ String LOCAL_FILE_PATH = "./PoolAndResourceFile/ " + BLOB_FILE_NAME ;
212212
213213 // Create job run at the specified pool
214214 PoolInformation poolInfo = new PoolInformation ();
0 commit comments