Giter Club home page Giter Club logo

azurestack-tools's Introduction

Azure Stack

These tools are meant for use with Azure Stack Hub and Integrated Systems

master branch contains the tools compatible with AzureRm version of azure powershell. az branch contains the tools compatible with AzureRm version of azure powershell. We are not changing the default branch master to support Az considering that this would be a breaking change

Tools for using Azure and Azure Stack

To use these tools, obtain Azure Stack compatible Azure PowerShell module. Unless you've installed from other sources, one way to do it is to obtain from public package repositories as follows. Note that both of these could still be used to operate against Azure as well as Azure Stack, but may lack some of the latest Azure features.

To install supported version of azure powershell, please follow the instructions at https://aka.ms/azspsh

Obtain the tools by cloning the git repository. Switch to az branch for Az powershell, master is compatible with AzureRM powershell

Or download the tools with the instructions from the documentaion page https://docs.microsoft.com/en-us/azure-stack/operator/azure-stack-powershell-download

Instructions below are relative to the root of the repo.

Constrains Azure subscription to the capabilities available in the Azure Stack.

  • Apply Azure Stack policy to Azure subscriptions and resource groups

Helps prepare for ASDK deployment.

  • Prepare to Deploy (boot from VHD)
  • Prepare to Redeploy (boot back to original/base OS)

Connect to an Azure Stack ASDK instance from your personal computer/laptop.

  • Connect via VPN to an Azure Stack installation

Create and manage identity related objects and configurations for Azure Stack

Validate Azure ARM Template Capabilities

  • resources - Types, Location, Apiversion
  • Compute Capabilities - extensions, images, sizes
  • Storage Capabilities - skus

Tenant Log collection tool

GuestOS FileName Brief Description
Windows Windows\Panther\FastCleanup\setupact.log Primary log file for most errors that Windows
Windows Windows\Panther\UnattendGC\setupact.log High-level list of errors that occurred during the Windows
Windows Windows\Panther\WaSetup.log Windows Setup includes the ability to review the Windows Setup Windows
Windows Windows\Panther\WaSetup.xml Windows Provisioning Agent log
Windows Windows\Panther\setupact.log Primary log file for most errors that occur during the Windows Windows
Windows Windows\Panther\setuperr.log High-level list of errors that occurred during the specialize Windows
Windows Windows\Panther\unattend.xml Windows Provisioning Agent log
Windows WindowsAzure\Logs\MonitoringAgent.log Windows Guest Agent Monitoring log
Windows WindowsAzure\Logs\Telemetry.log Windows Guest Agent Telemetry service log
Windows WindowsAzure\Logs\TransparentInstaller.log Windows Guest Agent installation log. Windows Windows
Windows WindowsAzure\Logs\WaAppAgent.log Windows Guest Agent log. To see when an update to the Windows
Windows WindowsAzure\Logs\AgentRuntime.log Windows Guest Agent Runtime log
Windows WindowsAzure\Logs\TransparentInstaller.000.log Windows Guest Agent installation log (rollover)
Windows WindowsAzure\Config\myvm0.1.ExtensionConfig.xml XML file containing part of VM’s extension configuration
Linux /var/lib/waagent/ovf-env.xml During provisioning, The Azure platform provides initial data to an instance via an attached CD formatted in UDF. That CD contains a ‘ovf-env.xml’ file that provides configuration/deployment information.
Linux /var/lib/waagent/provisioned This file is just a marker that indicates a VHD has been Linux
Linux /var/log/dmesg* Log file(s) that contain messages from the kernel or device drivers
Linux /var/log/syslog Standardized text-based log file(s) containing logging and event information.
Linux /var/log/messages Standardized text-based log file(s) containing logging and event Linux
Linux /var/log/waagent.log Log file for the Azure Linux agent

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azurestack-tools's People

Contributors

