AWSでHyper-V その22014/01/11 13:30

「Hyper-V Server 2012 R2」をインストールするのを諦めて、「Windows Server 2012」のHyper-Vを有効にする事を試みました。

http://technet.microsoft.com/ja-jp/library/hh846766.aspx
http://technet.microsoft.com/ja-jp/library/hh846766.aspx#BKMK_PSstep1

上の情報に従って、パワーシェルでインストールしようとしましたが以下の様に表示され、出来ないようです。
----------
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.

PS C:\Users\Administrator> Install-WindowsFeature –Name Hyper-V -IncludeManagementTools -Restart

Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
False Maybe Failed {}
Install-WindowsFeature : A prerequisite check for the Hyper-V feature failed.
1. Hyper-V cannot be installed: A hypervisor is already running.
At line:1 char:1
+ Install-WindowsFeature –Name Hyper-V -IncludeManagementTools -Restart
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Hyper-V:ServerComponentWrapper) [Install-WindowsFeature], Exception
+ FullyQualifiedErrorId : Alteration_PrerequisiteCheck_Failed,Microsoft.Windows.ServerManager.Commands.AddWindowsF
eatureCommand

----------

以下のコマンドでは、出来る様な事を書いてますが。 (^^;
Win8.1なりで、インストールしてみた方が良い様な気もして来ました。

----------
PS C:\Users\Administrator> Get-WindowsFeature Hyper-V

Display Name Name Install State
------------ ---- -------------
[ ] Hyper-V Hyper-V Available
----------

Hyper-V対応ハードや動くかどうかのツールの情報も発見しました。

http://www.vwnet.jp/mura/Hyper-V/list.htm
http://www.microsoft.com/en-us/download/details.aspx?id=592

AWSでHyper-V2014/01/09 12:11

AWSでHyper-Vを動かしてみようと、Windows Server 2012のAMIをインストールした後、以下のサイトに従って、Hyper-VのファイルをDLして、インストールを試みました。

http://ascii.jp/elem/000/000/847/847570/

以下の手順で、「自動的にマシンが数回再起動したのち」に該当部分で、「Microsoft Remote Desktop Connection Client for Mac 2.1.1」の接続が途切れたあと、暫く経ってから、再接続しようと何回か試みましたが出来ませんでした。

http://ascii.jp/elem/000/000/847/847570/index-3.html

しょうがないので、AWSが画面から該当インスタンスを停止させ起動してみましたが、なかなか起動出来ません。Status Checksが「Initialzing...」と表示されたまま・・・・。その後「1/2 checks passed」との表示。
どうしたのかな。ファイルが壊れたのかな? (^^;

ちなみに、外部で作ったVHD(VM)はインポート出来る様です。Windows7/8/8.1などで、VHDを作った方が良いのでしょうか。

http://aws.amazon.com/jp/ec2/vmimport/
http://aws.typepad.com/aws_japan/2013/04/aws-storage-gateway-now-supports-microsoft-hyper-v.html
http://ultradairen.wordpress.com/2011/12/21/amazon_aws_ec2_hyper-v/

Hyper-VはWindows Serverで動かすのが必須ではなく、ハードが対応するWindows7/8/8.1でも動きそうです。そういえば「Hyper-V Server 2012 R2」をインストールする時、既存のHyper-Vを置き換えますかとか、聞いて来たので、2012に導入済みのHyper-Vで色々試してみるのも良いかも知れません。

ちなみに、AWSのWindows Server 2012は英語版なのですが、以下の通りに作業すると、日本語表示になります。
http://recipe.kc-cloud.jp/archives/3703

Windows Server 20122014/01/08 23:03

AWSでWindows Serverを動かしてみる事にしました。以下のサイトを参考にWindows Server 2012を選び起動に成功しました。

http://docs.aws.amazon.com/ja_jp/AWSEC2/latest/WindowsGuide/EC2Win_GetStarted.html

Tokyo地区と他地区の差、AWSのバージョンアップ前後の差等により、上のサイトと実際は微妙に違う所があるようです。感触をつかむには、以下の動画を見た方が良いでしょう。

http://www.youtube.com/watch?v=OLfmqcYnhUM

インスタンスを作って、サーバーにアクセする為に、以下のソフトを使用しました。これはMacのソフトです。Winだと標準かなにかで接続出来そうですね。

Microsoft Remote Desktop Connection Client for Mac 2.1.1
http://www.microsoft.com/ja-jp/download/details.aspx?id=18140

本来は 「Windows Server 2012 R2」や、日本語版を使いたかったのですが、Hyper-Vの性能が高かったり、AWSが日本語版を提供して無かったので、英語版の「Windows Server 2012」を選びました。

ちなみに、マウスの右クリックは必須なので、マウスを使用した方が良い様です。

リンク:
http://www.atmarkit.co.jp/ait/articles/1310/03/news100.html
http://news.mynavi.jp/articles/2012/09/06/winsserver2012/
http://news.mynavi.jp/articles/2012/10/18/server2012/

Litecoin その後2014/01/08 13:43

Litecoinの情報ですが、以下のサイトで概要がつかめると思います。
http://laineema.gger.jp/archives/4649481.html

現在までの所、約24時間で、採掘出来たのは約0.07LTCで、平均採掘速度は約250kH/sです。上のサイトでも紹介している以下のサイトで試算してみると、
https://www.litecoinpool.org/calc

採掘出来たのは約$1.7です。AWSを使っているので、電力量は適当に10Wなどを入れました。AWSの使用料は$0.65/Hで、完全に赤字ですね。

赤字の原因はNetwork Difficultyが現在 約3366 で高すぎるのと、交換レートやNVIDIAでは採掘速度が高く無い為でしょう。AMD(ATI)にするとか、Network Difficultyがもっと低くならないと、撤退した方が良さそうです。

以下に、Network Difficultyなどの推移が出ています。
https://www.litecoinpool.org/charts

Litecoinの動向等が分かると思います。
http://flamenco.main.jp/kabu/?cat=30&paged=2

AWSのインスタンス2014/01/07 18:25

AWSには様々な仮想ハードがあります。それの解説ページを載せました。

概要及び費用
http://aws.amazon.com/jp/ec2/

ちょっと詳しく、プロセッサ情報、intel AES-NI/AVX/Turbo
http://aws.amazon.com/jp/ec2/instance-types/

もっと詳しく(ハード抜き書き)
http://aws.amazon.com/jp/ec2/instance-types/instance-details/

cpuminer2014/01/07 12:20

cpuminer を試してみました。こっちの方は簡単に出来ました。

手順1:
sudo yum install gcc make curl-devel
wget http://sourceforge.net/projects/cpuminer/files/pooler-cpuminer-2.3.2.tar.gz
tar xzf pooler-cpuminer-2.3.2.tar.gz
cd cpuminer-2.3.2/
./configure CFLAGS="-O3"
make

minerd が出来上がる。

手順2:
sudo yum install gcc make curl-devel
wget http://sourceforge.net/projects/cpuminer/files/pooler-cpuminer-2.3.2-linux-x86_64.tar.gz
tar xzf pooler-cpuminer-2.3.2-linux-x86_64.tar.gz

minerd が出て来る。

実行:
./minerd -a scrypt -o stratum+tcp://ltc.2chpool.com:3333 -u user_id.worker_id -p worker_password

ログ:
[2014-01-07 02:44:33] Binding thread 5 to cpu 5
[2014-01-07 02:44:33] Binding thread 3 to cpu 3
[2014-01-07 02:44:33] Starting Stratum on stratum+tcp://ltc.2chpool.com:3333
[2014-01-07 02:44:33] Binding thread 0 to cpu 0
[2014-01-07 02:44:33] Binding thread 1 to cpu 1
[2014-01-07 02:44:33] Binding thread 2 to cpu 2
[2014-01-07 02:44:33] Binding thread 7 to cpu 7
[2014-01-07 02:44:33] Binding thread 6 to cpu 6
[2014-01-07 02:44:33] Binding thread 4 to cpu 4
[2014-01-07 02:44:33] 8 miner threads started, using 'scrypt' algorithm.
[2014-01-07 02:44:34] Stratum detected new block
[2014-01-07 02:44:35] thread 2: 4104 hashes, 5.06 khash/s
[2014-01-07 02:44:35] thread 0: 4104 hashes, 5.06 khash/s
[2014-01-07 02:44:35] thread 1: 4104 hashes, 5.05 khash/s
[2014-01-07 02:44:35] thread 3: 4104 hashes, 5.04 khash/s
[2014-01-07 02:44:35] thread 6: 4104 hashes, 4.99 khash/s
[2014-01-07 02:44:35] thread 5: 4104 hashes, 4.97 khash/s
[2014-01-07 02:44:35] thread 7: 4104 hashes, 4.98 khash/s
[2014-01-07 02:44:35] thread 4: 4104 hashes, 4.97 khash/s
[2014-01-07 02:45:14] thread 5: 179928 hashes, 4.64 khash/s
[2014-01-07 02:45:14] accepted: 1/1 (100.00%), 39.79 khash/s (yay!!!)
[2014-01-07 02:45:39] thread 3: 302520 hashes, 4.76 khash/s
[2014-01-07 02:45:39] thread 2: 303780 hashes, 4.78 khash/s
[2014-01-07 02:45:39] thread 0: 303576 hashes, 4.77 khash/s
[2014-01-07 02:45:39] thread 1: 302904 hashes, 4.75 khash/s
[2014-01-07 02:45:39] thread 4: 298200 hashes, 4.66 khash/s
[2014-01-07 02:45:39] thread 6: 299652 hashes, 4.66 khash/s
[2014-01-07 02:45:39] thread 7: 298548 hashes, 4.63 khash/s
[2014-01-07 02:46:12] thread 7: 147888 hashes, 4.52 khash/s
[2014-01-07 02:46:12] accepted: 2/2 (100.00%), 37.55 khash/s (yay!!!)

参考サイト:
http://2chpool.com/soft.html#cpuminer
https://bitcointalk.org/index.php?topic=55038.0
http://sourceforge.net/projects/cpuminer/files/

Litecoin mining2014/01/06 22:28

Litecoinの採掘に成功しました。レートは約230kHash/sです、高いのか低いのか判断がつきません。一位の人は約1900kHash/sです。どのようなマシンを使っているのでしょうね。ちなみに2chpoolを使ってます。

参考:
http://2chpool.com/
http://2chpool.com/account.html
http://2chpool.com/soft.html
GPU性能比較
https://litecoin.info/Mining_hardware_comparison

コマンド:
cudaminer -o stratum+tcp://ltc.2chpool.com:3333 -u user_id.worker_id -p worker_password

ログ:
*** CudaMiner for nVidia GPUs by Christian Buchner ***
This is version 2013-12-18 (beta)
based on pooler-cpuminer 2.3.2 (c) 2010 Jeff Garzik, 2012 pooler
Cuda additions Copyright 2013 Christian Buchner
My donation address: LKS1WDKGED647msBQfLBHV3Ls8sveGncnm

[2014-01-06 12:13:41] 1 miner threads started, using 'scrypt' algorithm.
[2014-01-06 12:13:41] Starting Stratum on stratum+tcp://ltc.2chpool.com:3333
[2014-01-06 12:13:44] Stratum detected new block
[2014-01-06 12:13:45] GPU #0: GRID K520 with compute capability 3.0
[2014-01-06 12:13:45] GPU #0: interactive: 0, tex-cache: 0 , single-alloc: 0
[2014-01-06 12:13:45] GPU #0: Performing auto-tuning (Patience...)
[2014-01-06 12:13:45] GPU #0: maximum warps: 977
[2014-01-06 12:14:38] Stratum detected new block
[2014-01-06 12:17:19] Stratum detected new block
[2014-01-06 12:17:58] Stratum detected new block
[2014-01-06 12:20:08] Stratum detected new block
[2014-01-06 12:20:14] GPU #0: 233.72 khash/s with configuration K24x32
[2014-01-06 12:20:14] GPU #0: using launch configuration K24x32
[2014-01-06 12:20:14] GPU #0: GRID K520, 0.06 khash/s
[2014-01-06 12:20:14] GPU #0: GRID K520, 112.86 khash/s
[2014-01-06 12:20:33] GPU #0: GRID K520, 224.30 khash/s
[2014-01-06 12:20:33] accepted: 1/1 (100.00%), 224.30 khash/s (yay!!!)
[2014-01-06 12:20:49] GPU #0: GRID K520, 224.09 khash/s
[2014-01-06 12:20:49] accepted: 2/2 (100.00%), 224.09 khash/s (yay!!!)
[2014-01-06 12:20:58] Stratum detected new block
[2014-01-06 12:20:59] GPU #0: GRID K520, 223.20 khash/s
[2014-01-06 12:21:07] GPU #0: GRID K520, 222.80 khash/s
[2014-01-06 12:21:07] accepted: 3/3 (100.00%), 222.80 khash/s (yay!!!)
[2014-01-06 12:21:38] GPU #0: GRID K520, 224.82 khash/s
[2014-01-06 12:21:38] accepted: 4/4 (100.00%), 224.82 khash/s (yay!!!)

Litecoin2014/01/05 20:04

Bitcoinが良いのですがなかなか採掘出来ないと言うので、Litecoinの環境を整えようとしております。
「Amazon Linux AMI with NVIDIA GRID GPU Driver」はデフォルトでNVIDIAとcudaの環境が整っている様なので、この設定は抜かして良さそうです。
以下の様にしたらコンパイル出来ました。cudaは5.0でなく最新版の5.5で大丈夫の様です。

sudo su -
yum update
yum install wget git kernel-devel gcc make curl-devel gcc-c++
yum install automake
git clone https://github.com/cbuchner1/CudaMiner
cd CudaMiner
export LD_LIBRARY_PATH="/opt/nvidia/cuda/lib64:/opt/nvidia/cuda/lib"
./autogen.sh
./configure
make
ll cudaminer
-rwxr-xr-x 1 root root 2683541 Jan 5 09:58 cudaminer

参考サイト
https://litecointalk.org/index.php?topic=3231.0
http://www.kevintaber.com/2013/12/05/compile-cudaminer-centos-6-5-minimal/
https://github.com/cbuchner1/CudaMiner/issues/60

Unix ドライバ (NVIDIA)
http://www.nvidia.co.jp/object/unix-jp.html
CUDA Downloads (NVIDIA)
https://developer.nvidia.com/cuda-downloads

実行結果の例:
以下の様になっておりますが、詳細不明

[root@ip-10-0-0-210 CudaMiner]# ./cudaminer -d 0 -i 0 --benchmark
*** CudaMiner for nVidia GPUs by Christian Buchner ***
This is version 2013-12-18 (beta)
based on pooler-cpuminer 2.3.2 (c) 2010 Jeff Garzik, 2012 pooler
Cuda additions Copyright 2013 Christian Buchner
My donation address: LKS1WDKGED647msBQfLBHV3Ls8sveGncnm

[2014-01-05 11:27:48] 1 miner threads started, using 'scrypt' algorithm.
[2014-01-05 11:27:59] GPU #0: GRID K520 with compute capability 3.0
[2014-01-05 11:27:59] GPU #0: interactive: 0, tex-cache: 0 , single-alloc: 0
[2014-01-05 11:27:59] GPU #0: Performing auto-tuning (Patience...)
[2014-01-05 11:27:59] GPU #0: maximum warps: 977

g2.2xlarge2014/01/03 23:25

cg1.4xlargeは$2.1/Hと高いので、g2.2xlargeを試そうとしております。ちなみに$0.65/H。USでしか今は使えない様ですね。

【AWS発表】 3Dストリーミングアプリケーション構築に最適なEC2 G2インスタンスタイプを追加
http://aws.typepad.com/aws_japan/2013/11/build-3d-streaming-applications-with-ec2s-new-g2-instance-type.html

Amazon Linux AMI with NVIDIA GRID GPU Driver
https://aws.amazon.com/marketplace/pp/B00FYCDDTE

Amazon Linux AMI 2013.09 Release Notes
http://aws.amazon.com/jp/amazon-linux-ami/2013.09-release-notes/

Amazon Linux AMI
http://aws.amazon.com/jp/amazon-linux-ami/

root ではなく ec2-user でログイン
http://memo-off.blogspot.jp/2010/10/amazon-linux-ami.html

Bitcoin2014/01/01 16:38

BitcoinがAWSのGPGPUで採掘出来るか確かめています。採掘プログラムはpythonを利用しているようだが他のプログラムは無いのか?

Bitcoinの説明
http://www.bitcoin.co.jp/index.html

口座開設
https://blockchain.info/ja/wallet/

取引(Mt. Gox)
https://www.mtgox.com/

採掘開始手順
https://bitcointalk.org/index.php?topic=2636

プログラム入手先
http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.8.6/
https://pypi.python.org/pypi/python-jsonrpc
https://github.com/CFSworks/poclbm-mmp/tree/master
Google
WWW このブログ内