月度归档:2015年10月

Nagios Plugin: check_esxi_hardware.py

This script is a Nagios plugin to monitor the hardware of ESX and ESXi servers. It can also be used as standalone script to check the hardware – Nagios isn’t necessary to run it. The plugin is written in python, so you need to have python installed. See Requirements for more information. 继续阅读

vCenter Server 5.5 setup stuck installing Directory Services

If you ever land up in a situation where your vCenter Server setup is stuck at the directory services stage and in the “VMINST.LOG” found under %temp% u see it trying to perform the following..

  1. VMware VirtualCenter-build-1235232: 02/20/14 09:48:55 Attempting to launch [“C:\Windows\system32\cmd.exe” /c start /w C:\Windows\system32\ocsetup.exe DirectoryServices-ADAM /passive /norestart]

ds_cn 继续阅读

Esxi 5.5 添加存储设备的问题

将一台服务器用过的磁盘加入到ESXi主机中,通过vSphere Client添加存储一直提示 esxi在x.x.x.x上调用对象 “ha-datastoresystem”的“HostDatastoreSystem.QueryVmfsDatastoreCreateOptions”

用ssh连上esxi服务器,fdisk -l查看磁盘信息如下:

/dev/disks # fdisk -l

***
*** The fdisk command is deprecated: fdisk does not handle GPT partitions.  Please use partedUtil
***
Disk /dev/disks/naa.5000c500213f8657: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/disks/naa.5000c500213f8657p1   *           1          13      102400   7 HPFS/NTFS
Partition 1 does not end on cylinder boundary
/dev/disks/naa.5000c500213f8657p2              13        6528    52326400   7 HPFS/NTFS
/dev/disks/naa.5000c500213f8657p3            6528       55311   391849984   7 HPFS/NTFS
/dev/disks/naa.5000c500213f8657p4           55311      121602   532481024   f Win95 Ext’d (LBA)
/dev/disks/naa.5000c500213f8657p5           55311      104094   391849984   7 HPFS/NTFS
/dev/disks/naa.5000c500213f8657p6          104094      121602   140628992   7 HPFS/NTFS
Found valid GPT with protective MBR; using GPT

Disk /dev/disks/naa.50014ee00284452b: 976773168 sectors,  931M
Logical sector size: 512
Disk identifier (GUID): d82122c8-22ec-463d-801c-7f7d82cfbae7
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134

Number  Start (sector)    End (sector)  Size       Code  Name
1              64            8191        8128   0700
2         7086080        15472639       8190K   0700
3        15472640       976773134        916M   0700
5            8224          520191        499K   0700
6          520224         1032191        499K   0700
7         1032224         1257471        219K   0700
8         1257504         1843199        571K   0700
9         1843200         7086079       5120K   0700

把该硬盘(Disk /dev/disks/naa.5000c500213f8657)模式改为msdos即可以vSphere Client上加载硬盘。

使用以下命令:

partedUtil -h获得帮助。

Create New Label (all existing data will be lost): mklabel <diskName> <label>

使用这个创建新卷标选项,所有数据会丢失。

/dev/disks # partedUtil mklabel /dev/disks/naa.5000c500213f8657 msdos
/dev/disks # fdisk -l

***
*** The fdisk command is deprecated: fdisk does not handle GPT partitions.  Please use partedUtil
***
Disk /dev/disks/naa.5000c500213f8657: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
Found valid GPT with protective MBR; using GPT

Disk /dev/disks/naa.50014ee00284452b: 976773168 sectors,  931M
Logical sector size: 512
Disk identifier (GUID): d82122c8-22ec-463d-801c-7f7d82cfbae7
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134

Number  Start (sector)    End (sector)  Size       Code  Name
1              64            8191        8128   0700
2         7086080        15472639       8190K   0700
3        15472640       976773134        916M   0700
5            8224          520191        499K   0700
6          520224         1032191        499K   0700
7         1032224         1257471        219K   0700
8         1257504         1843199        571K   0700
9         1843200         7086079       5120K   0700

再次通过vsphere client添加存储时没有出错。