Monday, November 24, 2014

virtual router manager

C:\Windows\system32>netsh wlan set hostednetwork mode=allow
The hosted network mode has been set to allow.

Thursday, November 20, 2014

Auto Login

$ gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true

To disable the “Ask for Confirmation” dialog

$ gconftool-2 -s -t bool /desktop/gnome/remote_access/prompt_enabled false

vi /etc/gdm/custom.conf
[daemon]
AutomaticLoginEnabled=true
AutomaticLogin=root

Secureboot procedure


1. Configured PK to enable Secure boot.

[ PK key is located in this directory ]
[ GUUID is located in signature guid directory ]

2. Configured Key Exchange Key (KEK) certificate downloaded from   http://www.microsoft.com/pkiops/certs/MicCorKEKCA2011_2011-06-24.crt
[KEK key is located in this directory ]
[ GUUID is located in signature guid directory ]

3.  Configured DB certificates -one for windows and one for uEFI certificate Autority (CA),downloaded from below

Windows DB:     http://www.microsoft.com/pkiops/certs/MicWinProPCA2011_2011-10-19.crt
UEFI DB:             http://www.microsoft.com/pkiops/certs/MicCorUEFCA2011_2011-06-27.crt

[ WIN DB key & uEFI DB key is located in this directory]
[ GUUID is located in signature guid directory ]


4. Tried loading /unloading signed & unsigned uEFI drivers on Secure boot cabable machine. Below is the status.
                                                                         
                                                                    SB Enabled   SB Disabled
Signed UEFI driver  loading  in EFI Shell    Success         Success
Unsigned UEFI driver loading in EFI shell    Failed         Success
       

5. We are able to do pxe boot and install Windows 8.1 successfully using the signed image. 

                                                                    SB Enabled    SB Disabled
Booting into Windows 8.1 after pxe installed     Success             Success

6. Tried executing powershell commands after booting into Windows 8.1 pxe installed os.

->If Secure boot was enabled in system bios.
                PS C:\> Confirm-SecureBootUEFI
                True
                 PS C:\> Get-SecureBootPolicy
                Publisher
                ------------
                77fa9abd-0359-4d32-bd60-28f4e78f7784b
   
->If Secure boot was disabled in system bios.

PS C:\> Confirm-SecureBootUEFI
               False
PS C:\> Get-SecureBootPolicy
Get-SecureBootPolicy : Secure boot policy is not enabled on this machine.

->Signed uEFI driver & OptionROM was taken from   : \\10.193.180.100\Projects\Boot\T4\v1_0_0_72\signed files

SUSE Register

This summary is not available. Please click here to view the post.

Wednesday, November 19, 2014

SMB


Server:
=======
1. mkdir c:\1
2. New-SmbShare -Name 1 -Path c:\1 -FullAccess everyone

Client:
=======
New-SmbMapping -LocalPath w: -RemotePath \\102.11.11.11\1 -Persistent $true

Creating testfile:
==================
fsutil.exe file createnew F:\testfile1.dat 1000000000

Running IO:
===========
.\sqlio2.exe -T100 -s50 -t8 -o8 -b512 -fsequential -LS -BN -dA testfile1.dat

Enabling shuntfilter:
=====================
copy the shuntfilter
.\starter.bat C:\


commands:
=========
Get-SmbConnection
list the connections

Get-SmbMapping
to see drives

Start-Process powershell "sqlio2.exe -T100 -s23 -t2 -o4 -b16 -fsequential -LS -BN -dA testfile2.dat" -NoNewWindow
To start io on multiple windows

Enable network debug:
=====================
 bcdedit /set testsigning yes
 bcdedit /dbgsettings
 bcdedit /debug on
 bcdedit /dbgsettings net hostip:10.193.204.31 port:60005 key:b.a.l.a
 bcdedit /set "{dbgsettings}" busparams 3.0.0
 netsh advfirewall set allprofiles state off

1) Enable debug on windows using bcdedit.
Windbg
2) press break button while boot os
3) type following commands  in kd> promt
1)  .reload /f nt
2)  x  nt!kd_default_mask
4) take the address and past it on memory
5) change first 0000 to 0800

