Quantcast
Channel: Azure Virtual Machines forum
Viewing all 12545 articles
Browse latest View live

Temporary Drive with pre-defined data - is it possible?

$
0
0
Can I have temporary drive attached to a Azure VM with some pre-defined data, every time a VM is allocated?

RC



Anyone else finding 2016-Nano-Server builds running very slowly (or erroring) when using powershell....

$
0
0

Hi,

I've got a script that I'm writing which spins up multiple VMs in a resource group on Azure. For "normal" 2012 and 2016 Datacenter Offerings, each VM takes about 9 minutes to spin up.

When I replace the offering with 2016-Nano-Server I get lots of error messages about long running code and the VMs never appear. Building them by hand in the portal works and takes about 3 minutes.

Anyone else seeing the same?

Example code:

$now = get-date
write-host "$(get-date) - --------------------------------------------------------------------"
write-host "$(get-date) - Example Azure Script starts $now (demo purposes only)"
write-host "$(get-date) - --------------------------------------------------------------------"

$resourceGroupName = "noobExample_RG"
$location = "northeurope"
$myStorageAcctName = "noobexamplestorage"
$adminAcctName = "noobAdmin"
Write-host "Enter a Password which you can use to logon to the new VMs with:"
$adminAccPassword = read-host
$baseVMName = "WIN-NOOB-"
$totalServers = 3

# login
login-azurermaccount

# resource group, ties related resources together (i can delete it all with one command later for example).
write-host "$(get-date) - create resource group"
$resourceGroup = new-azurermresourcegroup -name $resourceGroupName -location $location

# storage account, lump of storage space offered by MS (can be used as internet accessible file share, or diagnostic storage area, or SQL db location etc...)
write-host "$(get-date) - create storage acct"
$myStorageAcct = New-AzureRmStorageAccount -resourceGroupName $resourceGroupName -name $myStorageAcctName -SkuName "Standard_LRS" -kind "Storage" -Location $location

# virtual network which all our VMs will end up. (we can setup site to site VPNs to extend our network into the cloud and section
# that off from the internet if we want, but this just sets up a simple network
write-host "$(get-date) - create virtual network"
$mySubnet = New-AzureRmVirtualNetworkSubnetConfig -Name "mySubnet" -AddressPrefix 10.0.0.0/24

# subnet inside the virtual network setup
write-host "$(get-date) - create subnet in vnet"
$myVnet = New-AzureRmVirtualNetwork -Name "myVnet" -ResourceGroupName $resourceGroupName -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $mySubnet

# setup a public ip that'd host our website/external service or whatever.
write-host "$(get-date) - create a public ip"
$myPublicIp = New-AzureRmPublicIpAddress -Name "myPublicIp" -ResourceGroupName $resourceGroupName -Location $location -AllocationMethod Dynamic


# setup a VM or two....first grab a credential that will end up being our local admin..
write-host "$(get-date) - set admin credential details to create"
$secpasswd = ConvertTo-SecureString $adminAccPassword -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($adminAcctName, $secpasswd)

# I'm going to setup 5 vms.
write-host "$(get-date) - setup $totalServers VMs (took 30 mins in serial (6mins per VM))"

foreach ($number in 1..$totalServers){

      # setting up a network interface for our VM
      write-host "$(get-date) - --------- (VM $number) -----------"
      write-host "$(get-date) - create a NIC for VM"
      $myNIC = New-AzureRmNetworkInterface -Name "myNIC$number" -ResourceGroupName $resourceGroupName -Location $location -SubnetId $myVnet.Subnets[0].Id

      $vmName = "$baseVMName$number"

     # create a "configuration" object to hold common values for our VM.
      $myVm = New-AzureRmVMConfig -VMName $vmName -VMSize "Standard_A1"

      $myVm = Set-AzureRmVMOperatingSystem -VM $myVm -Windows -ComputerName "myVM" -Credential $cred -ProvisionVMAgent -EnableAutoUpdate

      $myVm = Set-AzureRmVMSourceImage -VM $myVm -PublisherName "MicrosoftWindowsServer" -Offer "WindowsServer" -Skus "2016-Nano-Server" -Version "latest"

      $myVm = Add-AzureRmVMNetworkInterface -VM $myVm -Id $myNIC.Id

      #setup the disk the VM will use.
      $blobPath = "vhds/$vmName-myOsDisk.vhd"
      write-host "$(get-date) -    Blob Path: $blobPath"
      $osDiskUri = $myStorageAcct.PrimaryEndpoints.Blob.ToString() +$blobPath
      write-host "$(get-date) -    osDiskUri: $osDiskUri"

      $vm = Set-AzureRmVMOSDisk -VM $myVm -Name "myOsDisk$number" -VhdUri $osDiskUri -CreateOption fromImage

      #Do it. Create them
      New-AzureRmVM -ResourceGroupName $resourceGroupName -Location $location -VM $myVM

      write-host "$(get-date) - Finished VM Creation"

}
$now2 = get-date
# write out how long it took.
write-host "$(get-date) - finished. Took $(($now2 - $now).minutes) minute(s) and $(($now2 - $now).seconds) second(s)"