1redone avatar alexandair avatar bganapa avatar bgelens avatar charlesjoy avatar effingerw avatar esthermiao avatar heathl17 avatar igorse avatar jasonzqshen avatar kirtiwandhare avatar knithinc avatar larisaborodina avatar lincolnu avatar marcvaneijk avatar matthewmcglynn avatar mtandon80 avatar ned1313 avatar pappleby64 avatar peiwentian avatar rakku-ms avatar robinbao avatar rupisure avatar sarathys avatar shriramnat avatar sijuman avatar sumantshiv avatar troettinger avatar viananth avatar yunzhangms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azurestack-tools's Issues

Admin cmdlets for restarting infrastructure role fails for AdminArmEndpoint parameter

2017-25-26 01:25:32 [-DVM] [START] Usecase: AzureStack/Infrastructure: Stop, start and restart infrastructure role instance with active alert
2017-25-26 01:25:34 [
-DVM] [EXCEPTION] Parameter set cannot be resolved using the specified named parameters..Exception
2017-25-26 01:25:34 [*-DVM] [END] [FAIL] Usecase: AzureStack/Infrastructure: Stop, start and restart infrastructure role instance with active alert

2017-02-26 02:02:24 [-DVM] [START] Usecase: AzureStack/ComputeAdmin: Download and add Windows/WS2016 image to platform image repository
2017-05-26 02:05:03 [
-DVM] [EXCEPTION] Windows Storage Management Provider: An error was encountered while enumerating objects from subsystem "{81aab163-9b00-46c9-ad75-********}:SS" on host "S-Cluster". Error encountered was MI_RESULT = "MI_RESULT_FAILED" (1).
.Exception
2017-05-26 02:05:03 [
-DVM] [END] [FAIL] Usecase: AzureStack/ComputeAdmin: Download and add Windows/WS2016 image to platform image repository

Error message for an incorrect location in Compute Admin is misleading