Get-SmbShareAccess -Name cn1_1 | Grant-SmbShareAccess -AccountName Everyone -AccessRight full

Creating VMs:
=============
for($i=1; $i -le 30; $i++)
{
    New-VM -Name VM$i -Path \\core96cn2\core96cn1 -Memory 3GB -VHDPath \\core96cn2\core96cn1\vm$i.VHDX -Verbose
    SET-VMProcessor –VMName vm$i –count 2
    Write-Host "vm$i is successfully created";
    sleep 1;
}

icacls.exe I:\CORE96CN1\ /grant fornd\administrator':(OI)(CI)(F)' /t /c

PS C:\Users\administrator.FORND> Get-ClusterNode | Select-String core
PS C:\Users\administrator.FORND> $OtherNode

Name                 ID    State
----                 --    -----
CORE96CN1            21    Up


PS C:\Users\administrator.FORND> $OtherNode.name
CORE96CN1


Get-VMProcessor * | Set-VMProcessor -CompatibilityForMigrationEnabled 1

Set-VM myVM0 -NumCpu 4 -MemoryGB 8 -Confirm:$false
netsh winsock reset catalog


smbconnectstress:
=================

PS C:\Users\administrator.FORND\Desktop\SmbConnect> .\SmbConnect.exe
PS C:\Users\administrator.FORND\Desktop\SmbConnect> .\SmbConnect.exe /S core96cn2 /H smbcon /B 4096 /T 1000