Output log of last attempt:

Environment           : AzureCloud
Account               : *******
TenantId              : be7a6363-a51a-43e1-8fda-7f3373a6fb46
SubscriptionId        : e663e862-ba2e-43c0-b439-6d1738b6f394
SubscriptionName      : Azure Pass
CurrentStorageAccount :

11/24/2016 11:26:40 - create resource group
11/24/2016 11:26:41 - create storage acct
11/24/2016 11:27:15 - create virtual network
11/24/2016 11:27:15 - create subnet in vnet
WARNING: The output object type of this cmdlet will be modified in a future release.
11/24/2016 11:27:46 - create a public ip
WARNING: The output object type of this cmdlet will be modified in a future release.
11/24/2016 11:28:18 - set admin credential details to create
11/24/2016 11:28:18 - setup 3 VMs (took 30 mins in serial (6mins per VM))
11/24/2016 11:28:18 - --------- (VM 1) -----------
11/24/2016 11:28:18 - create a NIC for VM
WARNING: The output object type of this cmdlet will be modified in a future release.
11/24/2016 11:28:19 -    Blob Path: vhds/WIN-NOOB-1-myOsDisk.vhd
11/24/2016 11:28:19 -    osDiskUri: https://noobexamplestorage.blob.core.windows.net/vhds/WIN-NOOB-1-myOsDisk.vhd
New-AzureRmVM : Long running operation failed with status 'Failed'.
ErrorCode: VMExtensionProvisioningTimeout
ErrorMessage: Provisioning of VM extension 'BGInfo' has timed out. Extension installation may be taking too long, or extension status could not be obtained.
StartTime: 24/11/2016 11:32:56
EndTime: 24/11/2016 13:03:21
OperationID: 95eb3f8b-b71c-4ddf-9ff0-03e7abfff53d
Status: Failed
At C:\Users\Daed\Documents\GitHub\playingInAzure\azureCreate5VMs.ps1:75 char:7
+       New-AzureRmVM -ResourceGroupName $resourceGroupName -Location $ ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureRmVM], ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand
 
11/24/2016 13:03:26 - Finished VM Creation
11/24/2016 13:03:26 - --------- (VM 2) -----------
11/24/2016 13:03:26 - create a NIC for VM
WARNING: The output object type of this cmdlet will be modified in a future release.
11/24/2016 13:03:28 -    Blob Path: vhds/WIN-NOOB-2-myOsDisk.vhd
11/24/2016 13:03:28 -    osDiskUri: https://noobexamplestorage.blob.core.windows.net/vhds/WIN-NOOB-2-myOsDisk.vhd
New-AzureRmVM : An error occurred while sending the request.
At C:\Users\Daed\Documents\GitHub\playingInAzure\azureCreate5VMs.ps1:75 char:7
+       New-AzureRmVM -ResourceGroupName $resourceGroupName -Location $ ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureRmVM], HttpRequestException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand
 
11/24/2016 14:30:23 - Finished VM Creation
11/24/2016 14:30:23 - --------- (VM 3) -----------
11/24/2016 14:30:23 - create a NIC for VM
WARNING: The output object type of this cmdlet will be modified in a future release.
New-AzureRmNetworkInterface : Your Azure credentials have not been set up or have expired, please run Login-AzureRMAccount to set up your Azure credentials.
At C:\Users\Daed\Documents\GitHub\playingInAzure\azureCreate5VMs.ps1:53 char:16
+ ...    $myNIC = New-AzureRmNetworkInterface -Name "myNIC$number" -Resourc ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureRmNetworkInterface], ArgumentException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.NewAzureNetworkInterfaceCommand
 
