Tag: configure

Install WSL 2

Install WSL 2 on Windows 10

With the Windows 10 Insider Preview Build 18917, the team also ships the first version of the Windows Subsystem for Linux 2 (WSL 2), which was announced at the Microsoft Build 2019 conference. In this post, I am going to show you how you can install WSL 2 on your Windows 10 machine.

The Windows Subsystem for Linux (WSL 1) was in Windows 10 for a while now and allowed you to use different Linux distros directly from your Windows 10 machine. With WSL 2, the architecture will change drastically and will bring increased file system performance and full system call compatibility. WSL 2 is now using virtualization technology (based on Hyper-V) and uses a lightweight utility VM on a real Linux kernel. You can find out more about WSL 2 in the release blog or on the Microsoft Docs Page for WSL 2.

WSL 2 Architecture

Requirements

To install WSL 2, you will need the following requirements:

Install WSL 2

To install the Windows Subsystem for Linux 2 (WSL 2), you need to follow these tasks.

  • Enable the Windows Subsystem for Linux Optional feature (WSL 1 and WSL 2)
  • Install a distro for the Windows Subsystem for Linux
  • Enable the ‘Virtual Machine Platform’ optional feature (WSL 2)
  • Configure the distro to use WSL 2

Enable the Windows Subsystem for Linux

To run the WSL on Windows 10 you will need to install the optional feature:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Install a Linux distro for the Windows Subsystem for Linux

If you don’t already have installed a WSL distro, you can download and install it from the Windows 10 store. You can find more here: Crazy times – You can now run Linux on Windows 10 from the Windows Store

Enable the Virtual Machine Platform feature

WSL 2 Enable Virtual Machine Platform

WSL 2 Enable Virtual Machine Platform

To make use of the virtualization feature for WSL 2, you will need to enable the optional Windows feature. You can run the following PowerShell command to do this. You will need to start PowerShell as an Administrator. After you run this command, you might need a restart of your computer.

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

Set WSL distro to use version 2

After you completed the first two steps, you will need to configure the distro to use WSL 2. Run the following command to list the available distros in PowerShell:

wsl -l -v

To set a distro to WSL 2 you can run the following command:

wsl --set-version DistroName 2

You can also set WSL 2 as the default:

wsl --set-default-version 2

To find out more about installing WSL 2, check out the Microsoft Docs page.

If you are now running your distro using WSL 2, you can now see that there is a Virtual Machine worker process running and if you search a little bit more, you can also find the VHDX file of the distro.

WSL 2 VHDX file

I hope this helps you and gives you a quick overview, if you have any questions, let me know in the comments and check out the WSL 2 FAQ. The Windows Subsystem for Linux 2 Kernel is also open-source, you can follow the project on GitHub.

By the way, you can now also start using Docker Desktop together with the Windows Subsystem for Linux 2.



Cisco UCS Hyper-V Cluster – Configure Blade Servers – Part 4

After we have installed the Cisco Blade Servers we now have to do some configuration on the Hosts.

  1. First I activate Remote Management like Remote Desktop, Remote MMC and Powershell.
  2. I add a Firewall rule for Remote Disk Managment
     netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes

    Firewall Rule

  3. After adding this firewall rule, I install the Multipath I/O feature
     ocsetup MultipathIo
  4. Now you can use the MPclaim command-line tool to manage Multipath I/O
    To view all detected enterprise storage:
     Mpclaim -e

    Add MPIO support for Fibre Channel devices:

     mpclaim.exe -r -i -d < _VendorID> < _ProductID>

    Important: Note that the vendor string length is 8 characters, the product string length is 16 characters, and both fields are padded with spaces as needed.
    More Information about the MPclaim command-line tool
    MPclaim

  5. With diskpart you can now see the disks. And you can format the disks with NTFS. Important after that you should take the disks offline to use them in the cluster.
    Diskpart
  6. In the Configuration Menu enable the Cluster Feature.
  7. On each note the all Cluster disks offline.
    select disk 2
    disk offline

In the next post we will configure the Network Adapters of the Cluster notes and create the virtual networks.



