Archiving with tar

Creating tar file

compress

adding file to existing tar

update changes to previously compressed directory

extract and list tar contents

Create:

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

Or

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

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:

Before:

[ahmad@SabryCentos01 hamada]$ gzip etc.tar

After:

Decompress(gunzip and bunzip2):

Using tar:

sudo tar -xvf etc.tar.gz

Using gunzip

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

Add:

tar cvf system-release.tar system-release

Then adding:

Update:

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

Extract:

All

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

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:

trustKeyfile=lonqa.key

trustStoretype=JKS

useCertAuth=true

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

trustKeyfile=lonqa.key
trustStoretype=JKS
useCertAuth=true
secureProtocols.1=SSLv3
secureProtocols.2=TLSv1
enabledCipherSuite.1=SSL_RSA_WITH_RC4_128_MD5
enabledCipherSuite.2=SSL_RSA_WITH_RC4_128_SHA
enabledCipherSuite.3=TLS_RSA_WITH_AES_128_CBC_SHA
enabledCipherSuite.4=TLS_DHE_RSA_WITH_AES_128_CBC_SHA
enabledCipherSuite.5=TLS_DHE_DSS_WITH_AES_128_CBC_SHA
enabledCipherSuite.6=SSL_RSA_WITH_3DES_EDE_CBC_SHA
enabledCipherSuite.7=SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
enabledCipherSuite.8=SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
enabledCipherSuite.9=TLS_RSA_WITH_AES_256_CBC_SHA
enabledCipherSuite.10=TLS_DHE_RSA_WITH_AES_256_CBC_SHA
enabledCipherSuite.11=TLS_DHE_DSS_WITH_AES_256_CBC_SHA

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

Troubleshooting:

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.

DHCP

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.

http://9to5it.com/citrix-pvs-7-6-install-part-3-configuring-dhcp-for-citrix-pvs-pxe/

http://virtualfeller.com/2013/08/19/true-or-false-citrix-provisioning-services-requires-pxe/

http://support.citrix.com/article/CTX128868

https://venthusiastic.wordpress.com/2014/01/11/citrix-provisioning-service-boot-options/

http://citware.blogspot.com/2012/09/citrix-provisioning-services-citrix.html

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:10.20.33.19:~$ winsh

192.168.5.1> ipmiutil lan -e -h 33

If you want to configure IP & vlan:

nutanix@NTNX-XXXXXX85-C-CVM:10.20.33.19:~$ winsh

192.168.5.1> ipmiutil lan -e -I 10.20.33.60 -G 10.20.33.1 -S 255.255.255.0 -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 $cvm.name -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 $cvm.name -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

 

 

<space>

# 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

<space>

<space>

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 | 2 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 <http://www.altaro.com/hyper-v/advanced-troubleshooting-of-hyper-v-replica-part-1/>

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:

https://social.technet.microsoft.com/Forums/systemcenter/en-US/7100b12d-49dd-4cb9-9403-68b0fdf56605/need-help-to-open-port-80-for-hyperv-replica

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

There was a problem communicating with the Citrix Delegated Administration Service Permission Denied

In Xendesktop 7.6 , when you change the password of the account used with DB , the hell doors will open and The first Error you will receive:

there are no apps or desktops assigned to you at this time so your users will see ZERO Apps displayed J ,, poor you!

Besides the Application logs will tell you something like this:

EventID" 2008
Error querying the Broker via GetBrokerObjects to obtain ‘Controller Machine Details’

EventID:1030
Otherwise unhandled exception in WCF call : Citrix.Fma.Sdk.ServiceCore.AuthorizationFailureException: Missing delegated admin provider
at Citrix.Fma.Sdk.ServiceCore.LogicBase.DemandPermission(String operation, ServiceRegistrationStates localAdminStates)
at Citrix.Fma.Sdk.ServiceCore.ServiceBase.<>c__DisplayClass10.<GetServiceStatus>b__f()
at Citrix.Fma.Sdk.ServiceCore.ServiceBase.CheckedCall[T](String name, Func`1 operation, Func`2 defaultValue, Enum code)

SO there is one easy step to resolve it, just reset the account for the old password ,

BUT if

– You can not change the password “my Case”

– You want to use new account. “my Case”

You need to do it as follows:

1- Add your New account here:

2- Select the DB but do not select any database role memberships right now.

3- Right click the DB and select the new owner account:

4- Open Powershell on your Deliver Controller and set the DB connection to Null:

Add-PSSnapin Citrix*

Set-LogSite -State Disabled