Add-AzureRmVMNetworkInterface : Cannot validate argument on parameter 'Id'. The argument is null or empty. Provide an argument that is not null or empty, and then
try the command again.
At C:\Users\Daed\Documents\GitHub\playingInAzure\azureCreate5VMs.ps1:64 char:59
+       $myVm = Add-AzureRmVMNetworkInterface -VM $myVm -Id $myNIC.Id
+                                                           ~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-AzureRmVMNetworkInterface], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Azure.Commands.Compute.AddAzureVMNetworkInterfaceCommand
 
11/24/2016 14:30:23 -    Blob Path: vhds/WIN-NOOB-3-myOsDisk.vhd
11/24/2016 14:30:23 -    osDiskUri: https://noobexamplestorage.blob.core.windows.net/vhds/WIN-NOOB-3-myOsDisk.vhd
New-AzureRmVM : Your Azure credentials have not been set up or have expired, please run Login-AzureRMAccount to set up your Azure credentials.
At C:\Users\Daed\Documents\GitHub\playingInAzure\azureCreate5VMs.ps1:75 char:7
+       New-AzureRmVM -ResourceGroupName $resourceGroupName -Location $ ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureRmVM], ArgumentException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand
 
11/24/2016 14:30:23 - Finished VM Creation
11/24/2016 14:30:23 - finished. Took 4 minute(s) and 10 second(s)




No connection to the server

$
0
0
On the virtual machine for windows, I'm trying to connect the game server of the game Grand Theft Auto San Andreas. Multiplayer using the program. There is an endless connection.

How to get Debian image with memory accounting enabled?

$
0
0

Hi,

We are trying to run a Kubernetes cluster in Azure using Debian Jessie. Kubernetes requires Memory accounting enabled. Currently we update the /etc/default/grub file, then reboot to do this. While this works, this makes the cluster provisioning process more complicated then necessary.

We have considered creating our own custom VHD image based on top of officially endorsed Debian Jessie image. But the issue is according to docs, if we use the custom image, we will lose Azure platform SLA.

"The Azure platform SLA applies to virtual machines running the Linux OS only when one of the endorsed distributions is used. All Linux distributions that are provided in the Azure image gallery are endorsed distributions with the required configuration"

How do we get a official endorsed Debian Jessie image with Memory accounting enabled by default?

Thanks.

Ubuntu16xrdp black screen

$
0
0

Hi  everybody

I created a Ubuntu16 VM in Azure. I want to use XRDP. I found an araticle about configuring XRDP. Unfortunately, When I coonnect to it, it is black screen. I cannot  do anything. Any advice?

Azure Iaas Load balancing

$
0
0

Hi,

I have a web application on a IIS onPrem (single server)

I was told the webApplication will be moved to 2 machines on azure Iaas with a LoadBalancer.

Since the app uses Session variables, how can I set some kind of  client IP affinity and avoid implement outproc session state?

What should I ask to or request from the TI admin people?

Many thanks,

JD 

Would a virtual machine scale set work for me?

$
0
0

Hi,

little confused on the best was to tackle this and just looking to see if perhaps a scale set work for me. if anyone has some insights on this would be greatly appreciated.

Scenario I have three VMs of various sizes in my test environment:

1 x VM running a dynamics CRM software (windows) [ds2]

1 x SQL server [ds12]

1 x SSIS server [a3]

now in our current usage the server load varies sometimes the load may be high with many users connecting to it and performance is impacted other times server is usage is low.

now in our live environment, would having a virtual machine scale set work? by having multiple severs for the both the CRM and SQL servers to scale up and down when needed? does the CRM software have to be installed on all servers in the set? or just one?

any help on this would be greatly appreciated.

thanks


How to setup azure VM ARM with a static IP using the custom extension?

$
0
0

Hi All

I want to create a new azure VM and using custom extension, make the VM as a domain controller [Install windows AD and create a new forest]. I'm using ARM or version 2 portal.

I need to set up a static IP for the VM which is a requirement to create a domain.