PS C:\Users\administrator.FORND\Desktop> Install-WindowsFeature RSAT-AD-PowerShell

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    No             Success        {Remote Server Administration Tools, Activ...
WARNING: Windows automatic updating is not enabled. To ensure that your newly-installed role or feature is
automatically updated, turn on Windows Update.


PS C:\Users\administrator.FORND\Desktop> Enable-SmbDelegation -SmbServer core96cn2 -SmbClient core96cn3
CheckDelegationPrerequisites : SMB Delegation cmdlets require the Active Directory forest to be in Windows Server 2012
forest functional level.
At C:\windows\system32\windowspowershell\v1.0\Modules\SmbShare\SmbScriptModule.psm1:107 char:14
+     $check = CheckDelegationPrerequisites
+              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CheckDelegationPrerequisites

PS C:\Users\administrator.FORND\Desktop>


PS C:\Users\administrator.FORND> verifier /rules disable 0x9200D

Rule 0x9200D disabled.

New verifier settings:

Enabled Flags Value: 0x01AAEFBB

Standard Flags:
  [X] (0x00000001) Special pool
  [X] (0x00000002) Force IRQL checking
  [X] (0x00000008) Pool tracking
  [X] (0x00000010) I/O verification
  [X] (0x00000020) Deadlock detection
  [X] (0x00000080) DMA checking
  [X] (0x00000100) Security checks
  [X] (0x00000800) Miscellaneous checks
  [X] (0x00020000) DDI compliance checking

Additional Flags:
  [ ] (0x00000004) Randomized low resources simulation
  [X] (0x00000200) Force pending I/O requests
  [X] (0x00000400) IRP logging
  [X] (0x00002000) Invariant MDL checking for stack
  [X] (0x00004000) Invariant MDL checking for driver
  [X] (0x00008000) Power framework delay fuzzing
  [ ] (0x00040000) Systematic low resources simulation
  [X] (0x00080000) DDI compliance checking (additional)
  [X] (0x00200000) NDIS/WIFI verification
  [X] (0x00800000) Kernel synchronization delay fuzzing
  [X] (0x01000000) VM switch verification

  [X] Indicates flag is enabled

Bootmode:
  Persistent

Rules:
  Disabled: 0x9200D (NdisTimedDataSend)
  All other rules using default settings.

Verified drivers:
  wdf01000.sys
  chvbdx64.sys
  chnetx64.sys
  ndis.sys

Fault injection:
================
 verifier /faultssystematic enableruntime
 verifier /faultssystematic querystatistics

9: kd> !verifier 0x800
No injections to report
9: kd> !verifier 0x4

windbg:
.dump /f G:\temp\lnclose\memory.dmp
!stacks 2 chnetx64

netsh advfirewall set allprofiles state off

Storage migration:
==================
Move-ClusterGroup -Name ssdfshare1 -Node core96cn22 -Verbose

09:56 07/08/2014
$iteration=1
while (1)
{
    Move-ClusterGroup -Name fserver -Verbose
    sleep 10
    $iteration=$iteration + 1
    echo "$iteration" >> c:\iteration.txt

}

18:12 07/04/2014
Remove cluster node:
Remove-ClusterNode core96cn5 -force

QFE:
gwmi -class "win32_quickfixengineering"
wmic qfe list
wusa /uninstall /kb:455999

CAU:
PS C:\Users\administrator.FORND> Add-CauClusterRole -ClusterName ndkstorcluster -CauPluginName Microsoft.WindowsUpdatePl
ugin, Microsoft.HotfixPlugin -CauPluginArguments @{ 'IncludeRecommendedUpdates' = 'True' }, @{ 'HotfixRootFolderPath' =
'\\ssdfshare1\HotfixRootFolderPath' } -StopOnPluginFailure -EnableFirewallRules -Force

12:53 24/04/2014
volatile:
verifier /volatile /removedriver ndis.sys


VBD:
====
C:\sw\dev\T4\windows\Src\kernel\nic\ndis6x>msbuild.exe cht4vbd.vcxproj /p:Configuration="WinPreRel Release" /P:Platform=x64 /P:RunCodeAnalysisOnce=True
C:\sw\dev\T4\windows\Src\kernel\nic\ndis6x>msbuild.exe cht4vbd.VcxProj /target:sdv /p:Configuration="WinPreRel Release" /P:Platform=x64 /p:inputs="/check:default.sdv"
C:\sw\dev\T4\windows\Src\kernel\nic\ndis6x>msbuild.exe cht4vbd.VcxProj /target:dvl /p:Configuration="WinPreRel Release" /P:Platform=x64

NDIS:
=====
C:\sw\dev\T4\windows\Src\kernel\nic\ndis6x>msbuild.exe cht4ndis.vcxproj  /p:Configuration="WinPreRel Release" /P:Platform=x64 /P:RunCodeAnalysisOnce=True
C:\sw\dev\T4\windows\Src\kernel\nic\ndis6x>msbuild.exe cht4ndis.vcxproj /target:sdv /p:Configuration="WinPreRel Release" /P:Platform=x64 /p:inputs="/check:default.sdv"
C:\sw\dev\T4\windows\Src\kernel\nic\ndis6x>msbuild.exe cht4ndis.VcxProj /target:dvl /p:Configuration="WinPreRel Release" /P:Platform=x64

Scale out file server:
=====================
new-smbshare -ContinuouslyAvailable $true -name ssdfshare1 -path C:\ClusterStorage\Volume2\pcs1

Assignign permissios to the share:
==================================
$AllowedAccounts = @("FORND\CORE96CN1$","FORND\CORE96CN4$","FORND\CORE96CN5$","FORND\CORE96CN6$","FORND\CORE96CN7$","FORND\CORE96CN8$","FORND\CORE96CN9$","FORND\CORE96CN10$","FORND\Administrator")

foreach($AllowedAccount in $AllowedAccounts)
 {
  $permission = "$AllowedAccount"+":(OI)(CI)(F)"
 
  icacls.exe C:\ClusterStorage\Volume2\pcs1 /grant $permission

  Grant-SmbShareAccess -AccountName $AllowedAccount -AccessRight Full -Name ssdfshare1 -Confirm:$false
 }


Grant-SmbShareAccess -Name ShareVolume -AccountName "domain computers" -AccessRight Full
Grant-SmbShareAccess -Name ShareVolume -AccountName "domain users" -AccessRight Full

deleting files:
--------------
for /D %f in (7*) do rmdir %f /s /Q

CTSserver:
=========
ctsTraffic.exe -listen:102.1.1.204 -protocol:tcp -p attern:duplex -verify:data -buffer:1048576 -transfer:1073741824 -port:5658
ctsTraffic.exe -listen:102.2.2.204 -protocol:tcp -p attern:duplex -verify:data -buffer:1048576 -transfer:1073741824 -port:5659

CTSClient:
==========
ctsTraffic.exe -target:102.1.1.204 -iterations:10 -pattern:duplex -connections:3 -protocol:tcp -verify:data -buffer:1048576 -transfer:1073741824 -port:5658
ctsTraffic.exe -target:102.2.2.204 -iterations:10 -pattern:duplex -connections:3 -protocol:tcp -verify:data -buffer:1048576 -transfer:1073741824 -port:5659

logman:
=======
logman start vmmdebug -p Microsoft-VirtualMachineManager-Debug -f bin -o C:\log.etl -ets

logman stop vmmdebug –ets

Set NDIS adv property:
=====================
Set-NetAdapterAdvancedProperty -Name “Ethernet 3” -DisplayName "Flow Control" -DisplayValue "Disabled"


====
PCS
====

Run creation:
=============
PS C:\pcs> .\Microsoft.HyperV.Test.Stress.PrivateCloud.CreatePCSRun.exe /SQLConnectionString:"Data Source=localhost;Init
ial Catalog=PrivateCloudStressMaster;Integrated Security=True" /TemplateSQLFile:Create_PCS_Template.sql /SetWTTValue:- /
RunDescription:"22July"

PrivateCloudStress.XML execution:
==============
.\start_pcs.ps1 -CSUcluster ndkcluspcs.fornd.com -CSUconfig .\PrivateCloudStress.xml

PrivateCloudStress_storage.XML execution:
===========
.\start_pcs.ps1 -CSUcluster ndkstorcluster.fornd.com -CSUconfig .\PrivateCloudStress_Storage.xml

logs:
-----
wevtutil epl System  ( (hostname)+"-system.evtx")
wevtutil epl Microsoft-Windows-Hyper-V-VMMS-Analytic ( (hostname)+"-Hyper-V-VMMS-analytic.evtx")
wevtutil epl Microsoft-Windows-Hyper-V-VMMS-Admin ( (hostname)+"-Hyper-V-VMMS-Admin.evtx")
wevtutil epl Microsoft-Windows-Hyper-V-VMMS-Networking ( (hostname)+"-Hyper-V-VMMS-Networking.evtx")
wevtutil epl Microsoft-Windows-Hyper-V-VMMS-Operational ( (hostname)+"-Hyper-V-VMMS-Operational.evtx")
wevtutil epl Microsoft-Windows-Hyper-V-VMMS-Storage ( (hostname)+"-Hyper-V-VMMS-Storage.evtx")
wevtutil epl Microsoft-Windows-Hyper-V-Worker-Admin ( (hostname)+"-Hyper-V-VMWP-Admin.evtx")
wevtutil epl Microsoft-Windows-Hyper-V-Worker-Analytic ( (hostname)+"-Hyper-V-VMWP-Analytic.evtx")
wevtutil epl Microsoft-Windows-Hyper-V-Worker-VDev-Analytic ( (hostname)+"-Hyper-V-VMWP-VDev-Analytic.evtx")

create run:
-----------
.\Microsoft.HyperV.Test.PrivateCloudSimulator.CreatePCSRun.exe /SQLServer:BRUCE /SetWTTValue:- /RunDescription:"sept16"

Update Product key

PS C:\Windows\system32> dism /online /set-edition:ServerDatacenter /productkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /accepteula


Deployment Image Servicing and Management tool
Version: 6.2.9200.16384

Image Version: 6.2.9200.16384

Starting to update components...
Starting to install product key...
Finished installing product key.

Removing package Microsoft-Windows-ServerDatacenterEvalEdition~31bf3856ad364e35~amd64~~6.2.9200.16384
[==========================100.0%==========================]
Finished updating components.

Starting to apply edition-specific settings...
Finished applying edition-specific settings.

The operation completed successfully.
Restart Windows to complete this operation.
Do you want to restart the computer now? (Y/N)

Windows Symbol path

SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols;cache*c:\websymbols;

Burning DUD to pendrive


VNCIN2:~ # fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x33213321

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         652     5237158+  83  Linux
/dev/sda2             653         913     2096482+  82  Linux swap / Solaris
/dev/sda3             914       11356    83883397+  83  Linux

Disk /dev/sdc: 16.0 GB, 16008609792 bytes
255 heads, 63 sectors/track, 1946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0ba8bbbd

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1        1947    15632384    c  W95 FAT32 (LBA)
VNCIN2:~ # fdisk /dev/sdc

The number of cylinders for this disk is set to 1946.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): d
Selected partition 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.



