作者归档:John

Cluster resource ‘Virtual Machine XXX’ of type ‘Virtual Machine’ in clustered role ‘XXX’ failed in windows 2012 hyperv cluster

Cluster resource ‘Virtual Machine XXX’ of type ‘Virtual Machine’ in clustered role ‘XXX’ failed. The error code was ‘0x80004005’ (‘Unspecified error’).

Based on the failure policies for the resource and role, the cluster service may try to bring the resource online on this node or move the group to another node of the cluster and then restart it. Check the resource and group state using Failover Cluster Manager or the Get-ClusterResource Windows PowerShell cmdlet.

–AND–

Live migration of ‘Virtual Machine VM’ failed.

Virtual machine migration operation for ‘VM’ failed at migration destination ‘HYPERVHOST’. (Virtual machine ID AFDD9E40-58EF-4364-AF83-0EA9F4B54C0E)

The virtual machine ‘VM’ is using processor-specific features not supported on physical computer ‘HYPERVHOST’. To allow for migration of this virtual machine to physical computers with different processors, modify the virtual machine settings to limit the processor features used by the virtual machine. (Virtual machine ID AFDD9E40-58EF-4364-AF83-0EA9F4B54C0E)

—–

This may happen if you are running hyper-v cluster with different hardware especially you are mixing up a latest server and a old box.

Just shutdown the VM and open settings in cluster manager, make sure Migrate to a … is selected under Processor>Compatibility

坑爹的windows server 2008 r2安全配置引起不能安装.net 服务

Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

Exception occurred while initializing the installation:
System.IO.FileLoadException: Could not load file or assembly ‘file:///blablabla\blablabla.exe’ or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515).

解决办法很简单:找到服务的exe,右键属性,unblock,完事。
如果服务还要加载别的dll,那么一个个来吧……

VAMT 2.0: An item with same key has already been added

param($inputFilePath, $vamtDirPath)

$cilFilePath = Resolve-Path $inputFilePath;

if (!$cilFilePath)

{

Write-Error “Expected input file name of target CIL”;

exit 1;

}

if ($vamtDirPath)

{

$vamtDirPath = Resolve-Path $vamtDirPath;

}

else

{

$prograPath = [environment]::GetEnvironmentVariable(“ProgramFiles(x86)”);

if (!$prograPath -or $prograPath -eq “”)

{

$prograPath = [environment]::GetEnvironmentVariable(“ProgramFiles”);

}

$vamtDirPath = $prograPath + “\VAMT 2.0”

}

try

{

$assembly = [System.Reflection.Assembly]::LoadFile($vamtDirPath + “\Vamtrt.dll”);

}

catch

{

Write-Error “Error while attempting to load VAMT assembly. Provide the correct path to your VAMT installation if VAMT is not installed to the default directory.”;

exit 1;

}

$fileSerializer = new-object Microsoft.SoftwareLicensing.Vamt.FileSerializer($cilFilePath);

$softwareLicensingData = $fileSerializer.Deserialize();

for ($i = 0; $i -lt $softwareLicensingData.Machines.Length; $i++)

{

$machine = $softwareLicensingData.Machines[$i];

if ($machine.MacAddresses.Count -gt 0)

{

$distinctMacAddrs = new-object System.Collections.ObjectModel.Collection[string];

foreach ($mac in $machine.MacAddresses)

{

if (!$distinctMacAddrs.Contains($mac))

{

$distinctMacAddrs.Add($mac);

}

}

$machine.MacAddresses.Clear();

foreach ($distinctMac in $distinctMacAddrs)

{

$machine.MacAddresses.Add($distinctMac);

}

}

}

$fileSerializer.Serialize($softwareLicensingData);

Copy your saved .CIL file to c:\script. For example c:\script\saved.cil
Copy the included source code from this KB article into the clipboard
Click Start, All Programs, Accessories, Windows Powershell, “Windows powershell ise”
In Windows PowerShell click in the Untitled1.ps1 window
Paste in contents of the script from this article
Click File, save as, c:\script\ScrubCil.ps1
Click Start, All Programs, Accessories, Windows Powershell, Right click “Windows powershell” and choose “Run as Administrator”
At the powershell prompt type the following commands
cd \script
set-executionpolicy unrestricted
.\ScrubCil.ps1 saved.cil

在windows8RTM下安装.net 3.5 2.0 1.0……

很多操蛋的软件依旧需要.net 2.0甚至1.0才能运行,在win8下尝试了很多种方法都失败,最后只有老老实实的按照安装失败时的提示去看ms的kb,答案如下:

首先解压或者挂载win8的iso,这里不得不说ms现在nb了,虚拟光驱可以去死了,win8原生可以挂载iso为虚拟光驱了。

然后,打开一个管理权限的cmd

Dism /online /enable-feature /featurename:NetFx3 /All /Source:X:\sources\sxs /LimitAccess

完事

喷一喷国产的Square-乐刷

