grep to display results with specific search , Results exception with another specific one :)

[ahmad@ahmadcentos ~]$ sudo cat /var/log/messages | egrep “his”

[ahmad@ahmadcentos ~]$ sudo cat /var/log/messages | egrep “his” | grep -v winderful


Posted in Uncategorized | Leave a comment

Windows powershell snap in citrix configuration admin v2 is not installed on this computer

After un-installing Citrix powershell SDK , I wasn’t not able to launch my Citrix 7.6 Delivery Controller with this error message:

Windows powershell snap in citrix configuration admin v2 is not installed on this computer

I tried to connect to another DDC , same , in Citrix installation Media there’s a lot of powershell snapins

So I closed the Citrix Studio console , installed all of them , some was only repaired , launching my Citrix Studio was successful.


Posted in Uncategorized | 2 Comments

Get virtual machine parent Hyper-v host


(get-item “HKLM:SOFTWAREMicrosoftVirtual MachineGuestParameters”).GetValue(“HostName”)

Or just go to the regedit:

Posted in Uncategorized | Leave a comment

VNX Remote/ Local Protection Suite quick notes!!!

VNX Remote Protection Suite solutions:

VNX MirrorView,


MirrorView/S provides synchronous replication over a short distances. Since it’s synchronous solution, the RPO (Recovery Point Objective) is zero. The data flow of MirrorView/S is:

1. Host attached to the primary VNX system initiates a write;

2. The primary VNX replicates the data to the secondary VNX system;

3. The secondary VNX acknowledges the write as complete back to the primary VNX;

4. The primary VNX acknowledges the write as complete back to the host.

It is important to understand the data flow of MirrorView/S. As a consequence the RTT (Round Trip Time) between the two VNX system should be less (or equeal) than 10ms. If the RTT is high, then the host will higher response time, because it will take longer time to acknowledge the write request.

From <>


MirrorView/A provides replication over long distances. It can be used for replication between VNX arrays, where RTT (Round Trip Time) is high, but should not be higher then 200ms. MirrorView Asynchronous works on a periodic update model that tracks changes on the primary side, and then applies those changes to the secondary at a user-determined RPO (Recovery Point Objective) interval.

With MirrorView/A replications, writes are acknowledged back to the host once the primary VNX receives them, which basically gives no impact on the production environment (whereas with MirrorView/S all writes has to be acknowledged by primary and secondary VNX system).

The dataflow of MirrorView/A is:

1. Host attached to the primary VNX system initiates a write;

2. Primary VNX system sends and acknowledge to the host;

3. Primary VNX system tracks the changes and replicates the data to the secondary VNX system using the user-defined RPO;

4. Secondary VNX system receives the data and sends an ack back to the primary VNX.

From <>

MirrorView/A uses SnapView Snapshot technology for data protection on the primary and secondary systems.

VNX Replicator,

VNX Replicator is an IP-based replication solution that produces a read-only, point-intime copy of a source or production system. The VNX Replication service periodically updates this copy, making it consistent with the production file system

Replicator uses internal checkpoints to ensure availability of the most recent point-in-time copy.

These internal checkpoints are based on VNX SnapSure technology

RecoverPoint/SE Remote Protection

A Data Mover is a component that runs its own operating system. It retrieves data from a storage device and makes it available to a network client. It’s an EMC software feature that enables the grouping of Common Internet File Systems (CIFS) and/or Network File Systems (NFS) environments and servers into virtual containers. Each VDM has access only to the file systems mounted to that VDM, providing a logical isolation between physical Data Movers and other VDMs on the VNX system.

From <>

VNX Local Protection Suite solutions:

VNX SnapView creates block-based logical point-in-time views of production information using snapshots and point-in-time copies using clones. Snapshots use only a fraction of the original disk space, while clones require the same amount of disk space as the source.


