<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Tzachi Elkabatz Blog SEE</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/tzachiel/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/tzachiel/feed.xml</link>
    <description>Azure Blog</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:27:20 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Azure-Linux VM -Restart and Recover a non-responding SSHD</title>
      <link>https://docs.microsoft.com/archive/blogs/tzachiel/azure-linux-vm-restart-and-recover-a-non-responding-sshd</link>
      <pubDate>Sat, 21 Jul 2018 21:34:07 GMT</pubDate>
      <dc:creator><![CDATA[Tzachi.Elkabatz]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tzachiel/?p=445</guid>
      <description><![CDATA[Hello All,

On today Scenario I will demonstrate how to recover from a non-responding...]]></description>
      <content:encoded><![CDATA[<span style="color: #333333;font-family: 'Segoe UI',sans-serif">Hello All,</span>

<span style="color: #333333;font-family: 'Segoe UI',sans-serif">On today Scenario I will demonstrate how to recover from a non-responding SSHD.</span>

<span style="color: #333333;font-family: 'Segoe UI',sans-serif">where you are not able to ssh and log to your VM.</span>

<span style="color: #333333;font-family: 'Segoe UI',sans-serif">Sometimes it just not responding or got hang while our other bindings\listeners are working properly.</span>

<span style="color: #333333;font-family: 'Segoe UI',sans-serif">All we want is to restart the daemon and avoid restarting the entire VM.</span>

&nbsp;

<span style="color: #333333;font-family: 'Segoe UI',sans-serif">In this Demo I will show 3 options to recover from that scenario.</span>

<strong><span style="text-decoration: underline"><span style="color: #333333;font-family: 'Segoe UI',sans-serif;text-decoration: underline">Environment for this Test.</span></span></strong>
<ul>
 	<li><span style="color: #333333;font-family: 'Segoe UI',sans-serif"> Ubuntu 18.04 TLS (but it can fit any Distro)</span></li>
 	<li><span style="color: #333333;font-family: 'Segoe UI',sans-serif">Running Standard D4s v3 (4 vcpus, 16 GB memory)</span></li>
 	<li><span style="color: #333333;font-family: 'Segoe UI',sans-serif">Premium SSD</span></li>
 	<li><span style="color: #333333;font-family: 'Segoe UI',sans-serif">Accelerated networking: Enabled</span></li>
 	<li><span style="color: #333333;font-family: 'Segoe UI',sans-serif">Provider: Azure Resource Manager (ARM)</span></li>
</ul>
&nbsp;

<img width="979" height="514" class="alignnone size-full wp-image-535" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh01.png" />

For this Demo I will kill the sshd Daemon (but we can use it when sshd is not responding or became unresponsive).

<img width="962" height="259" class="alignnone size-full wp-image-545" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh02.png" />

Confirm SSHD is not Responding.

<span><strong>Step by step instructions:</strong></span>

<strong>Option 1.[Run command]</strong>

1.go to the Azure Portal and navigate to the VM Blade and go to "Run command"

Enter the command [sudo service ssh restart]as you would on a console terminal and press Run.

<img width="1519" height="602" class="alignnone size-full wp-image-565" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh04.png" />

&nbsp;

And we are back In (the Output on the Portal will take some time).

<img width="796" height="551" class="alignnone size-full wp-image-575" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh05_Recover.png" />

<strong>Option 2 [Serial Console]</strong>

Navigate to the Azure Portal and navigate to the VM Blade and go to Serial Console

(First let me Kill the new Process)

<img width="529" height="101" class="alignnone size-full wp-image-455" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh_Sen_0201.png" />

Confirm SSHD is not Responding.

<img width="1157" height="421" class="alignnone size-full wp-image-465" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh_Sen_0202.png" />

Enter the command [sudo service ssh restart]as you would on a console terminal .

Confirm ssh is enable and client can connect.

<img width="715" height="533" class="alignnone size-full wp-image-475" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh_Sen_0203_resolved.png" />

<strong>Option 3 [Custom Script extension]</strong>

Navigate to the Azure Portal and navigate to the VM Blade go the extensions and add Custom Script.

Let's kill the process first.

<img width="444" height="66" class="alignnone size-full wp-image-485" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh_Sen_0301.png" />

Confirm SSHD is not Responding.

first let's create an SH file

On my demo I used this name "restart_ssh.sh"

use you favorite editor vi/nano etc.

create a file and add the below.

<strong>Content of the script [restart_ssh.sh].</strong>

#!/bin/bash
#restart ssh Service
sudo service ssh restart

<img width="931" height="680" class="alignnone size-full wp-image-495" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh_Sen_0302.png" />

&nbsp;

Notice that on the <span style="text-decoration: underline"><strong>Command</strong></span> we should run "sh" against our script file name.

<img width="598" height="206" class="alignnone size-full wp-image-505" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh_Sen_0303.png" />

Confirm ssh is enable and client can connect.

<img width="606" height="550" class="alignnone size-full wp-image-525" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/cant_ssh_Sen_0305_Recover.png" />

&nbsp;

If you get stuck during the Process or this debug is not for You.

Please raise a ticket to Our Support and an engineer will be happy to assist mitigate the issue.

&nbsp;

Thank You,

Tzachi Elkabatz]]></content:encoded>
    </item>
    <item>
      <title>Azure -Windows VM RDP Port got disabled on MS Firewall</title>
      <link>https://docs.microsoft.com/archive/blogs/tzachiel/azure-windows-vm-rdp-port-got-disabled-on-ms-firewall</link>
      <pubDate>Mon, 16 Jul 2018 22:32:11 GMT</pubDate>
      <dc:creator><![CDATA[Tzachi.Elkabatz]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tzachiel/?p=295</guid>
      <description><![CDATA[Hello All,

On today Scenario i will demonstrate how to recover from a mistake where you have...]]></description>
      <content:encoded><![CDATA[Hello All,

On today Scenario i will demonstrate how to recover from a mistake where you have blocked the RDP Port within your Local MS Firewall.

In my Demo i used a windows 2016 Datacenter.

<img width="1708" height="641" class="alignnone size-full wp-image-345" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/15.png" />

for this Demo I have created a Rule to block RDP Requests.

<img width="710" height="585" class="alignnone size-full wp-image-365" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/33.png" /> <img width="711" height="581" class="alignnone size-full wp-image-375" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/43.png" /> <img width="1068" height="599" class="alignnone size-full wp-image-385" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/52.png" />

Once i press finish I got thrown from that session.

Below we can see the connection got cut and we are not able to reach the VM via RDP.

&nbsp;

<img width="1118" height="768" class="alignnone size-full wp-image-395" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/6.png" />

Recover Steps:
<ul>
 	<li>Navigate to Azure Portal</li>
 	<li>Go to the VM facing that issue</li>
 	<li>Select Extension and Press +ADD</li>
 	<li>On you Desktop create a Files and insert the below</li>
</ul>
PS C:\Users\tzachie\Desktop&gt; cat .\disable_MSFW_All_Profiles.ps1

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

Save the Files as with any name you like i gave it this name disable_MSFW_All_Profiles.Ps1 Powershell

<img width="787" height="527" class="alignnone size-full wp-image-405" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/7.png" /> <img width="910" height="350" class="alignnone size-full wp-image-415" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/8.png" />

Upload the Ps1 file you have created.

<img width="676" height="260" class="alignnone size-full wp-image-425" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/132.png" />

Verify that the Extension was provisioned succeeded

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

<img width="584" height="431" class="alignnone size-full wp-image-305" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/9.png" />

Testing the Port from PowerShell

<img width="572" height="182" class="alignnone size-full wp-image-435" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/142.png" />

Port is responsive.

You should be able to RDP Now.

&nbsp;

<img width="459" height="374" class="alignnone size-full wp-image-315" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/10.png" />

This is the current Firewall state (VM is at Risk)

-Fix your Firewall rules soon as possible and Turn On MS Firewall.

<img width="696" height="322" class="alignnone size-full wp-image-325" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/111.png" />

&nbsp;

Healthy  MS Firewall state.

<img width="647" height="513" class="alignnone size-full wp-image-335" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/07/121.png" />

If you get stuck during the Process or this debug is not for You Please raise a ticket to Our Support and an engineer will help you to Mitigate the issue.

&nbsp;

Thank You,

Tzachi Elkabatz]]></content:encoded>
    </item>
    <item>
      <title>Azure-Linux VM -Configure A Partition Larger Then 2 TB.</title>
      <link>https://docs.microsoft.com/archive/blogs/tzachiel/azure-linux-vm-configure-a-partition-larger-then-2-tb</link>
      <pubDate>Sun, 21 Jan 2018 21:35:52 GMT</pubDate>
      <dc:creator><![CDATA[Tzachi.Elkabatz]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tzachiel/?p=245</guid>
      <description><![CDATA[Hello ,

In This Scenario we will cover how to configure a partition larger then 2TB.

After we...]]></description>
      <content:encoded><![CDATA[Hello ,

In This Scenario we will cover how to configure a partition larger then 2TB.

After we have created the a new disk using one of the options (Portal, Azure Cli , PowerShell)

disk will be attached to the VM.

If we run fdisk -l we can see at the bottom the latest disk with a 4TB size.

<img width="591" height="697" class="alignnone size-full wp-image-246" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/Fdisk01.png" />

Below we can see what happens when trying to allocate one large partition that will contain the entire disk size.

<img width="779" height="436" class="alignnone size-full wp-image-255" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/Fdisk02.png" />

We will receive <strong>Value out of range.</strong>

and disk we be partitioned as 1.8 TB.

So here are the news -&gt;Fdisk utility supports up to 2TB disk!!

If you wish to use a larger disks please use <b>parted utility.</b>

&nbsp;

So how do we overcome it ?

We will use parted utility .

&nbsp;

<img width="564" height="415" class="alignnone size-full wp-image-256" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/Parted01.png" />

<img width="651" height="503" class="alignnone size-full wp-image-265" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/Parted02.png" />

<b></b>

Hope this will help.

if you still face an issue please raise a support ticket and one of our engineers will assist you.

Thank You,

Tzachi Elkabatz]]></content:encoded>
    </item>
    <item>
      <title>Azure-Linux VM Can't SSH</title>
      <link>https://docs.microsoft.com/archive/blogs/tzachiel/azure-linux-vm-cant-ssh</link>
      <pubDate>Sun, 21 Jan 2018 21:06:12 GMT</pubDate>
      <dc:creator><![CDATA[Tzachi.Elkabatz]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tzachiel/?p=195</guid>
      <description><![CDATA[Hello ,

In This Scenario we will cover some ssh scenarios .



 	Check if the VM is in...]]></description>
      <content:encoded><![CDATA[Hello ,

In This Scenario we will cover some ssh scenarios .

<img width="666" height="384" class="alignnone size-full wp-image-205" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/ssh01.png" />
<ol>
 	<li>Check if the VM is in Running State on the Portal.</li>
 	<li>Is there another Port exposed is it availably.(we are trying to isolate if there is a general network issue or just ssh is not responding)</li>
 	<li>If yes , Try to SSH the VM using it's DIP (Lan IP) from another running VM in the Same VNET. is this working</li>
 	<li>No , then please go to the Azure Portal and try to reset the SSH . Navigate to the VM blade and scroll down until you find the Reset Password.</li>
 	<li>Enable boot diagnostics (will generate serial log) and reboot the VM (look under or download to search for error)</li>
</ol>
first setup for boot diagnostics required a storage account configuration .

&nbsp;

<img width="956" height="465" class="alignnone size-full wp-image-55" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/Boot-diagnostics.png" />

&nbsp;

if you see an issue with Ssh configuration continue to the steps below.
<ul>
 	<li>For RDFE\Azure VM Version 1 blade will appear like below.</li>
 	<li>Option 1 : reset current user password or create a new login (will be granted permission to a shell and login)</li>
 	<li>Option 2 : reset ssh keys in case you have lost your Privet key or it compromised</li>
</ul>
For our scenario we will go with Option 1

&nbsp;

&nbsp;

<img width="657" height="394" class="alignnone wp-image-216" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/Rdfe_SSh_Reset.png" />

&nbsp;
<ul>
 	<li>For ARM \Azure VM Version 2 blade will appear like below</li>
 	<li>on Arm we have 3 options</li>
 	<li>Option 1 : reset current user password or create a new login (will be granted permission to a shell and login).</li>
 	<li>Option 2 : reset ssh keys in case you have lost your Privet key or it compromised.</li>
 	<li>Option 3 : reset sshd_config (will copy a fresh config)</li>
</ul>
In this Scenario we will Try Option 3.

<img width="691" height="473" class="alignnone wp-image-225" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/ARM_SSh_Reset.png" />

if still we weren't able to reach the VM we can work on a console as we use to do on-premise .

Create a Test VM in the same region that support virtualization and Mount the OS VHD( VM) to a hyper-v and investigate using console.

<a href="https://blogs.technet.microsoft.com/mckittrick/troubleshoot-broken-azure-vm-using-nested-virtualization-in-azure-rdfe/">Troubleshoot a Broken Azure VM using Nested Virtualization in Azure (RDFE)</a>

<a href="https://blogs.technet.microsoft.com/mckittrick/troubleshoot-broken-azure-vm-using-nested-virtualization-in-azure-arm/">Troubleshoot a Broken Azure VM using Nested Virtualization in Azure (ARM)</a>

<a href="https://blogs.technet.microsoft.com/mckittrick/troubleshoot-a-broken-azure-vm-using-nested-virtualization-in-azure-managed-disk/">Troubleshoot a Broken Azure VM using Nested Virtualization in Azure (Managed Disk) </a>

If you get stuck during the Process or this debug is not for You Please raise a ticket to Our Support and an engineer will help you to Mitigate the issue.

&nbsp;

Thank You,

Tzachi Elkabatz

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Azure-Linux VM Apache Port Troubleshooting</title>
      <link>https://docs.microsoft.com/archive/blogs/tzachiel/azure-linux-vm-apache-port-troubleshooting</link>
      <pubDate>Thu, 17 Aug 2017 12:21:02 GMT</pubDate>
      <dc:creator><![CDATA[Tzachi.Elkabatz]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tzachiel/?p=115</guid>
      <description><![CDATA[Hi All,

In this Scenario we will cover how to Publish\Troubleshoot  a Linux apache Port to...]]></description>
      <content:encoded><![CDATA[Hi All,

In this Scenario we will cover how to Publish\Troubleshoot  a Linux apache Port to external users. (I assume you already installed apache)
<ol>
 	<li>Make sure your binding is set to <strong>0.0.0.0</strong> and not restricted to 127.0.0.1 (by editing the httpd.conf) and verify by <strong>netstat -ntlp | grep 80 </strong> #port number you set your site.</li>
</ol>
<img width="642" height="405" class="alignnone wp-image-146" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/Ubuntu16_04.png" />

<img width="648" height="102" class="alignnone wp-image-136" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/Redhat68.png" />

&nbsp;
<ol>
 	<li>Make sure you have allowed an Iptables rule to allow incoming requested for the Port you had set</li>
 	<li>If you are just testing disable Iptables to verify Site is working (For Ubuntu <span class="cmd">sudo ufw enable</span> , For Centos/Redhat 6.x sudo service iptables stop ,For Centos/Redhat 7.x  systemctl disable firewalld</li>
 	<li>If you site doesn't reside on the defult apache\apache2 locationplease check Selinux (getenforce command)</li>
</ol>
<img width="366" height="213" class="alignnone size-full wp-image-156" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/getenforce.png" />
<ol>
 	<li>you can temporary disable Selinux via the command  <strong>setenforce 0</strong></li>
 	<li>To disabled Selinux you can edit the files /etc/Selinux and set to disable (Centos/Redhat this required a reboot)</li>
 	<li>On Ubuntu on Azure the package is not installed by default (selinux-utils)</li>
</ol>
&nbsp;

<img width="675" height="521" class="alignnone size-full wp-image-165" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/Disbale_Selinux.png" />
<ol>
 	<li>after you verify your site is running and security rules are set or disabled you can try to browse the site from another VM running in the same VNET (NSG should be allowing this Port Requests)</li>
 	<li>Go to Azure Portal to your VM blade and navigate to the Network -- &gt; NSG --&gt; Open an allow rule to allow incoming traffic depend how you set your apache service.</li>
</ol>
&nbsp;

<img width="748" height="482" class="alignnone size-full wp-image-166" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/NSG_Inbound_Http_80.png" />
<ol>
 	<li>Browse from External or use wget or curl command to check the page status.</li>
</ol>
<img width="825" height="521" class="alignnone size-full wp-image-175" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/wget-status.png" />

&nbsp;
<ol>
 	<li>You can always look at the syslog\messages logs for more information.</li>
 	<li>Or use Fiddler to get a page status.</li>
</ol>
&nbsp;

If this doesn't solve the Problem.

Feel free to raise a ticket for our Azure Support and we will help you out.

Thank You,

Tzachi Elkabatz]]></content:encoded>
    </item>
    <item>
      <title>Azure-Linux VM  Boot Troubleshooting</title>
      <link>https://docs.microsoft.com/archive/blogs/tzachiel/azure-linuxvm</link>
      <pubDate>Wed, 16 Aug 2017 06:37:20 GMT</pubDate>
      <dc:creator><![CDATA[Tzachi.Elkabatz]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tzachiel/?p=45</guid>
      <description><![CDATA[Hello All,

In This Scenario we will debug a VM is that is not Booting.(after it was working for a...]]></description>
      <content:encoded><![CDATA[Hello All,

In This Scenario we will debug a VM is that is not Booting.(after it was working for a while).

In this scenario we are debugging the Guest OS and not the Platform.

First we need to understand if it's booting fully and not accessible or if it's failing and on what phase.
<ul>
 	<li>Go to Azure Portal and Enabled Boot diagnostics. (This will expose the boot.log).</li>
 	<li>You need first to set an storage account to save the log and to checkbox the Boot diagnostics.</li>
 	<li>Reboot and refresh the Blade (do you see any errors on your boot.log ?).</li>
 	<li><img width="956" height="465" class="alignnone size-full wp-image-55" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/Boot-diagnostics.png" /></li>
</ul>
&nbsp;
<ul>
 	<li>Did you change fstab  add new mounts /Disks and forgot to verify mount -a ? if yes then you will need to mount this vhd OS disk to a running Linux and correct your fstab .</li>
</ul>
<img width="756" height="333" class="alignnone size-full wp-image-65" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/Fstab.png" />
<ul>
 	<li>Did you push a new Extension ? Check on the Portal once the VM is running the Extensions Status.</li>
</ul>
<img width="1551" height="445" class="alignnone size-full wp-image-85" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/VM_Extensions.png" />

If this Process didn't help.

If this doesn't solve the Problem.

Feel free to raise a ticket for our Azure Support and we will help you out.

Thank You,

Tzachi Elkabatz]]></content:encoded>
    </item>
  </channel>
</rss>