10.1インチサーブノートPC購入

ASUS 2in1 T101HAを購入。

www.amazon.co.jp

Amazon限定モデルでメモリ4GB。今だとAmazonのノートPCキャンペーンで10%割引。 本当はeMMC 128GBモデルが良かったのだけれども、1.5~2万円くらい高くなるので、コストパフォーマンス重視でこちらに。 ディスククリーンアップをこまめにすれば64GBでもそれほど問題にならないと思う。

Atlasから配布されているVagrant Boxファイルのログインパスワード

http://stackoverflow.com/questions/41337802/vagrants-ubuntu-16-04-vagrantfile-default-password

~\.vagrant.d\boxes\ubuntu-VAGRANTSLASH-xenial64\20170323.0.0\virtualbox\Vagrantfile

の中に書いてあるconfig.ssh.passwordでコンソールログインしたら、確かにログインできた。

WindowsホストとVagrant上のゲスト間でディレクトリを共有する

  • Vagrantで共有フォルダのマウントに失敗するときの対処方法

http://qiita.com/ozawan/items/9751dcfd9bd4c470cd82

C:\Users\***\Vagrant\ubuntu1604>vagrant plugin install vagrant-vbguest

vagrant upすると、

Building the shared folder support module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)

と表示されて、ゲスト側の/var/log/vboxadd-install.logをみると

ubuntu@ubuntu-xenial:~$ cat /var/log/vboxadd-install.log
(略)
In file included from /tmp/vbox.0/dirops.c:19:0:
/tmp/vbox.0/dirops.c: In function ‘sf_getdent’:
/tmp/vbox.0/dirops.c:129:29: error: ‘struct file’ has no member named ‘f_dentry’
sf_g = GET_GLOB_INFO(dir->f_dentry->d_inode->i_sb);
^
/tmp/vbox.0/vfsmod.h:144:60: note: in definition of macro ‘GET_GLOB_INFO’
# define GET_GLOB_INFO(sb) ((struct sf_glob_info *) (sb)->s_fs_info)
^
/tmp/vbox.0/dirops.c:135:16: error: ‘struct file’ has no member named ‘f_dentry’
inode = dir->f_dentry->d_inode;
^
scripts/Makefile.build:258: recipe for target '/tmp/vbox.0/dirops.o' failed
make[2]: *** [/tmp/vbox.0/dirops.o] Error 1
Makefile:1420: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
/tmp/vbox.0/Makefile.include.footer:79: recipe for target 'vboxsf' failed
make: *** [vboxsf] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

とエラーが出ている。

結論は、

default: Guest Additions Version: 4.3.4
default: VirtualBox Version: 5.1

と、VirtualBoxVirtualBox Guest Additionのバージョンがずれているからであり、
http://download.virtualbox.org/virtualbox/
にある、自分が利用しているVirtualBoxと同じバージョンのVBoxGuestAddition.isoファイルをVagrantfileのフォルダに配置して、VirtualBoxと同じバージョンのVBoxGuestAdditionがインストールされるようにする。

C:\Users\***\Vagrant\ubuntu1604>vagrant vbguest --status
[default] GuestAdditions 5.1.18 running --- OK.

デフォルトで、VagrantfileのあるフォルダがゲストOSの/vagrantにマウントされる。

Windows10 + Vagrant1.9.3 + Ubuntu16.04LTS

少し前に試したことがあるのだが、その時はvagrant upでUbuntu 16.04の起動まではするものの、sshログインができなくて断念していた。

ネットで再チャレンジしたので、少し手間取ったところをメモ。

boxは、
https://atlas.hashicorp.com/ubuntu/boxes/xenial64
を使用。

vagrant upすると、途中のコンソールログに

==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: ubuntu
default: SSH auth method: password

と表示されるが、パスワード認証ではなく、秘密鍵認証になる。

秘密鍵
C:\Users\***\Vagrant\ubuntu1604\.vagrant\machines\default\virtualbox
private_key
ファイル。ユーザー名は、ubuntu

http://obel.hatenablog.jp/entry/20161029/1477706066

が参考になりました。

  • Vagrantfileにforwarded_port設定を入れると、vagrant up時にエラーになる。

C:\Users\***\Vagrant\ubuntu1604>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `initialize': The requested address is not valid in its context. - connect(2) for "0.0.0.0" port 8080 (Errno::EADDRNOTAVAIL)
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `new'

https://github.com/mitchellh/vagrant/issues/8395

Vagrant 1.9.3のバグのようです。

Vagrantfileに
config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1", id: 'http'

とhost_ipをつけて解決。

シムシティ

金曜日の夜から、久しぶりにゲームをしたくなり、とりあえずシムシティ(2013)をやってみた。オンライン版で2013年ぐらいから放置していたもので、Windows 10にしたあとログインすらしていなかったが、アップデート後問題なくできた。

久しぶりにやってみると、結構ハマり、満足。