The Copy On First Write Mechanism (COFW) uses pointers to track whether data on the source LUN, or in the Reserved LUN Pool. These pointers are kept in SP memory, which is volatile, and could therefore be lost if the SP should fail or the LUN be trespassed. A SnapView feature designed to prevent this loss of session metadata is persistence for sessions (which stores the pointers on the Reserved LUN(s) for the session). All sessions are automatically persistent and the user cannot turn off persistence.

VNX Snapshots create block based logical point-in-time views of production information using snapshot technology. By using a different approach to the way new writes to the production file system are handled, VNX Snapshots provide an improvement to the overall performance and consumes less allocated storage space.


The technology behind VNX Snapshots. After a snapshot is taken, new writes to the primary LUN are redirected (written) to a new location within a storage pool.

is a background process that scans the pool for eligible Primary LUNs, Snapshot Mount Points, Consistency Groups, snapshots, and snapshot sets. All eligible expired snapshots are deleted before processing for snapshots with the ‘auto-delete’ option enabled and the expired snapshots are deleted regardless of pool auto-delete thresholds.

Auto-delete is triggered using two independent thresholds

– consumed pool space

– consumed snapshot space.

The process is stopped when the threshold conditions are met, or if no eligible snapshots remain to be deleted or the process is manually stopped.

VNX SnapSure creates logical point-in-time views of production file systems using snapshots. SnapSure uses only a fraction of the original disk space used by the source file system.

RecoverPoint Local Protection
is a synchronous product that mirrors volumes in real time between one or more arrays at a local site. RecoverPoint maintains a history journal of all changes that can be used to roll back the mirrors to any point in time.

Journal Volumes:

The journal volumes hold snapshots of data to be replicated. Each Journal volume holds as many point in time images as its capacity allows, after which the oldest image is removed to make space for the newest.

There are two types of journal volumes:

1- Replica (Copy) Journal(s)

2- Production Journal(s) – this one is more-or-less not used during normal operation, however it is necessery and being used when the relationship is promoted to secondary side.

Repository Volume:

Stores pertinent replication environment information This volume must be seen only by the appliances on the same site as this volume.

Replication volumes:

or Replicas are the production storage volumes and their matching target volumes which are used during replication.

Target volumes must be the same size or larger than the source volumes. Any excess size will not be replicated or visible to the host. This is an important design consideration for heterogeneous storage environments.

Local Replication Remote Replication
SnapView Snapshot COFW MirrorView/A
VNX SnapSure ROW VNX Replicator
Posted in Uncategorized | Leave a comment

Archiving with tar

Creating tar file


adding file to existing tar

update changes to previously compressed directory

extract and list tar contents


For Folder

[ahmad@SabryCentos01 /]$ sudo tar -cvf /home/hamada/etc.tar /etc

[ahmad@SabryCentos01 hamada]$ sudo tar -cvf etc.tar /etc/

[ahmad@SabryCentos01 hamada]$ sudo gzip etc.tar

For Files is the same:

[ahmad@SabryCentos01 ~]$ sudo tar -cjvf /home/magic/locale.conf.tar.gz locale.conf


[ahmad@SabryCentos01 ~]$ sudo tar -cjvf /home/magic/locale.conf.tar.bz2 locale.conf


Use compression(gzip or bzip2):

While using tar you can add:

-z (gzip) or -j (bzip2) to compress

-> Zip while compresing:

[ahmad@SabryCentos01 hamada]$ sudo tar -cvjf /home/hamada/etc.tar.bz2 /etc/

Watch out the sequence of j before f

-> Zip after compressing:


[ahmad@SabryCentos01 hamada]$ gzip etc.tar


Decompress(gunzip and bunzip2):

Using tar:

sudo tar -xvf etc.tar.gz

Using gunzip

[ahmad@SabryCentos01 magic]$ gunzip etc.tar.gz


tar cvf system-release.tar system-release

Then adding:


So The alternatives.tar is made from alternatives directory and has above files beneath.

Now moving ntp directory to the directory alternatives:

[ahmad@SabryCentos01 ~]$ mv ntp alternatives

Now updating the existing tar file with new changes:

[ahmad@SabryCentos01 ~]$ tar uvf alternatives.tar alternatives

Listing again the contents:

[ahmad@SabryCentos01 ~]$ tar tvf alternatives.tar



Single file

Same directory

[ahmad@SabryCentos01 hamada]$ sudo tar xvf etc.tar.bz2 etc/exports

Different directory

[ahmad@SabryCentos01 hamada]$ sudo tar xvf etc.tar.gz -C /home/ahmad/tamam/ etc/hosts.ori


OR all contents:

[ahmad@SabryCentos01 etc]$ sudo tar xvf etc.tar.gz -C /home/ahmad/cervantes/

List Contents:

[ahmad@SabryCentos01 hamada]$ tar tvf etc.tar.gz |more

Posted in Uncategorized | Leave a comment

Configure VMware View 6 Self-Signed Certificate with Smart Card

This is to explain how to Configure VMware View 6.2 with a Self-Signed Certificate using a Smart Card as Authentication mechanism.

I had a problem and here I am sharing how it was resolved.

– VMware view 6.2

– A Stand alone Connection server in place configured with default installed Certificate “I removed it later”.

– Smart Card with Local Domain Controller CA Certificate.

I had to create a New self-Signed certificate in my Connection server using IIS “you have to change the default port of IIS otherwise it will conflict with connection server page

Above vdm should be small not CAPS!!!!

It should have its private key with it:

After creation I exported it from the personal store with the private key , placed in trusted root:

My Connection server looks green

Although it is self-signed , this is because I modified the “CertificateRevocationCheckType ” as per this KB

Set the “Required” option to make sure you are using only Smart Card:

Till this point if you authenticate with your Smart Card you will have this error:

Smart card or certificate authentication is required.

So go ahead and Export your Local Domain CA Root & Intermediate Certificates , Follow this KB up , the purpose of this KB is to let Connection Server Store recognize your Domain CA certificate.

I launched View Horizon windows client, I entered the Smart Card PIN , but I got this error:

Error: An SSL error occurred.

This means the Smart Card is authenticated via the connection server but there’s something wrong with the certificate or the process itself.

Above we created the locked.propoerties

Open it with notepad , you will find only the below lines:




I modified it as per this KB and this Ref , so it looked like:


Enjoy !!!

Posted in Vmware | 1 Comment

Unable to launch as the application is not currently available !

Error: Unable to launch as the application is not currently available


Event 1101. This event refers to “The Citrix Broker Service cannot find available virtual machines.”

CDF traces, you can search for the entry, as displayed in the following screen shot –

“Launch failed: NoDesktopAvailable”.

from PowerShell the command Get-BrokerMachine and you must ensure that WindowsConnectionSetting is configured asLogonEnabled.

If WindowsConnectionSetting is configured as LogonDisabled, you can enable logon by modifying the following registry key:

(HKLMSYSTEMCurrentControlSetControlTerminal ServerfDenyTSConnections)”

fDenyTSConnections: 0 -> Logon Enable

fDenyTSConnections: 1 -> Logon Disabled

Setting RegKey fDenyTSConnection to 0 resolved the problem.

If not working try:

PS H:> Add-PSSnapin citrix*

PS H:> Set-BrokerSite -TrustRequestsSentToTheXmlServicePort $True

Ref: Citrix support


Posted in Uncategorized | Leave a comment

Change Provisioning Services from PXE to TFTP

If you are looking to change Citrix Provisioning Services from PXE to TFTP, consider DHCP server options 60 and TFTP server port 69 to be opened.


option 60: pxe client

option 66: FQDN or IP Address of TFTP server

option 67: ARDBP32.BIN.(specifies which file needs to be downloaded from TFTP server)

Configure a Microsoft DHCP server in order to get Citrix PVS PXE boot working:

Ports used

port 69 for communications over TFTP, if port 69 is blocked this will prevent the download of the .bin file needed for the boot process.

netstat -an -p udp | find “:69”

With Citrix PXE built-in service the client during the startup, send broadcast requesting the option 60 (PXEClient) and all PVS Server that handle this service will answer this request and send the file called bootptab. The file bootptab make reference of ardbp32.bin file that contain the image file for the target device.

Posted in Uncategorized | Leave a comment

Change IP/ vlan For Nutanix IPMI ; Hyper-V from access to trunk port

I used to configure nutanix block over access ports , later I change the ports to Trunk ,

Login to your CVM , then type winsh

If you want to configure vlan only :

nutanix@NTNX-XXXXXX85-C-CVM:$ winsh> ipmiutil lan -e -h 33

If you want to configure IP & vlan:

nutanix@NTNX-XXXXXX85-C-CVM:$ winsh> ipmiutil lan -e -I -G -S -h 33

*** Remember to do it from each CVM per each IPMI IP ***

But what about my hyper-v nodes ? how to change the hyper-v port type from access port and before moving it to the trunk port ?

From CMD on hyper-v remote session, write powershell, Get the CVM hosted on this hyper-v:

$cvm = Get-VM | Where {$_.Name -match ‘NTNX.*CVM’}

Set the CVM Virtual machine allowed vlans:

Set-VMNetworkAdapterVlan -VMName $ -Trunk -AllowedVlanIdList “33,34,68” -NativeVlanId 33

Configure the vlan on external switch for Hyper-v management:

Set-VMNetworkAdapterVlan -ManagementOS -Trunk -AllowedVlanIdList “33,34,68” -NativeVlanId 33 -VMNetworkAdapterName ExternalSwitch

I just copy this block:

$cvm = Get-VM | Where {$_.Name -match ‘NTNX.*CVM’}

Set-VMNetworkAdapterVlan -VMName $ -Trunk -AllowedVlanIdList “33,34,68” -NativeVlanId 33

Set-VMNetworkAdapterVlan -ManagementOS -Trunk -AllowedVlanIdList “33,34,68” -NativeVlanId 33 -VMNetworkAdapterName ExternalSwitch


$cvm = Get-VM | Where {$_.Name -match ‘NTNX.*CVM’} | Set-VMNetworkAdapterVlan  -VMNetworkAdapterName “Internal” -Untagged




# verify that CVM Internal Adapter is (Untagged) mode and the External adapter modes for the same CVM is Trunk with the required VLAN tag

run :
PS C:\> Get-VMNetworkAdapterVlan



Then paste it on the hyper-v powershell , enter (remember to copy blank space after last command) , I moved the nutanix node cable to the trunk port ,, and Yeeeeesss , it works

Posted in Uncategorized | 6 Comments

Hyper-V failed to enable replication – Hyper-V cannot connect to the replica server.

Hyper-V cannot connect to the specified Replica Server "XXXXX" Error: The operation timed out (0x00002EE2).verify that the specified server is enabled as Replica server, Allows inbound connection on port ’80’ , and supports same authentication scheme.

Main site Broker is OK, and I am able to access the shared storage normally:

DR Broker role OK and able to access the shared storage normally as well :

Some said to open port 80 on firewall , my case it is DISABLED on the cluster server on both sites!!!

This article is Great :

Advanced Troubleshooting of Hyper-V Replica – Part 1

From <>

But it didn’t help me , when it comes to port 80 , he didn’t say what I have to do in such case.

My DR cluster is based on 3 Hyper-v Nodes , I was looking in the wrong place (my replica “DR” Cluster server) where I had to look into each Hyper-v Node and check the firewall:

So I got the resolution from here:

and Just I did run: netsh advfirewall set allprofiles state off , on each DR “replica” Node , and Yeeeeeeeeeeeess:

It’s working J

Posted in Uncategorized | 2 Comments