=============

VNCIN2:~ # fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x33213321

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         652     5237158+  83  Linux
/dev/sda2             653         913     2096482+  82  Linux swap / Solaris
/dev/sda3             914       11356    83883397+  83  Linux

Disk /dev/sdc: 16.0 GB, 16008609792 bytes
64 heads, 32 sectors/track, 15267 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x0ba8bbbd

   Device Boot      Start         End      Blocks   Id  System
==============

VNCIN2:~ # mkfs.vfat /dev/sdc
mkfs.vfat 2.11 (12 Mar 2005)
mkfs.vfat: Will not try to make filesystem on full-disk device '/dev/sdc' (use -I if wanted)

=============

VNCIN2:~ # mkfs.vfat -I /dev/sdc
mkfs.vfat 2.11 (12 Mar 2005)

===============

VNCIN2:~ # dd if=/root/Chelsio-DriverUpdateDisk-SLES11sp2-x86_64-2.7.0.0.img of=/dev/sdc
30988+0 records in
30988+0 records out
15865856 bytes (16 MB) copied, 4.97102 s, 3.2 MB/s
VNCIN2:~ #

================

RHEV configuration setp by step



Requirements:
RHEV 3.4 ISO
RHEL 6
4 NODES (RHEVh1, RHEVh2, RHEVm, DNS&Iscsi target)
RHN account