2017-23-18 12:23:54 [xxx [ERROR] Could not get the storage context. Please pass in a storage context or set the current storage context..Exception
2017-23-18 12:23:54 [xxx] [FAIL ] Usecase: AzureStack-Tools/ComputeAdmin: Download and add Linux/Ubuntu image to platform image repository
2017-23-18 12:23:54 [xxx] [START] Usecase: AzureStack-Tools/ComputeAdmin: Download and add Windows/WS2012R2 image to platform image repository
2017-23-18 12:23:56 [xxx] [ERROR] Could not get the storage context. Please pass in a storage context or set the current storage context..Exception
2017-23-18 12:23:56 [xxx] [FAIL ] Usecase: AzureStack-Tools/ComputeAdmin: Download and add Windows/WS2012R2 image to platform image repository
2017-23-18 12:23:57 [xxx] [START] Usecase: AzureStack-Tools/ComputeAdmin: Download and add Windows/WS2016 image to platform image repository
2017-24-18 12:24:01 [xxx] [ERROR] Could not get the storage context. Please pass in a storage context or set the current storage context..Exception
2017-24-18 12:24:01 [xxx] [FAIL ] Usecase: AzureStack-Tools/ComputeAdmin: Download and add Windows/WS2016 image to platform image repository
2017-24-18 12:24:02 [xxx] [START] Usecase: AzureStack-Tools/ComputeAdmin: Download and add Windows/WS2016 image to platform image repository
2017-24-18 12:24:04 [xxx] [ERROR] Could not get the storage context. Please pass in a storage context or set the current storage context..Exception
2017-24-18 12:24:04 [xxx] [FAIL ] Usecase: AzureStack-Tools/ComputeAdmin: Download and add Windows/WS2016 image to platform image repository

Error ProviderNotFound: One of the provided resource providers cannot be found..Exception when create plan/quota/offer

We are getting error ProviderNotFound: One of the provided resource providers cannot be found..Exception when try to create plan/quota/offer using tools.

2017-22-18 12:22:58 [xxx] [START] Usecase: AzureStack-Tools/ServiceAdmin: Create plan, offer and quotas
2017-23-18 12:23:04 [xxx] [ERROR] ProviderNotFound: One of the provided resource providers cannot be found..Exception
2017-23-18 12:23:04 [xxx] [FAIL ] Usecase: AzureStack-Tools/ServiceAdmin: Create plan, offer and quotas

Adding WS2016 PIR image fails as local administrator

Adding WS2016 PIR image fails as local administrator
2017-02-26 02:02:24 [-DVM] [START] Usecase: AzureStack/ComputeAdmin: Download and add Windows/WS2016 image to platform image repository
2017-05-26 02:05:03 [
-DVM] [EXCEPTION] Windows Storage Management Provider: An error was encountered while enumerating objects from subsystem "{81aab163-9b00-46c9-ad75-#######}:SS" on host "S-Cluster". Error encountered was MI_RESULT = "MI_RESULT_FAILED" (1).
.Exception
2017-05-26 02:05:03 [***-DVM] [END] [FAIL] Usecase: AzureStack/ComputeAdmin: Download and add Windows/WS2016 image to platform image repository

Improve AzureStack-Tools token retrieval experience

• AzureRm cmdlets and AzureStack cmdlets behave differently where one uses the logged on context versus other logs on for every cmdlet
• Within AzureStack portal/Ux asks one time login and then perform as many CRUD actions on resource as you want. AzureStackAdmin cmdlets tend to login to perform each action.

Note: AzureRm cmdlets don’t login again or ask for EnvironmentName, TenantId, Credentials
Get-AzureRmVMImage
Get-AzureRMResourceGroup

New-AzSTenantOfferAndQuotas -tenantID $aadTenant -EnvironmentName "AzureStackAdmin" -AzureStackCredential $credential
Get-AzSAlert -TenantID $AadTenant -EnvironmentName "AzureStackAdmin" -AzureStackCredential $credential
Note: AzureRm cmdlets don’t need to login again for each cmdlet so why do AzureStack cmdlets need it?

RegisterWithAzure.ps1 script failing

I've been trying to use the RegisterWithAzure.ps1 script.  The usage instructions are pretty clear, and I have followed them VERY closely.  However, my first attempt failed and therefore I assumed that the values for one or more of the parameters was specified incorrectly. I have now tried several variations and in turn have received multiple states of failure.

The current command line I am using is:
.\RegisterWithAzure.ps1 '
-azureSubscriptionId "" '
-azureSubscriptionOwner "" '
-azureDirectory ".onmicrosoft.com"

Due note that the azureSubscriptionOwner is NOT the AAD GLOBAL ADMIN ACCOUNT I used to install the Azure Stack.

The result of the script execution is the following followed by an error of the same nature

WARNING: Task: Invocation of interface 'ConfigureBridgeIdentity' of role 'Cloud\Fabric\AzureBridge' failed:

Function 'AzureBridge:ConfigureBridgeIdentity' in module 'Classes\AzureBridge\AzureBridge.psm1' raised an exception:

An error occurred while trying to make a graph API call: {"error":"invalid_grant","error_description":"AADSTS50034: To sign into this application the account must be added to
the aricbernardhotmail.onmicrosoft.com directory.\r\nTrace ID: 3dab2271-e97f-44e0-a7c6-d7d33a9a0198\r\nCorrelation ID: 4a9038f9-8fd5-49b2-932b-aa6002a3a1b0\r\nTimestamp: 2017-
03-03 04:07:23Z","error_codes":[50034],"timestamp":"2017-03-03 04:07:23Z","trace_id":"3dab2271-e97f-44e0-a7c6-d7d33a9a0198","correlation_id":"4a9038f9-8fd5-49b2-932b-aa6002a3a
1b0"}

Additional details: {
"Method": "POST",
"ResponseUri": "https://login.windows.net/aricbernardhotmail.onmicrosoft.com/oauth2/token?api-version=1.6",
"StatusCode": 400,
"StatusDescription": "Bad Request",
"IsFromCache": false,
"LastModified": "/Date(1488514044578)/"
}
at Invoke-GraphApi, C:\CloudDeployment\Roles\IdentityProvider\GraphAPI.psm1: line 515
at Get-GraphToken, C:\CloudDeployment\Roles\IdentityProvider\GraphAPI.psm1: line 375
at Update-GraphAccessToken, C:\CloudDeployment\Roles\IdentityProvider\GraphAPI.psm1: line 391
at Initialize-GraphEnvironment, C:\CloudDeployment\Roles\IdentityProvider\GraphAPI.psm1: line 219
at SetAzureBridgeIdentityConfiguration, C:\CloudDeployment\Roles\AzureBridge\AzureBridge.psm1: line 235
at ConfigureBridgeIdentity, C:\CloudDeployment\Classes\AzureBridge\AzureBridge.psm1: line 41
at , : line 9 - 3/2/2017 8:07:24 PM

String Checking in Add-VMImage

The Sku and Title properties in Add-VMImage do not allow for a "." in the string. Azure does allow a "." as a character. For instance, the Centos 7.2 image in Azure has a Sku of "7.2" and a Title of "Centos Based 7.2". I suggest changing the error checking to allow for the period.

You override a system variable in AzureStack.ComputeAdmin.ps1

Hi Guys,

you have a bug in the AzureStack.ComputeAdmin.ps1.
This overrides the systemvaribale $Profile in powershell. After this I get the errors that I'm get the follwing errors by run Add-VMImage:

Get-AzureRmVMImage : Run Login-AzureRmAccount to login.
In C:\Users\Paul\Downloads\AzureStack-Tools-master\AzureStack-Tools\ComputeAdmin\AzureStack.ComputeAdmin.psm1:126 Zeichen:9
+     if (Get-AzureRmVMImage -Location $location -PublisherName $publis ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-AzureRmVMImage], PSInvalidOperationException
    + FullyQualifiedErrorId : InvalidOperation,Microsoft.Azure.Commands.Compute.GetAzureVMImageCommand

please fix this :)

Cannot validate argument on parameter 'AadTenantId'. The argument is null.

VERBOSE: Obtaining token from AAD...
Get-AzureStackToken : Cannot validate argument on parameter 'AadTenantId'. The argument is null.
Provide a valid value for the argument, and then try running the command again.
At C:\AzureStack-Tools-master\ServiceAdmin\AzureStack.ServiceAdmin.psm1:41 char:150

  • ... eDirectoryServiceEndpointResourceId -AadTenantId $AADTenantID -Creden ...
  •                                                  ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Get-AzureStackToken], ParameterBindingValidation
      Exception
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.AzureStack.Commands.Sec
      urity.GetToken