Set-LogDBConnection -DataStore Logging -DBConnection $null

Set-MonitorDBConnection -DataStore Monitor -DBConnection $null

Set-MonitorDBConnection -DBConnection $null

Set-AcctDBConnection -DBConnection $null

Set-ProvDBConnection -DBConnection $null

Set-BrokerDBConnection -DBConnection $null

Set-EnvTestDBConnection -DBConnection $null

Set-SfDBConnection -DBConnection $null

Set-HypDBConnection -DBConnection $null

Set-ConfigDBConnection -DBConnection $null -force

Set-LogDBConnection -DBConnection $null -force

Set-AdminDBConnection -DBConnection $null –force

5- Set the new connection setting as below :

set-ConfigDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

set-AdminDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

set-LogDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

set-AcctDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

set-BrokerDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

set-EnvTestDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

set-HypDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

set-MonitorDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

set-ProvDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

set-SfDBconnection -dbconnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

Set-LogDbConnection -DataStore logging -DbConnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

Set-MonitorDbConnection -DataStore monitor -DbConnection "Server=DR-NTNX-SCVMM;Initial Catalog=CTXDB;Integrated Security=True"

Set-LogSite -State Enabled

Enjoy , everything is back to life 😀

Posted in Uncategorized | Leave a comment

Check that the virtual machine management service is running and that you are authorized to connect to the server

You installed your Hyper-v core , not yet joined to domain (Workgroup) , you need quickly to manage it using hyper v Manager:

But you get this error

an error occurred while attempting to connect to server check that the virtual machine management service is running and that you are authorized to connect to the server

You already googled and have enough details how to resolve it the complex way , I am here to tell about the easy way:

From your workstation , reset local administrator password to SAME HYPER-V SERVER CORE PASSWORD :

Simply add it your hyper-v core to your workstation server manager , Enjoy J

Posted in Uncategorized | 3 Comments

There are no un-bridged host network adapters !

My Windows 10 Build 10130 had a nightmare with VMware workstation !!!!

My VMware workstation 11.1.2 build-2780323

I get below error while trying to select physical bridged network adapter:

Cannot change network to bridged there are no un-bridged host network adapters .

I tried all what you already googled 😀

Better to work around 😉

1- I setup my vmnet as NAT from Virtual Network Editor :

Remove your DHCP checkbox:

2- I bridged my (VMware Network Adapter VMnet8) with my Wifi “or your physical adapter

3- I assigned the created adapter a different IP than the automatically assigned one:

4- I assigned the VM vmnet8 Network:

5- The VM picked an IP from my wireless router:

6- I can ping internet ,, with pleasure J

Posted in Uncategorized | 1 Comment

VAAI Claim Rule-SATP Rules-Tag Devices as SSD/Local-Disable a path-Changing SATP Default Policy-Changing Path Policy

Download as PDF

1. How to get more info about specific device
2. Add Claim Rule for VAAI filter
3. Adding SATP Rules.
4. Tag Devices as SSD.
5. Tag Devices as Local.
6. Disable a path with ESXCLI.
7. Changing SATP Default Policy of a device.
8. Changing Path Policy of a device(Multipathing).
9. LUN Masking

1- How to get more info about specific device :

esxcfg-scsidevs Prints the mappings between vmhba names and /dev names

~ # esxcfg-scsidevs -l -d naa.60000970000195901112533032323133

List the devices currently controlled by the VMware NMP Multipath Plugin and show the SATP and PSP information associated with that:

# esxcli storage nmp device list -d naa.60000970000195901112533032323133

~ # esxcli storage core device list -d naa.60000970000195901112533032323133

# esxcfg-mpath -m -d naa.60000970000195901112533032323133

RulesGuide

2- Add Claim Rule for VAAI filter :

To integrate with the block storage arrays and to benefit from the array hardware operations, vSphere uses the ESXi extensions referred to as Storage APIs – Array Integration, formerly called VAAI.

If the device does not support T10 SCSI or provides partial support, ESXi reverts to using the VAAI plug-ins, installed on your host, or uses a combination of the T10 SCSI commands and plug-ins. The VAAI plug-ins are vendor-specific and can be either VMware or partner developed. To manage the VAAI capable device, your host attaches the VAAI filter and vendor-specific VAAI plug-in to the device.

1-Define a new claim rule for the VAAI filter

~ # esxcli storage core claimrule add -r 321 -t device -P VAAI_FILTER –claimrule-class=Filter –device=mpx.vmhba32:C0:T0:L0

2-Define a new claim rule for the VAAI plug-in