RHEV (RedHat Enterprise Virtualization):
Install RHEV 3.4 on two nodes called RHEVh1 and RHEVh2 (Make sure Intel VT is enabled in both the machines)
Enable Network, SSH under security.
oVirt Engine: Join to RHEVm (Management server)

To install updates, Join the RHEVh1 and RHEVh2 to Red Hat Network.
Management Server Config:
Install RHEL 6.x (Basic server would do)
Join to RHN network:
In the HOST run rhn_register and follow the steps.
Then run #yum update -y
Login to rhn.redhat.com
Go to RHN classic and you would see the registered machines list.
Red symbol indicates updates are not done.

Click on machine name (DONALD.asicdesigners.com) you would see all subscribed channels.

Click on alter channel subscription to change the channels.
In the base channel click and modify as below.
Under below

Select below

Under additional channels select below.

Then again run #yum upate –y
#yum install rhevm –y
With this package installation is done.
VMware workstation:
apic.xapic.enable = "FALSE"
vcpu.hotadd = "TRUE" to vcpu.hotadd = "FALSE"
Configuration of RHEVM:
#rhevm-setup
Follow the steps, provide everything default except firewall, proxy, brokered update via ovirt.
          Web access is enabled at:
              http://DONALD.blr.asicdesigners.com:80/ovirt-engine
              https://DONALD.blr.asicdesigners.com:443/ovirt-engine
          Please use the user "admin" and password specified in order to login
Password we will be setting in the process of rhevm-setup
The below is the default web page, if everything is perfect we should see that screen as home page.
Select on Administration portal to login.

Click on Administration portal

After login right click and create new Datacenter then create cluster.
In both RHEVh1 and RHEVh2 provide RHEVm IP in ovirt engine.


Make sure you don’t add RHEVh* to ovirt engine, unless you have cluster data centre up and running.
First by default, all hosts comes to default cluster.
Right click approve them, while approving move them to proper cluster.
Then click on activate, HOSTS will be activated.
Now add our storage, by clicking on storage tab.
Provide iSCSI in dropdown box. Provide target IP and scan. Then select LUN and click ok.
HOSTS ARE UP.


STORAGE is up.


[root@DONALD images]# rhevm-iso-uploader -v -i ISO_DOMAIN upload /opt/images/RHEL6.iso




NFS based storage attach:
# mkdir /storage

# chmod 0755 /storage
# chown 36:36 /storage/

# cat /etc/exports
/storage    *(rw,sync,no_subtree_check,all_squash,anonuid=36,anongid=36)

# /etc/init.d/nfs restart