In order to do this I need to install ARM Powershell module on the VM, which I'm planing to do using chocolately.

And to set up the static IP for the VM I need to login to the subscription and then run PS.  

Is it possible to setup the static IP without logging to the subscription ? 

Is there a better way of doing this?

Thanks


Cannot remove network interface card on provisioned resource manager VM

$
0
0

I cannot remove NIC to a already provisioned resource manager VM.

Powershell comands used give an error.

$vm = Get-AzureVM -ResourceGroupName dev-rg -Name dev-app01
Remove-AzureVMNetworkInterface -VM $vm -NetworkInterfaceIDs $vm.NetworkInterfaceIDs
Update-AzureVM -VM $vm -ResourceGroupName dev-rg

Debuged PShell:

Body:
{
  "error": {
    "code": "PropertyChangeNotAllowed",
    "target": "windowsConfiguration.additionalUnattendContent",
    "message": "Changing property 'windowsConfiguration.additionalUnattendContent' is not allowed."
  }
}

DEBUG: AzureQoSEvent: CmdletType - UpdateAzureVMCommand; IsSuccess - False; Duration - 00:05:02.4822503; Exception -
Microsoft.WindowsAzure.Commands.Common.ComputeCloudException: PropertyChangeNotAllowed: Changing property
'windowsConfiguration.additionalUnattendContent' is not allowed.
OperationID : '0d731ad8-f6e3-4150-bea9-532e79e2b09d' ---> Hyak.Common.CloudException: PropertyChangeNotAllowed:
Changing property 'windowsConfiguration.additionalUnattendContent' is not allowed.
   at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
   at Microsoft.Azure.Management.Compute.VirtualMachineOperationsExtensions.CreateOrUpdate(IVirtualMachineOperations
operations, String resourceGroupName, VirtualMachine parameters)
   at Microsoft.Azure.Commands.Compute.UpdateAzureVMCommand.<ExecuteCmdlet>b__1()
   at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
   at Microsoft.Azure.Commands.Compute.UpdateAzureVMCommand.ExecuteCmdlet()
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.

Cannot Delete Resource Group

$
0
0
Hi, I tried to delete a resource group and seems not able to do so, with the following error: Failed to delete resource group ___:  Deletion of resource group '____' did not finish within the allowed time as resources with identifiers 'Microsoft.Web/certificates could not be deleted. However, I cannot find Microsoft.Web/certificates in the resource group. Are there a bug?

FTP connection problem

$
0
0

Hi,

I have a virtual machine woth several user accounts. All of them can connect to "user folder" via FTP, but there is one "external device" that won't connect to FTP with correct credentials - If I try to connect with same credentials with my laptom and FTP client, I have no problems.

The device is configured correct, but I can not find out what is the the problem and where can I search for FTP login - transfer problems...

This same device connect to other FTP servers without any problem.

Shielded Virtual Machine

$
0
0

I´m trying to start a shielded VM with Microsoft Azure and followed the description from the web site https://technet.microsoft.com/de-de/library/mt720673.aspx.

After I clicked NEW in the HUB menu I do not see the link Standalone Virtual Machine as described on the web site.

I already have installed a virtual machine but how can I shield it?

Thank you in advance

Olaf


OR

Stopping app pool in one Azure VM in load balanced set sometimes results in 503 service unavailable error

$
0
0

I get Service unavailable 503 error occasionally after stopping app pool in one Azure VM in a load balanced set. I stopped the app pool to perform maintenance on the VM.

Is there a better way to stop requests to one VM and avoid the 503 error?


musical9

CentOS/cPanel/WHM issue

$
0
0

Hi Guys,

Installed CentOS 7.0, then cPanel but I cannot get access to the WHM prompt. When entering the IP, the browser times out.

Communicated with cPanel Support who have successfully logged into Azure and were able to browse within the server, they have outlined that everything has been installed correctly. See comments below.

-----------------------------

<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; -webkit-text-stroke: #000000} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; -webkit-text-stroke: #000000; min-height: 14.0px} span.s1 {font-kerning: none} span.s2 {text-decoration: underline ; font-kerning: none; color: #0069d9; -webkit-text-stroke: 0px #0069d9} </style>