~ # esxcli storage core claimrule add -r 322 -t device -P VMW_VAAIP_SYMM –claimrule-class=VAAI –device=mpx.vmhba32:C0:T0:L0

3-Load both claim rules :

~ # esxcli storage core claimrule load –claimrule-class=Filter

~ # esxcli storage core claimrule load –claimrule-class=VAAI

4-Run the VAAI filter claim rule

~ # esxcli storage core claimrule run –claimrule-class=Filter

Filter-class rules only needs to be run. When the VAAI filter claims a device, it automatically finds the proper VAAI plug-in to attach.

3- Adding SATP Rules:

The NMP SATP claim rules specify which SATP should manage a particular storage device

esxcli storage nmp satp list

esxcli storage core plugin registration list -N SATP

register plugin first then add its rule:

esxcli storage core plugin registration add -P “TSTSATP” -N SATP -m “TSTMod”

esxcli storage nmp satp rule add -s TSTSATP -V TSTVend -M TSTMod -P “VMW_PSP_MRU”

List again to see :

esxcli storage nmp satp list

esxcli storage core plugin registration list -N SATP

4- Tag Devices as SSD:

You can use PSA SATP claim rules to tag SSD devices that are not detected automatically.

Only devices that are consumed by the PSA Native Multipathing (NMP) plugin can be tagged.

~ # esxcfg-scsidevs -l

~ # esxcli storage core device list -d naa.60000970000195901101533032313046

~ # esxcli storage nmp satp rule add -s VMW_SATP_SYMM –device naa.60000970000195901112533032323133 –option=enable_ssd

~ # esxcli storage core claiming unclaim –type device -d naa.60000970000195901112533032323133

~ # esxcli storage core claimrule load

~ # esxcli storage core claimrule run

5- Tag Devices as Local:

Prerequisites

• Make sure that the device is not shared.

• Power off virtual machines that reside on the device and unmount an associated datastore.

esxcli storage nmp device list

esxcli storage nmp satp rule add -sVMW_SATP_ALUA_CX -d naa.600601602970280097f5a6b974cee411 -O “enable_local”

esxcli storage core claiming reclaim -d naa.600601602970280097f5a6b974cee411

6- Disable a path with ESXCLI:

You can temporarily disable paths for maintenance or other reasons.

~ # esxcli storage core path set –state=off -p vmhba33:C0:T0:L20

Could be achieved as well with command:

7- Changing SATP Default Policy of a device:

VMW_SATP_SYMM default policy is VMW_PSP_RR we will change it to VMW_PSP_FIXED

~ # esxcli storage nmp satp list

/vmfs/volumes # esxcli storage nmp satp set –default-psp=VMW_PSP_RR –satp=VMW_PSP_FIXED

Plugin ‘VMW_PSP_FIXED’ is not a registered SATP.

Plugin ‘VMW_PSP_FIXED’ is not a registered SATP. Please select a plugin from the list in ‘esxcli storage core plugin registered list -N SATP’.

/vmfs/volumes # esxcli storage core plugin registration list -N SATP

/vmfs/volumes # esxcli storage nmp satp set –default-psp=VMW_PSP_FIXED –satp=VMW_SATP_SYMM

Default PSP for VMW_SATP_SYMM is now VMW_PSP_FIXED

8- Changing Path Policy of a device:

esxcli storage core plugin registration list –plugin-class=”PSP”

~ # esxcli storage nmp psp list

~ # esxcli storage nmp device list –device naa.60000970000195901101533032313039

~ # esxcli storage nmp device set –device naa.60000970000195901101533032313039 –psp VMW_PSP_RR

  1. LUN Masking:

The purpose of LUN masking is to prevent the host from accessing storage devices or LUNs or from

using individual paths to a LUN.

esxcfg-mpath -L |grep naa.600601602970280094f5a6b974cee411

~ # esxcli storage core claimrule list

~ # esxcli storage core claimrule add -r 501 -t location -A vmhba3 -C 0 -T 0 -L 12 -P MASK_PATH

~ # esxcli storage core claimrule add -r 502 -t location -A vmhba3 -C 0 -T 1 -L 12 -P MASK_PATH

~ # esxcli storage core claimrule list

~ # esxcli storage core claimrule run

~ # esxcli storage core claimrule load

~ # esxcli storage core claiming reclaim -d naa.600601602970280094f5a6b974cee411

~ # esxcfg-mpath -L |grep naa.600601602970280094f5a6b974cee411

Posted in Uncategorized | Leave a comment