2016年4月16日土曜日

virsh startを実行すると起動に失敗する。

CUIで仮想マシンを立ち上げようとすると失敗するので備忘録

エラー内容

sudo virsh start FileServer
エラー: ドメイン FileServer の起動に失敗しました
エラー: 内部エラー: モニターに接続中にプロセスが終了しました: 2016-04-16T02:46:03.219947Z qemu-system-x86_64: -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:d7:02:85,bus=pci.0,addr=0x2: failed to find romfile "efi-rtl8139.rom"

どうやらefi-rtl8139.romというのがないらしい。
しかし、efi-rtl8139を検索してみると

sudo find / -name efi-rtl8139.rom
/usr/share/qemu/efi-rtl8139.rom

存在している。

lsコマンドで確認すると原因がわかる。なんとシンボリックリンク先のファイルがない。
ls -l
lrwxrwxrwx.  1 root root     24 11月 12 01:13 efi-rtl8139.rom -> ../ipxe.efi/10ec8139.rom

しょうがないので、他ので代用。
sudo rm efi-rtl8139.rom
sudo ln -s ../ipxe/10ec8139.rom efi-rtl8139.rom

これで無事起動。

2016年3月27日日曜日

Docker公式RedmineコンテナにRedmine Backlogsプラグインをインストールする。

Redmine Backlogsプラグインの公式ページ手順(http://www.redminebacklogs.net/en/installation.html)どおりに進めると失敗する。

失敗する実行コマンドは以下のコマンド
bundle install --without development test

エラーログは以下
Building native extensions.  This could take a while...
ERROR:  Error installing eventmachine:
        ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/eventmachine-1.2.0.1/ext
/usr/local/bin/ruby -r ./siteconf20160327-245-19iokhx.rb extconf.rb
checking for main() in -lcrypto... *** extconf.rb failed ***


手順の最初でいきなりつまずくw

ログを見るとcryptoというライブラリが不足しているらしい。

Docker公式RedmineコンテナはDebian Jessieベースで作成されているので、パッケージのページ(https://packages.debian.org/ja/jessie/libssl-dev)を見てみる。
libcrypto.soはlibssl-devパッケージに含まれており、すでにインストールされている。

makeファイルを作成する /usr/local/bundle/gems/eventmachine-1.2.0.1/ext/extconf.rb を読むとOpenSSLのバージョンは1.0.2eでないといけないらしい。(Debian Jessieは1.0.1kがインストールされている)

これを解決しようと思うとOpenSSLの入れ替えが必要なので、Docker公式Redmineを使用するのは諦めることにする。

2016年3月20日日曜日

Windowsのコマンドプロンプトでボリュームを移動

いつも忘れるので。
Dボリュームに移動。
覚えると意外と簡単。

 OK: D:
NG: cd D:

DBFluteのハンズオンでmysqlの初期化ができない(windows)

Mac用のコマンドは書いてあったけど、Windows用のコマンドは書いてなかったので記述。
http://dbflute.seasar.org/ja/tutorial/handson/section01.html#mysql

Windowsの場合、Macと同様のコマンドで実行できるがroot権限が必要。
root権限がないと以下のエラーが出ます。

>mysqld: Could not create or access the registry key needed for the MySQL application
to log to the Windows EventLog. Run the application with sufficient
privileges once to create the key, add the key manually, or turn off
logging for that application.