[06:51:51 server1 root@8015929 ~]cPs# netstat -tlpn | grep 2087

tcp        0      0 0.0.0.0:2087            0.0.0.0:*               LISTEN     33815/cpsrvd (SSL)  

And it can be browsed to from within the server:

[06:50:59 server1 root@8015929 ~]cPs# curl localhost:2087

<html><head><META HTTP-EQUIV="refresh" CONTENT="2;URL="></head><body></body></html>

However, from outside of the server, port 2087 is showing as being filtered:

# nmap 40.84.xxx.xxx -p 2087

Starting Nmap 5.51 ( ) at 2016-11-26 01:53 EST

Nmap scan report for 40.84.xxx.xxx

Host is up (0.040s latency).

PORT     STATE    SERVICE

2087/tcp filtered eli

Nmap done: 1 IP address (1 host up) scanned in 0.61 seconds

You will either need to check your firewall configuration again, or perhaps contact your provider/datacenter to inquire if they are filtering non-standard ports from their router/switch to your server.

-----------------------------

I have opened incoming connections in NSG for ports 2087, 2086, 2083 and 2082 however I still get no active connection for WHM through external browsers. I'm really not sure how best to correct the firewall configuration issue.

Any advice you guys could give would be greatly appreciated.

Cheers,


<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; -webkit-text-stroke: #000000} span.s1 {font-kerning: none} </style>

Cannot connect to Azure VM to Debug from Visual Studio 2015

$
0
0

Hello,

I have latest version of VS2015 with the latest version of the Cloud Explorer extension installed. When I click "Enable Debugging" in the Actions pane, some things start in the background (for example, a Key vault gets deployed with my client cert installed), but inevitably fails with the following unhelpful error:

Please help, I am simply trying to connect to debug my deployed application on my VM. It is running on a Windows 2008 R2 VM, deployed via Portal method.


Custom-built beauty: Highpoint 2460x4 - 4x2TB RAID-5 Hitachi Enterprise (5.76TB) nVidia Sil3441 - 2x1TB RAID-0 Samsung Enterprise (1.54TB) HP NC360T LACP team - 2Gbps Netgear GS108Tv2 DD-wrt backbone - open-source rules


Azure self signed certificate for migrating vmware image

$
0
0

I am new to Azure, so excuse me for asking basic questions.

I want to deploy a vmware image to my azure account. I've been reading walk-troughs for that, and have an understanding about the process I have installed 'Microsoft Virtual Machine Converter 3.0' with all dependencies, but I am stuck in the first step - creating the certificate.

I am using JDK keytool for that, and am able to generate the self signed cert. What is not clear is how do I embed my subscription credentials in it?

I am using this command to generate it:

keytool -genkey -alias abc -keystore c:/certs/Azure.pfx -storepass password -validity 3650 -keyalg RSA -keysize 2048 -storetype pkcs12 -dname "xyz"

thanks!

Configure Microsoft Virtual Machine Converter: no storage account available

$
0
0
I am using configuring Microsoft Virtual Machine Converter on Windows Server 2008. I have entered by Subscription ID and Thumbprint. And now being asked to specify my storage account, but the only option available is NONE. I have already created a Storage Account in my portal, but do not see it. And I cannot proceed further. Please help advise.

Docker not starting on Windows 10 Enterprise

$
0
0
Docker will not start on Windows 10 Enterprise. The error is "Unable to write to the database". I did try the Beta version but keep getting the same error. 

WMI Query to get Microsoft HyperV VM Domain

$
0
0
Is there a WMI query that provides the Domain of a VM deployed on a Microsoft Hypervisor? Also, we will be querying the Hypervisor for the same.

Azure credit going down rapidly

$
0
0

I have Azure credit through my MSDN subscription (£95/month).

Normally, this easily lasts the full month as I start the VMs up when required and shut them down.

I've added 1 new VM and for some reason the credit is going down rapidly.  In 10 days it has gone down to £40.

On the Azure Summary Pricing Screen half of the credit has gone to :

PREMIUM STORAGE - PAGE BLOB/P30 (UNITS) - US CENTRAL

I did have some storage accounts which weren't being used - I removed them last week.

Also, all the VMs are stopped AND deallocated when not in use.

How can I see what is using the Premium Storage?

Viewing all 12545 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>