sudo apt-get install
sudo apt-get install curl apt-transport-https
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-jessie-prod jessie main" > /etc/apt/sources.list.d/microsoft.list'
sudo apt-get update
sudo apt-get install -y powershell
On my system however, I need to make use of Snap packages. This is because MX-Horizon fails to install powershell due to restrictions on libssl1.0 and libicu52.
Anyways this route let me start up Powershell on MX-17 Horizon:
sudo apt-get install snapd
sudo snap install powershell-preview --classic
sudo snap run powershell-preview
Logging into Azure RM account
Running powershell-preview allows you to both run Powershell commands such as Get-ChildItem ("ls") and Unix tools such as ls (!) from the Powershell command line. We will first install the Powershell module AzureRM.NetCore inside the Powershell session, which is running.
Install-Module AzureRM.Netcore
Get-Command -Module AzureRM.Compute.Netcore
The last command is executed to check that the Powershell module is available. Type [Y] to allow the module installation in the first step. Next off, logging into the Azure Resource Manager. Type the following command in Powershell core:
Login-AzureRMAccount
Running this command will prompt a code and tell you to open up a browser window and log on to: https://microsoft.com/devicelogin
Then you log in to your Azure account and if you are successfully logged in, your Powershell core session is authenticated and you can access your Azure account and its resources!
Creating the Virtual machine in Azure
Creating the virtual machine is done in several steps. The script below is to be saved into a Powershell script file, forexample AzureVmCreate.ps1. There are many steps involved into establishing an installation of a VM in Azure. We will in this sample set up all the necessities to get an Ubuntu Server LTS. If you already have got for example a resource group in Azure, the script below can use this resource group instead of creating a new one. The list of steps are as follows to create a Linux VM in Azure:- Create a resource group
- Create a subnet config
- Create a virtual network, set it up with the subnet config
- Create a public IP
- Create a security rule config to allow port 22 (SSH)
- Create a network security group nsg and add in the security rule config
- Create a network interface card nic and associate it with the public ip and the nsg
- Create a VM config and set the operating system, OS image and nic
- Create a VM config's SHH public key config
- Create a VM - Virtual Machine in Azure !
param([string]$resourceGroupName,
[string]$resourceGroupLocation,
[string]$vmComputerName,
[string]$vmUser,
[string]$vmUserPassword,
[string]$virtualNetworkName)
#Write-Host $resourceGroupName
#Write-Host $resourceGroupLocation
#Write-Host $vmComputerName
#Write-Host $vmUser
#Write-Host $vmUserPassword
# Definer user name and blank password
$securePassword = ConvertTo-SecureString ' ' -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ("azureuser", $securePassword)
New-AzureRmResourceGroup -Name $resourceGroupName -Location $resourceGroupLocation
$subnetConfig = New-AzureRmVirtualNetworkSubnetConfig -Name default -AddressPrefix 10.0.0.0/24
$virtualNetwork = New-AzureRMVirtualNetwork -ResourceGroupName $resourceGroupName -Name `
$virtualNetworkName -AddressPrefix 10.0.0.0/16 -Location $resourceGroupLocation `
-Subnet $subnetConfig
Write-Host "Subnet id: " $virtualNetwork.Subnets[0].Id
# Create a public IP address and specify a DNS name
$pip = New-AzureRmPublicIpAddress -ResourceGroupName $resourceGroupName -Location $resourceGroupLocation `
-Name "mypublicdns$(Get-Random)" -AllocationMethod Static -IdleTimeoutInMinutes 4
# Create an inbound network security group rule for port 22
$nsgRuleSSH = New-AzureRmNetworkSecurityRuleConfig -Name myNetworkSecurityGroupRuleSSH -Protocol Tcp `
-Direction Inbound -Priority 1000 -SourceAddressPrefix * -SourcePortRange * -DestinationAddressPrefix * `
-DestinationPortRange 22 -Access Allow
# Create a network security group
$nsg = New-AzureRmNetworkSecurityGroup -ResourceGroupName $resourceGroupName -Location $resourceGroupLocation `
-Name myNetworkSecurityGroup -SecurityRules $nsgRuleSSH
# Create a virtual network card and associate with public IP address and NSG
$nic = New-AzureRmNetworkInterface -Name myNic -ResourceGroupName $resourceGroupName -Location $resourceGroupLocation `
-SubnetId $virtualNetwork.Subnets[0].Id -PublicIpAddressId $pip.Id -NetworkSecurityGroupId $nsg.Id
# Create a virtual machine configuration
$vmConfig = New-AzureRmVMConfig -VMName $vmComputerName -VMSize Standard_D1 | `
Set-AzureRmVMOperatingSystem -Linux -ComputerName $vmComputerName -Credential $cred -DisablePasswordAuthentication | `
Set-AzureRmVMSourceImage -PublisherName Canonical -Offer UbuntuServer -Skus 14.04.2-LTS -Version latest | `
Add-AzureRmVMNetworkInterface -Id $nic.Id
# Configure SSH Keys
$sshPublicKey = Get-Content "$HOME/.ssh/id_rsa.pub"
Add-AzureRmVMSshPublicKey -VM $vmconfig -KeyData $sshPublicKey -Path "/home/azureuser/.ssh/authorized_keys"
# Create a virtual machine
New-AzureRmVM -ResourceGroupName $resourceGroupName -Location $resourceGroupLocation -VM $vmConfig
We can then instantiate a new VM in Azure running the script above, which will create a standard D1 blade server in Azure
with approx. 3,5 GB RAM and 30 GB disk space with Ubuntu Server LTS latest from the publisher Canonical by calling this script
like for example:
./AzureVmCreate.ps1 -resourceGroupName "SomeResourceGroup" -resourceGroupLocation "northcentralus" "SomeVmComputer" -vmUser "adminUser" -password "s0m3CoolPassw0rkzzD" -virtualNetworkName "SomeVirtualNetwork"
After the VM is created, which for me took about 5 minutes time before the VM was up and running in Azure, you can access it by visiting the Azure portal at
https://portal.azure.com
You can then take notice of the public IP adress that the script in this article created and connect with : ssh azureuser@ip_address_to_linux_VM_you_just_created_in_Azure!
The following images shows me logging into the Ubuntu Server LTS Virtual Machine that was created with the Powershell core script in this article!
A complete list of available Linux images can be seen in the Azure marketplace or in the Microsoft Docs: Linux VMs in Azure overview
After installation, you can run the following cmdlet to clean up the resource group and all its resources, including the VM you created for testing.
Remove-AzureRmResourceGroup -Name myResourceGroup
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeleteData Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Data science training in kalyan nagar
Data science training in Bangalore
Data science training in tambaram
Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.
ReplyDeleterpa Training in Chennai
rpa Training in bangalore
rpa Training in pune
blueprism Training in Chennai
blueprism Training in bangalore
blueprism Training in pune
iot-training-in-chennai
his is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
ReplyDeleterpa Training in tambaram
blueprism Training in tambaram
automation anywhere training in tambaram
iot Training in tambaram
rpa training in sholinganallur
blue prism training in sholinganallur
automation anywhere training in sholinganallur
iot training in sholinganallur
I am definitely enjoying your website. You definitely have some great insight and great stories.
ReplyDeletejava training in chennai | java training in bangalore
java training in tambaram | java training in velachery
java training in omr
This comment has been removed by the author.
ReplyDeleteGood Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeleteangularjs Training in chennai
angularjs Training in bangalore
angularjs-Training in tambaram
angularjs-Training in sholinganallur
angularjs-Training in velachery
Greetings. I know this is somewhat off-topic, but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform like yours, and I’m having difficulty finding one? Thanks a lot.
ReplyDeleteAmazon Web Services Training in Tambaram, Chennai|Best AWS Training in Tambaram, Chennai
Amazon Online Training
AWS Training in JayaNagar | Amazon Web Services Training in jayaNagar
Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
ReplyDeletePython training in pune
AWS Training in chennai
Python course in chennai
Thanks for the good words! Really appreciated. Great post. I’ve been commenting a lot on a few blogs recently, but I hadn’t thought about my approach until you brought it up.
ReplyDeleteBest Devops Training institute in Chennai
I am sure this post has helped me save many hours of browsing other related posts just to find what I was looking for. Many thanks!
ReplyDeleteangularjs online Training
angularjs Training in marathahalli
angularjs interview questions and answers
angularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in chennai
It is more useful and knowledgeable.Share more post like this admin.
ReplyDeleteDevOps certification Chennai
DevOps Training in Chennai
DevOps Training near me
DevOps certification
DevOps foundation certificate
DevOps course in Chennai
In the beginning, I would like to thank you much about this great post. Its very useful and helpful for anyone looking for tips to help him learn and master in Angularjs. I like your writing style and I hope you will keep doing this good working.
ReplyDeleteAngularjs Training in Bangalore
Angularjs Training Institute In Bangalore
Android Training Center in Bangalore
Android Institute in Bangalore
Thanks for sharing this information admin, it helps me to learn new things
ReplyDeleteArticle submission sites
Guest posting sites
Amazing information,thank you for your ideas.after along time i have studied
ReplyDeletean interesting information's.we need more updates in your blog.
Selenium Training in Nungambakkam
Selenium Training in Vadapalani
Selenium Training in Kelambakkam
Selenium Training in Padur
thanks for sharing such a nice info.I hope you will share more information like this. please keep on sharing!
ReplyDeleteJava Training in Chennai
German Training Institute in Chennai
german language coaching centres in chennai
Java Training Institute in Chennai
Best Java Training Institute in Chennai
German Training Institutes in Chennai
It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.
ReplyDeleteDevops Training in Chennai | Devops Training Institute in Chennai
It is a great post. Keep sharing such kind of useful information.
ReplyDeleteArticle submission sites
Education
Excellent blog!!!Thanks for sharing. Keep doing more.
ReplyDeleteSpoken English Classes in Chennai
IELTS Coaching in Chennai
English Speaking Classes in Mumbai
IELTS Classes in Mumbai
IELTS Coaching in Mumbai
IELTS Mumbai
Best IELTS Coaching in Mumbai
IELTS Center in Mumbai
Good Post! Thank you so much for sharing this pretty post...
ReplyDeleteData Science Training in Bangalore
Data Science Courses in Bangalore
Data Science Training Institutes in Bangalore
Impressive! I finally found a great post here. Nice article on data science . It's really a nice experience to read your post. Thanks for sharing your innovative ideas to our vision.
ReplyDeleteData Science Course
Data Science Course in Marathahalli
Data Science Course Training in Bangalore
After seeing your article I want to say that the presentation is very good and also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.keep it up.
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
It has been a long time since I've read anything so informative and compelling. I'm waiting for the next article from the writer. Thank you.
ReplyDeleteSEO services in kolkata
Best SEO services in kolkata
SEO company in kolkata
Best SEO company in kolkata
Top SEO company in kolkata
Top SEO services in kolkata
SEO services in India
SEO copmany in India
I thought I was solid with my thoughts on this, yet with your composing ability, you have figured out how to change over my convictions into your new thoughts. Mallorca is enjoyable
ReplyDeleteOnline Teaching Platforms
Online Live Class Platform
Online Classroom Platforms
Online Training Platforms
Online Class Software
Virtual Classroom Software
Online Classroom Software
Learning Management System
Learning Management System for Schools
Learning Management System for Colleges
Learning Management System for Universities
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis is really an amazing post, Thanks for sharing.
ReplyDeleteDevOps Training
DevOps Online Training
DevOps Training in Ameerpet
Thank you for the informative post. It was thoroughly helpful to me. Keep posting more such articles and enlighten us.
ReplyDeleteWeb Designing Training Course in Chennai | Certification | Online Training Course | Web Designing Training Course in Bangalore | Certification | Online Training Course | Web Designing Training Course in Hyderabad | Certification | Online Training Course | Web Designing Training Course in Coimbatore | Certification | Online Training Course | Web Designing Training Course in Online | Certification | Online Training Course
ReplyDeleteHi,this is really very interesting to read. Thanks for giving a useful info on DevOps. For more details DevOps Training in Bangalore | Certification | Online Training Course institute | DevOps Training in Hyderabad | Certification | Online Training Course institute | DevOps Training in Coimbatore | Certification | Online Training Course institute | DevOps Online Training | Certification | Devops Training Online
I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
ReplyDeleteData Science Training In Chennai | Certification | Data Science Courses in Chennai | Data Science Training In Bangalore | Certification | Data Science Courses in Bangalore | Data Science Training In Hyderabad | Certification | Data Science Courses in hyderabad | Data Science Training In Coimbatore | Certification | Data Science Courses in Coimbatore | Data Science Training | Certification | Data Science Online Training Course
http://digitalweekday.com/
ReplyDeletehttp://digitalweekday.com/
http://digitalweekday.com/
http://digitalweekday.com/
http://digitalweekday.com/
http://digitalweekday.com/
http://digitalweekday.com/
http://digitalweekday.com/
This comment has been removed by the author.
ReplyDeleteHi
ReplyDeleteI visited your blog you have shared amazing information, i really like the information provided by you, You have done a great work. I hope you will share some more information regarding full movies online. I appreciate your work.
Thanks
Powershell Classes
Took me time to understand all of the comments, but I seriously enjoyed the write-up. It proved being really helpful to me and Im positive to all of the commenters right here! Its constantly nice when you can not only be informed, but also entertained! I am certain you had enjoyable writing this write-up.
ReplyDeletedata science course in hyderabad with placements
I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it. Sap Mm Training Institute In Bangalore | Dot Net Training Institute In Bangalore | Selenium Training Institute in Bangalore
ReplyDeleteThank you for this tutorial! It was very helpful for me as a beginner. You can make video how to do it and post on youtube. Such way you will help more people with this problem. This site https://viplikes.net can help you with youtube likes and views
ReplyDeleteNice writeup, I have also written post on Online Live Class Platform
ReplyDeleteI was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up.
ReplyDeleteWeb Design Cheltenham
SEO Gloucester
SEO Cheltenham
SEO Agency Gloucester
Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too.
ReplyDelete3dwarehouse sketchup houzz atlasobscura myanimelist producthunt spreaker
Excellent effort to make this blog more wonderful and attractive.
ReplyDeletedigital marketing courses in hyderabad with placement
Python Training in Bangalore
ReplyDeleteThank you for sharing valuable information. Thanks for providing a great informatic blog, really nice required information & the things I never imagined. Thanks you once again
Python Classes in Bangalore
On your place I would make a video how to do it and post on youtube. I know that many people use this site https://soclikes.com/ to buy youtube likes, comments and reshares to promote their video
ReplyDeleteI finally found great post here.I will get back here. I just added your blog to my bookmark sites. thanks.Quality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing.data scientist training in hyderabad
ReplyDeleteReally nice blog. Thanks for sharing this awesome blog with us. Keep sharing more.
ReplyDeleteAI Patasala Machine Learning Course
Very nice job... Thanks for sharing this amazing and educative blog post!
ReplyDeletedata science training in malaysia
i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.
ReplyDeleteartificial intelligence course in nashik
Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us,I too always learn something new from your post.
ReplyDeleteartificial intelligence training in hyderabad
Wonderful illustrated information. I thank you for that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject!
ReplyDeletedata science coaching in hyderabad
This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it,
ReplyDeletebusiness analytics training in hyderabad
Impressive. Your story always bring hope and new energy. Keep up the good work. Data Analytics Course in Vadodara
ReplyDeleteI will truly value the essayist's decision for picking this magnificent article fitting to my matter.Here is profound depiction about the article matter which helped me more. digital marketing training malaysia
ReplyDeleteNowadays, every company is running its business on the data. That is why data is considered the most crucial factor of any organization.data science training in gorakhpur
ReplyDeleteNice blog, it is very impressive.
ReplyDeleteSpanish Language Course in Chennai
Spanish Training in Chennai
Hey everyone! We are so thrilled to introduce you to Dynamic Sales Solutions - your go-to experts in web design, digital marketing, and Local SEO ! 🎉 With years of experience under our belts, we have helped countless businesses grow their online presence and skyrocket their success.
ReplyDeleteGreat blog post on creating a new virtual machine in Azure! Overall, this blog post served as a great resource for getting started with creating new virtual machines in Azure. I look forward to reading more of your content!
ReplyDeletealso, check Linux Course in Pune
Very Informative post.
ReplyDeleteask sai baba