syg_hira's tech memo

windows server関連のTipsのおぼえがき

how to use - makecab.exe(updated)

Makecab.exe, it's file compress and packaging tool.
Makecab capable of making install package.
But,I will compress files to CAB.

Goal

  • Make single CAB file.I will not split CAB file that size is same as legacy media(FD,MO,CD and etc)
  • no subfolders to contain splited CAB files
  • no file created for install package
makecab.exe /D CabinetNameTemplate=CABFilePath /D RptFileName=nul /D InfFileName=nul /D DiskDirectoryTemplate= /D MaxDiskSize=0 SorceFilePath

Parameters
CABFileName:Path of CAB file to create.
SorceFilePath:Name of file list. It is contained file path of files to be contained in CAB.

RptFileName and InfFileName is nul: these file is used to install package.
DiskDirectoryTemplate is blank: we do not haev to make CAB in any subfolder to splited files.
MaxDiskSize is 0: We donot have to split file.

STOP: c00002e2 ... when boot domain controller on Hyper-V

I had a windows 2008 R2 active directory domain controller, it's running on hyper-v virtual machine.
The DC had a NTDS directory on D drive.
The VM had used a differencial VHD.
I had merge the virtual disk from differencial to new single vhd.

After merging VHD, attach the new VHD and boot domaincontroller.
I had encount the error as bellow.


STOP: c00002e2 Directory services could not start because of the following error:

Error Status: 0xc000001.
please shutdown this system and reboot into Directory Services restore Mode, check the event log for more detailed information.


Resolution

  1. Press F8 key on start up
  2. Select "Directory Service Restore mode" and Press Enter
  3. Log on as ".\Administrator" with the password for "Directory Service Restore mode".
  4. Open NTDS directory("D:\NTDS" in my case, Windows default may be "C:\Windows\NTDS")
  5. rename "*.log"(rename to "*.log.bak" in my case)
  6. restart VM

BOOTMGR is missing

Hyper-Vゲストが突然 BOOTMGR is missing を出して起動しなくなった。
宅鯖の仮想マシンをAzureにアップロードしようと、差分仮想ディスク(VHDX)を別VHDに結合していたら、なにかやってしまったらしい。

ネットでいろいろ調べたが、この手順で成功。
BOOTMGR is missing in Windows Server 2008 R2

Windows Server 2008 R2だが、Windows 7 インストールディスクの自動修復で回復させると一発だった。

export event log on remote machine with wevtutil

when wevtutil 'remote' option is specifies, is a local path on remote machine. not UNC...It's tricky.

example

Remote Machine:RServer

wevtutil export-log "System" "D:\Log\Exported\Sys.evtx" /Remote:LServer

The file will exported as \\RServer\D$\Log\Exported\Sys.evtx

KingSpec SATA-Mini PCIe EeePC 900/901/903/S101 MLC SSD 128GB performance - Crystal Disk Mark

f:id:syg_hira:20140109145504j:plain

-----------------------------------------------------------------------
CrystalDiskMark 3.0.2 x64 (C) 2007-2013 hiyohiyo
                           Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

           Sequential Read :   162.848 MB/s
          Sequential Write :    85.056 MB/s
         Random Read 512KB :   140.574 MB/s
        Random Write 512KB :    40.697 MB/s
    Random Read 4KB (QD=1) :    13.717 MB/s [  3348.8 IOPS]
   Random Write 4KB (QD=1) :     1.057 MB/s [   258.0 IOPS]
   Random Read 4KB (QD=32) :    14.584 MB/s [  3560.5 IOPS]
  Random Write 4KB (QD=32) :     0.629 MB/s [   153.6 IOPS]

  Test : 1000 MB [H: 0.1% (0.1/119.2 GB)] (x5)
  Date : 2014/01/09 14:55:57
    OS : Windows 8 Professional [6.2 Build 9200] (x64)
  

Equipments.
SSD:KingSpec SATA-Mini PCIe EeePC 900/901/903/S101専用 MLC SSD 128GB

KingSpec SATA-Mini PCIe EeePC 900/901/903/S101専用 MLC SSD 128GB

KingSpec SATA-Mini PCIe EeePC 900/901/903/S101専用 MLC SSD 128GB

MiniPCIe to SATA2 converter:RunCore Mountig Bracket


SATA2 to USB3.0 Converter:RATOC SA25-TR1-U3BK

How to convert the virtual achine from VMWare to Hyper-V

MS製品を担いでる会社なのに、なぜか検証環境をVMWare Player 6で作っていたメンバーから、技術検証用の仮想マシンを貰った。
うちのチームは仮想環境はHyper-V2.0で統一してるので、仮想マシンをコンバート。
一般的なvmdk to VHDコンバーターは、MBRのコンバートができないらしく、起動させるまで一苦労。
手順をおぼえがき。

  1. VMDKをVHDにコンバート。最終的にStarWind V2V Converterを使ったが、 VMDK2VHD、NHCなど、どれでも問題ないと思われる。
  2. TestDiskで、ブートセクタを再作成する。→参考Rebuilding NTFS boot sector using Testdisk

SAMSUNG SSD PM830 128GB performance - Crystal Disk Mark

f:id:syg_hira:20131020151546j:plain

-----------------------------------------------------------------------
CrystalDiskMark 3.0.2 x64 (C) 2007-2013 hiyohiyo
                           Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

           Sequential Read :   460.104 MB/s
          Sequential Write :   324.035 MB/s
         Random Read 512KB :   325.450 MB/s
        Random Write 512KB :   271.777 MB/s
    Random Read 4KB (QD=1) :    19.925 MB/s [  4864.6 IOPS]
   Random Write 4KB (QD=1) :    81.172 MB/s [ 19817.4 IOPS]
   Random Read 4KB (QD=32) :   272.388 MB/s [ 66500.9 IOPS]
  Random Write 4KB (QD=32) :   113.765 MB/s [ 27774.6 IOPS]

  Test : 1000 MB [C: 58.2% (69.0/118.7 GB)] (x5)
  Date : 2013/10/20 15:11:02
    OS : Windows 8 Professional [6.2 Build 9200] (x64)