Tag: Unix

Tar and Curl on Windows 10

Today Microsoft released Windows 10 Insider Preview Build 17063 which includes a lot of great new features like Timeline, Activities, Microsoft Edge, Windows Subsystem for Linux improvements and much more. But Microsoft also included something for IT Pros and Developers. After the OpenSSH client and the OpenSSH server. Microsoft brings two new command-line tools for the Windows toolchain: curl and bsdtar. These tools are very well known tools in the open source world. Including them in Windows should make Windows even a better development platform.

 

Tar on Windows 10
Tar: A command line tool that allows a user to extract files and create archives. Outside of PowerShell or the installation of third party software, there was no way to extract a file from cmd.exe. We’re correcting this behavior 🙂 The implementation we’re shipping in Windows uses libarchive.

curl on Windows 10

Curl: Another command line tool that allows for transferring of files to and from servers (so you can, say, now download a file from the internet).

Why this, so first of all you have PowerShell which has similar functionality, but PowerShell is not always available (Think about Nano Server container images where you have not the Full .Net Framework available). Secondly Developers which come from other operating systems are already familiar with these tools and they can use, as they would on their “old” operating system.

If you want to know more, check out Craig Wihite’s (Microsoft) blog post: Tar and Curl Come to Windows!

As mentioned this is included in the Windows 10 Insider Preview Build 17063 and should ship to production customers in the next Windows 10 release, which might be Windows 10 (1803).



PowerShell SSH Session

Using SSH with PowerShell

Microsoft announced that they will support SSH using PowerShell in Windows 10. Until now Microsoft has a good solution for this, there is a third party solutions called Posh-SSH. To use SSH in PowerShell you first have to install the Posh-SSH PowerShell Module from the PowerShell Gallery. Make sure you are running Windows 10 or you have the Windows Management Framework 5 installed.

If you want to use SSH with PowerShell 6, you read my blog here: Using SSH with PowerShell 6

You can now find the Posh-SSH Module and install it:

PowerShell SSH Installation

 
Install-Module Posh-SSH

You now have several PowerShell SSH cmdlets available:

PowerShell SSH cmdlets

Now you can create a new SSH Session using the following cmdlet (Password based authentication)

PowerShell SSH Session

 
New-SSHSession -ComputerName "thomasmaurer.azure.cloudapp.net" -Credential (Get-Credential)

You can now simply run commands against this session or use SCP to copy files.

PowerShell SSH Commands

 
Invoke-SSHCommand -Index 0 -Command "uname"

I hope this helps you using SSH with PowerShell. If you have any questions, please write it in the comments. Also check out my other blogs and see how SSH is integrated in Windows 10.



How Microsoft Hyper-V and the Cisco UCS changed our lives

Cisco UCS Hardware

At the end of last year we had our Cisco UCS ordered and in your datacenter. In January we started the testing and made the Clusters ready for the production environment. In February we started the migration of our existing environment, mostly P2V and also some V2V migrations.

Here some interessting facts about our Cisco UCS and Hyper-V project.

  • We use 12 Cisco UCS Blades this is like 10 HE of rackspace
  • We migrated 45 Windows Servers and 47 Unix Servers in just one week
  • We replace 2 racks of server with a half rack of two Cisco UCS Bladecenters
  • We think we can replace 2-3 racks more with our two Bladecenters.
  • At the end of this year we think we could replace 4-5 racks with 1/2 rack
  • We still have a lot of physical and virtual server which will be needed to be migrated to the Bladecenter.
  • We will get even more out of our Blade Servers by activting Hyper-V Dynamic Memory as a new feature of Hyper-V R2 ServicePack 1

This migration had a lot of positive influence on other things in the datacenter.

Datacenter Power

  • we need now 4% less energie overall
  • we need now 6% less cooling overall
  • we need less space (1 and 1/2 racks at the moment)
  • now our system administrator travel 50% less to the datacenter, because of hardware defects or other administrative tasks.
  • We can deploy new servers in minutes instead of hours

I think all of this numbers (except the time we need to deploy new servers )will increase after the next migrations.

Now I started to write a series of blog posts about installing Microsoft Hyper-V R2 on the Cisco UCS system:

Microsoft Hyper-V and the Cisco UCS Bladecenter are a powerful team. The UCS Virtual Hardware takes alot of complexety from the hypervisor in your case Hyper-V. You don’t need NIC teaming and stuff like that. Thats is making it very easy to deploy Hyper-V Clusters. And with the Microsoft System Center Virtual Machine Manager you can save a lot of time in managing your clusters, hosts, virtual machine and also in P2V and V2V migrations. Since Microsoft SCVMM supports Windows Powershell you can also do a lot of scripting automation. And with the release of the new Version of SCVMM (System Center Virtual Machine Manager 2012) this will even get better for deploying new virtual machines, services and even public and private clouds.

Hyper-V R2 SP1

We started with Microsoft Hyper-V R2 Servers before the release of Service Pack 1. We think we can even get a lot more out of your systems with the new Dynamic Memory feature for Hyper-V which comes in Service Pack 1.

At the end we think choosing the Cisco UCS, Microsoft Hyper-V and Microsoft System Center Virtual Machine Manager for our datacenter was the best choice we have made, in terms of costs and technology.