PS C:\AzureStack-Tools-master> Get-AzureRmEnvironment -Name $AzureEnvironment

Name : AzureStackCloud
EnableAdfsAuthentication : False
ActiveDirectoryServiceEndpointResourceId : https://api.azurestack.local/18408589-bea1-44d6-a5d0-88f0dfc6195f
AdTenant :
GalleryUrl : https://gallery.azurestack.local/
ManagementPortalUrl :
ServiceManagementUrl :
PublishSettingsFileUrl :
ResourceManagerUrl : https://api.azurestack.local/
SqlDatabaseDnsSuffix :
StorageEndpointSuffix :
ActiveDirectoryAuthority : https://login.windows.net/
GraphUrl : https://graph.windows.net/
GraphEndpointResourceId :
TrafficManagerDnsSuffix :
AzureKeyVaultDnsSuffix :
AzureDataLakeStoreFileSystemEndpointSuffix :
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix :
AzureKeyVaultServiceEndpointResourceId :

New-AzSTenantOfferAndQuotas - BadRequest

Trying to create plans and offers on TP3:

PS C:\AzureStack-Tools\ServiceAdmin> New-AzSTenantOfferAndQuotas -tenantID $aadTenant
cmdlet New-AzSTenantOfferAndQuotas at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
VERBOSE: Obtaining token from AAD...
WARNING: Get-AzureStackToken cmdlet will be deprecated in a future release of AzureStackAdmin module.
VERBOSE: Creating quotas...
VERBOSE: Creating resource group for plans and offers...
New-AzureRmResourceGroup : Operation returned an invalid status code 'BadRequest'
At C:\AzureStack-Tools\ServiceAdmin\AzureStack.ServiceAdmin.psm1:44 char:5

  • New-AzureRmResourceGroup -Name $Name -Location $Location -ErrorAc ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : CloseError: (:) [New-AzureRmResourceGroup], CloudException
    • FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupCmdlet

It is a newly installed environment. All I did was to install Visual Studio 2015 community edition with azure stack powershell 3.0 and afterwards install azurestack module using
Install-Module -Name AzureStack -RequiredVersion 1.2.8 -Scope CurrentUser

Error on applying Azure Stack policy module to an Azure Subscription's Resource Group

I am trying to apply the Azure Stack policy module as per this link ( https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-policy-module ) onto my subscription, but get the following error. The tools download is from the public GitHub repo for Azure-Stack tools. Am I doing something wrong OR is this a bug?

PS C:\AzureStack-Tools-master> New-AzureRmPolicyAssignment -Name AzureStack -PolicyDefinition $policy -Scope /subscriptions/$s.Subscription.SubscriptionId/resourceGroups/$resourceGroupName
New-AzureRmPolicyAssignment : The pipeline has been stopped.
At line:1 char:1

  • New-AzureRmPolicyAssignment -Name AzureStack -PolicyDefinition $polic ...
  •   + CategoryInfo          : CloseError: (:) [New-AzureRmPolicyAssignment], PipelineStoppedException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzurePolicyAssignmentCmdlet
    
    

New-AzureRmPolicyAssignment : BadRequest : The subscription identifier 'Microsoft.Azure.Commands.Profile.Models.PSAzureContext.Subscription.SubscriptionId' exceeded the
maximum length of '64' characters.
At line:1 char:1

  • New-AzureRmPolicyAssignment -Name AzureStack -PolicyDefinition $polic ...
  •   + CategoryInfo          : CloseError: (:) [New-AzureRmPolicyAssignment], ErrorResponseMessageException
      + FullyQualifiedErrorId : BadRequest,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzurePolicyAssignmentCmdlet
    
    
    

Thanks,
Girish.

New-Server2016VMImage fails to add market place item because of an updated AzureStack module.

Doc: https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-add-default-image

New-Server2016VMImage in https://github.com/Azure/AzureStack-Tools/blob/master/ComputeAdmin/AzureStack.ComputeAdmin.psm1 fails with 'Add-AzureRMGalleryItem : A parameter cannot be found that matches parameter name 'SubscriptionId'."

Its because the AzureStack module is updated two days ago to 1.2.9: https://www.powershellgallery.com/packages/AzureStack/1.2.9 , the parameters are not there in version 1.2.9 of Add-AzureRMGalleryItem.

Line 268: "Add-AzureRMGalleryItem -SubscriptionId $subscription -GalleryItemUri $galleryItemURI -ApiVersion 2015-04-01"

New-Server2016VMImage - Error after download image.

The build of the VHD completes, upload works, then after downloading an error occurred about that 'A parameter cannot be found that matches parameter name 'SubscriptionId'.' We had it working on the same hosts (30+) last week. Now its broken since 2 days.

Error message doesn't reflect the reason of failing in case of the wrong arm api endpoint

VERBOSE: Errors are The remote name could not be resolved: 'api.local.azurestack.external'
Failed to verify Aad account, please enter correct azure active directy tenant directory name and service admin account credential
VERBOSE: Cannot login Aad with account:
VERBOSE: Errors are The remote name could not be resolved: 'api.local.azurestack.external'
Failed to verify Aad account, please enter correct azure active directy tenant directory name and service admin account credential

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.