Install and configure IPv6 on Windows Server 2003

On Microsoft Windows Server 2003 there is no GUI to configure IPv6. So this article should show you how to configure IPv6 on a Windows Server 2003.

  1. Install the IPv6 Protocol in the Network Adapter Properties or Control Panel
  2. Open the console
  3. Type “netsh” this is a command line program to configure network adapters
  4. Here are some demo configurations

int ipv6
reset
add dns interface=”<Interface Name>” address=<IPv6 primary DNS IP Address>
add dns interface=”<Interface Name>” address=<IPv6 secondary DNS IP Address>
add route prefix=::/0 interface=”<Interface Name>” metric=0 nexthop=<IPv6 Gateway IP Address>
add address interface=”<Interface Name>” address=<IPv6 IP Address>

int ipv6
reset
add dns interface=”Local Area Connection” address=fec0:0:0:0:ffff::1
add dns interface=”Local Area Connection” address=fec0:0:0:0:ffff::2
add route prefix=::/0 interface=”Local Area Connection”metric=0 nexthop=fe80::1
add address interface=”Local Area Connection” address=fe80::2

int ipv6
reset
add dns “Local Area Connection” fec0:0:0:0:ffff::1
add dns “Local Area Connection” fec0:0:0:0:ffff::2
add route ::/0 “Local Area Connection” fe80::1
add address”Local Area Connection” fe80::2



Cheatsheet: Configuring a Server Core installation #1

After setting up my new hardware for my LAB, I thought about installing my Hyper-V Servers as Server Core installations. After reading two minutes in some blogs and the Microsoft TechNet I decided to use the Core Editions.

Basically the setup is the same as the none Core Edition or GUI Edition. But after the installation you have to configure the server without a GUI, your only way to do the basic configuration is the command promt. Btw if you close the command prompt, you can easily recover the prompt by pressing CTRL-ALT-DELETE, click Start Task Manager, click New Task and type cmd.exe.

Windows Server 2008 R2 Core

To do the basic configuration of your Windows Server 2008 (R2) Core, you need the following commands:

Checkout the existing Hostname / Computername:

hostame or ipconfig

Change the Computername / Hostname:

netdom renamecomputer <ComputerName> /NewName:<NewComputerName>

Change the Computername / Hostname without writing the old name:

netdom renamecomputer %computername%   /NewName:<NewComputerName>

Show network interfaces:

netsh interface ipv4 show interfaces

Set Static IP Address, Subnet Mask, and Default Gateway (ID is the shown number in the Idx column when you show your network interfaces):

netsh interface ipv4 set address name="<ID>" source=static address=<StaticIP> mask=<SubnetMask> gateway=<DefaultGateway>

Set DNS Server (index= is the priority of the DNS Server):

netsh interface ipv4 add dnsserver name="<ID>" address=<DNSIP>index=1

Join a Domain:

netdom join <ComputerName> /domain:<DomainName> /userd:<UserName> /passwordd:*

Add a Domain User to the local administrator group:

net localgroup administrators /add <DomainName>\<UserName>

Change or set the product key of your server:

slmgr.vbs –ipk<productkey>

Active the server licence:

slmgr.vbs -ato

If activation is successful, no message will return in the command prompt

Configure the firewall:

netsh advfirewall

netsh advfirewall firewall set rule group="Remote Administration" new enable=yes

Enable Remote Desktop:

cscript c:\windows\system32\scregedit.wsf /ar 0

Restart the Computer:

shutdown /r /t 0

Open Task Manager with the command prompt:

taskmgr

List event logs:

wevtutil el

Find something in the event log:

wevtutil qe /f:<text>

List running services:

sc query

or

net start

List running tasks:

tasklist

to active Powershell type:

powershell

For the most of this simple tasks there is also a configuration tool, which makes it very easy to do your first configuration with Windows Server 2008 Core Edition. The Tool is called sconfig, and its very simple, just start the program with the following command:

sconfig.cmd

Now this will open the following configuration utility:

Windows Server Core Sconfig.cmd