最近偶然在腾讯看到手机刷卡器免费送,那就毫不犹豫的搞了一只回来,简单试用后,开喷。

刷卡器叫乐刷

先一句话总结:现阶段这刷卡器就是脱裤子放屁,多此一举。

再多说点:这刷卡器其实就只能帮你输入卡号到腾讯的财付通快捷支付界面,然后走信用卡或借记卡无卡支付通道,别无它用。和square比起来简直就不是一个时代的东西。

特别提醒:这刷卡器的软件号称经过SSL或SET加密传输数据,我手贱抓了一把包(见文末),竟然是HTTP明文传输(至少是android客户端这样),天雷滚滚啊,信用卡数据啊最起码用个SSL好吧,这叫我怎么相信你啊? 一个对客户敏感数据传输极不负责的公司,我不相信在服务器端会有多么严密的安全防护,用了乐刷的朋友们,自求多福吧,反正我是打算换卡了。

想要自己体验的可以自己去申请,先给39押金,任意交易3笔后返还押金(给自己充3笔10元话费足矣):

http://www.yeahka.com/yajinhuodong.html

下面开始正文

先看包装,看起来很普通的信封,里面是气泡膜:

正面

背面

刷卡器:

 

看完外观,下面开始玩软的。

据说android和ios都可以支持,touch最近刚好挂了,主力手机是wp不被支持,于是找了个华为的C8650来体验,按照官方网站的说法,菜市场里可以下载到android应用,去菜市场看了看,还真有,但,怎么开法商是个人名称而不是公司名?而且,下载量似乎很丢脸。

仔细看了看,似乎真的是这货

下载,安装,开跑:

试试充个QB吧,似乎这也是目前已知可以进行的最小金额的交易了。

插上刷卡器,第一次使用需要激活,手头这个已经被自己手贱激活过了就截不了屏了。

然后选Q币充值,给Q号,然后就到了收银台

这里可以选刷卡或者银联手机支付,咦,初级阶段?好像很眼熟的样子……这个等会再玩,先来刷卡看看

一张ICBC的信用卡,很容易就刷过去了

接下来就有点不太对劲了,这问我是哪家银行干嘛?难道不走银联的?

真相如此:他娘的,原来只是个读卡号的东西……看到了吧,持卡人姓名、CVV、有效期、身份证号、手机。。。这不就是财付通、支付宝之类平台上的无卡支付嘛……

提交后,收到的居然是财付通发来的短信

接下来就懒得喷了也没必要喷了,到此为止了,补充一下,工行那边交易明细里看到刷卡地点是深圳市财付通科技有限公司,交易类型和以往的无卡支付一样显示为POS交易。

最后,出于好奇,这软件号称是SSL或SET加密,来抓个包看看,下面是一张没在乐刷用过的卡,会被要求输入所有信息

居然是明文HTTP,没有SSL,更别提SET了。。只给重点,别的不多说

Host: www.yeahka.com

GET /cgi-bin/transaction_proxy.cgi?p=*******************************************************

*********************************************************

*********************************************************

*********************************************************

*********************************************************

*********************************************************

*********************************************************

********************* HTTP/1.1

几经折腾,querystring还是没搞定,不知道其中有没有信用卡号,所以还是藏着吧,我想对于专业人士来说这个不会是大问题。(大概是url encode外加base64外加某种别的加密方式)

再来看服务器返回:

1d4
PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8cm22224KPGVycm9y

X2NvZGU+LTgwMDAwNTY8L2Vycm9yX2NvZGU+CjxlcnJvcl

9tc2c+5oKo55qE5ae1111N5LiO6ZO26KGM6aKE55WZ5LiN5L

iA6Ie077yM6K+35qC45a+577yBPC9lcnJvcl9tc2c+CjxlcnJvcl90

aXA+6K+35qC45a+55oKo52222oyB5Y2h5Lq65aeT5ZCN77yM

56Gu5L+d5LiO5q33332h5byA5oi35L+h5oGv5LiA6Ie077yBPC

9lcnJvcl90aXA+4444ZXR1cm5fbW9iaWxlPjEyMzQ1Njc4OTAx

MjwvcmV0dXJuX21vYmlsZT4KPHRyYW5zYWN0aW9uX2lkP

jIwMTIwODE5MTQzNjQyMDAwMDAwMDAwMDAwMDAxN

DA0PC90cmFuc2FjdGlvbl9pZD4KPC9yb290Pgo=
0

这个直接就base64解码完事。

<?xml version=”1.0″ ?>
<root>
<error_code>-8000056</error_code>
<error_msg>您的姓名与银行预留不一致,请核对!</error_msg>
<error_tip>请核对您的持卡人姓名,确保与此卡开户信息一致!</error_tip>
<return_mobile>xxxxxxxxxxxx</return_mobile>
<transaction_id>YYYYMMDDHHMMSS00000000000000xxxx</transaction_id>
</root>

我还能说什么呢?有相关人士愿意解释一下吗?