使用powershell操作Azure对象

这篇文章 https://devblogs.microsoft.com/premier-developer/how-to-shrink-a-managed-disk/里给出了很多有用的示例代码。这种把代码和注释混在一起的方式很好地解释了脚本代码的意图。(不幸的是,脚本代码很多时候只看一堆参数并不是自我描述的,所以注释是有用的)使用SAS的方式copy vhd是很方便的一个操作。赞。几个用过的power shell file:

ShrinkVM

MoveLinuxVM

MoveWin10VMFromSchwab

移动好虚拟机后还需要建一个NSG(network security group)并关联NIC, 脚本建的NIC默认没有关联任何NSG,所以外网访问不了。当然这也可以用Powershell完成,应该在这里可以找到:https://docs.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-powershell 

不用powershell的话,只用azure cli+cmd窗口也可以完成。下面这篇文章还介绍了用azure cli 更改密码, 如果忘记了虚拟机密码,这个还是很有用的。https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/vmaccess

(和azure网站上Reset Password一样)

 

A whole new world

lyric:

I can show you the world
Shining, shimmering, splendid
Tell me, princess, now when did
You last let your heart decide?

I can open your eyes
Take you wonder by wonder
Over, sideways and under
On a magic carpet ride

A whole new world
A new fantastic point of view
No one to tell us “no”
Or where to go
Or say we’re only dreaming

A whole new world
A dazzling place I never knew
But when I’m way up here
It’s crystal clear
That now I’m in a whole new world with you

(Now I’m in a whole new world with you)

Unbelievable sights
Indescribable feeling
Soaring, tumbling, freewheeling
Through an endless diamond sky

A whole new world
(Don’t you dare close your eyes)
A hundred thousand things to see
(Hold your breath, it gets better)
I’m like a shooting star
I’ve come so far
I can’t go back to where I used to be

A whole new world
(Every turn, a surprise)
With new horizons to pursue
(Every moment, red-letter)
I’ll chase them anywhere
There’s time to spare
Let me share this whole new world with you

A whole new world
(A whole new world)
That’s where we’ll be
(That’s where we’ll be)
A thrilling chase
(A wondrous place)
For you and me

 

 

感想:就像阿拉丁里的这首歌,编程带给我各种感受,有时挫败,有时沮丧,有时欣喜,有时骄傲。但这些,都比不过最重要的一个感受,就是进入一个新领域时一个全新的世界一般的体验。

Birmingham Concert


伯明翰,阿拉巴马州的最大城市,是个大学城,以UAB为主,而UAB最大一块是医疗。所以很多人都从事和医疗相关的行业,而这里的学生也在还未踏出校门前就先在医院里实践了。
因此得以降低医疗成本,吸引外州的病人来就医,而小城市以人少地广的优势,吸引海外学生来求学甚至定居,也带动了整个城市的发展。这里有印度人,阿拉伯人,韩日中各种留学生。
而这种以大学(尤其是医学院)带动小城市发展的模式在美国遍地开花。孟菲斯的UT校园也是个很大的医疗城。
这里气候虽然比较热(但没有奥斯汀热),但植被很多,生活虽然没有大城市(相对来说奥斯汀是大城市了)便利,但基本设施肯定比很多亚洲国家好。问题就是周边没什么大城市,整个州都没有大城市,感觉被隔绝了。
可以想象漂泊异乡的游子在这个地方会有一种脱离感。