Ubuntu 16.04 LTS のインストール後の設定 + VMware Player 12.1.0 の導入

20181223224237

  • ホームフォルダの日本語表記を英語表記に替える
    • 端末で $ env LANGUAGE=C LC_MESSAGES=C xdg-user-dirs-gtk-update を実行
  • Mozc が使えるようにする
    • 右上のキーボードアイコンをクリック→[入力メソッド]→[Mozc] を選択
  • ランチャーのアイコンのサイズを替える
    • [システム設定]→[外観]→[外観]→下の [Launcherアイコンのサイズ] で変更
  • タイトルバーにメニューを表示する
    • [システム設定]→[外観]→[挙動]→[ウィンドウのタイトルバーの中] にチェックを入れる
  • Nemo をインストール
  • Synaptic をインストール
    • なぜか「Ubuntuソフトウェア」にないので、$ sudo apt-get install synaptic でインストール
  • Google Chrome をインストール
  • Geany をインストール
    • これもなぜか「Ubuntuソフトウェア」にないので、$ sudo apt-get install geany libvte9 でインストール

 

VMware-Player を入れてみる

VMware-Player 12.1.0 で挑戦。

$ chmod 755 VMware-Player-12.1.0-3272444.x86_64.bundle
$ sudo ./VMware-Player-12.1.0-3272444.x86_64.bundle

インストールは成功。

しかしコンパイルがうまくいかない。

このへんを参考にする。
VMware Knowledge Base
Kernel – 4.4 Released – OK with Latest NVIDIA and VMware.. – Adventures With Linux ™
 
自分のこの記事を参考に、Kernel 4.4 をインストールする。

$ apt-cache search linux-image | grep generic
$ sudo apt install linux-image-4.4.0-116-generic
$ sudo apt install linux-headers-4.4.0-116-generic

しかし無線LAN 接続がうまくいかない。本当は

$ ifconfig
enp0s25   Link encap:イーサネット  ハードウェアアドレス f0:de:f1:02:7c:b7  
          UP BROADCAST MULTICAST  MTU:1500  メトリック:1
          RXパケット:0 エラー:0 損失:0 オーバラン:0 フレーム:0
          TXパケット:0 エラー:0 損失:0 オーバラン:0 キャリア:0
          衝突(Collisions):0 TXキュー長:1000 
          RXバイト:0 (0.0 B)  TXバイト:0 (0.0 B)
          割り込み:20 メモリ:f2600000-f2620000 

lo        Link encap:ローカルループバック  
          inetアドレス:127.0.0.1  マスク:255.0.0.0
          inet6アドレス: ::1/128 範囲:ホスト
          UP LOOPBACK RUNNING  MTU:65536  メトリック:1
          RXパケット:344 エラー:0 損失:0 オーバラン:0 フレーム:0
          TXパケット:344 エラー:0 損失:0 オーバラン:0 キャリア:0
          衝突(Collisions):0 TXキュー長:1000 
          RXバイト:28011 (28.0 KB)  TXバイト:28011 (28.0 KB)

wlp3s0    Link encap:イーサネット  ハードウェアアドレス 00:23:15:43:fe:d0  
          inetアドレス:192.168.11.7  ブロードキャスト:192.168.11.255  マスク:255.255.255.0
          inet6アドレス: fe80::384b:a5d2:9fe1:3e9e/64 範囲:リンク
          UP BROADCAST RUNNING MULTICAST  MTU:1500  メトリック:1
          RXパケット:2061 エラー:0 損失:0 オーバラン:0 フレーム:0
          TXパケット:1929 エラー:0 損失:0 オーバラン:0 キャリア:0
          衝突(Collisions):0 TXキュー長:1000 
          RXバイト:963672 (963.6 KB)  TXバイト:463518 (463.5 KB)

となるべきなのだが、wlp3s0 が見つからないのだ。
 
20181224032008
ところが、意外なところに突破口が。Synaptic で入れた 4.4.0-98-lowlatency カーネルで起動してみたところ、無線LAN が繋がったではないか!

さらにもう一度 VMware を起動してみたところ、見事にコンパイルに成功!
20181224031139

しかし Network boot from AMD Am79C970A という表示が出て進まない…。

うまくいった!
20181224101916
Ubuntu 16.04 LTS 上の VMware Player 12.1.0 で Linux Mint 17.2 が走っております。無意味か(笑)。
 

VMware Tools のインストール

これはハマった。とりあえず VMware Tool をダウンロードしたのはよい。で、[Virtual Machine]→[Removable Devices]→[CD/DVD(SATA)]→[Connect to Image File(iso)...] で、[linux.iso] を選択。ここから以下。

$ sudo -i
# mount

をすると /dev/sr0 on /media/tomoki/VMware Tools type iso9660 (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2) というのがあるので、ダウンロードした VMware Tools がマウントされていることがわかる。
作業領域に移動。ダウンロードしたフォルダを見る。

# cd /tmp
# ls "/media/tomoki/VMware Tools"
VMwareTools-10.0.5-3228253.tar.gz  vmware-tools-upgrader-32
manifest.txt                       vmware-tools-upgrader-64
run_upgrader.sh

目的のフォルダを解凍して、Perl スクリプトを実行。

# tar zxpf "/media/tomoki/VMware Tools/VMwareTools-10.0.5-3228253.tar.gz"
# umount /dev/sr0
# ls
mintUpdate  ssh-M4W1bFX5nIWh  vmware-tools-distrib
# cd vmware-tools-distrib
# ls
FILES    bin  doc  installer  vgauth             vmware-install.real.pl
INSTALL  caf  etc  lib        vmware-install.pl
# ./vmware-install.pl

こんな表示が出る。

open-vm-tools are available from the OS vendor and VMware recommends using 
open-vm-tools. See http://kb.vmware.com/kb/2073803 for more information.
Do you still want to proceed with this legacy installer? [no] 

どうもいまはレガシーツールを使わなくてもよいらしいが(参照)、よくわからないので [y] を入力してあとは(よくわからないので笑)ひたすらデフォルトの連打。

Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files? 
[/usr/bin] 

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc] 

What is the directory that contains the init scripts? 
[/etc/init.d] 

In which directory do you want to install the daemon files? 
[/usr/sbin] 

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

The path "/usr/lib/vmware-tools" does not exist currently. This program is 
going to create it, including needed parent directories. Is this what you want?
[yes] 

In which directory do you want to install the common agent library files? 
[/usr/lib] 

In which directory do you want to install the common agent transient files? 
[/var/lib] 

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 

The installation of VMware Tools 10.0.5 build-3228253 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes] 

Initializing...


Making sure services for VMware Tools are stopped.



The module vmci has already been installed on this system by another installer 
or package and will not be modified by this installer.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another 
installer or package and will not be modified by this installer.

The VMware Host-Guest Filesystem allows for shared folders between the host OS 
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 
to enable this feature? [yes] 


Before you can compile modules, you need to have the following installed... 

make
gcc
kernel headers of the running kernel


Searching for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no] 

Searching for a valid kernel header path...
Detected the kernel headers at "/lib/modules/3.16.0-38-generic/build/include".
The path "/lib/modules/3.16.0-38-generic/build/include" appears to be a valid 
path to the 3.16.0-38-generic kernel headers.
Would you like to change it? [no] 

Using kernel build system.
make: ディレクトリ `/tmp/modconfig-NYli9y/vmhgfs-only' に入ります
/usr/bin/make -C /lib/modules/3.16.0-38-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: ディレクトリ `/usr/src/linux-headers-3.16.0-38-generic' に入ります
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/backdoor.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/backdoorGcc64.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/bdhandler.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/cpName.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/cpNameLinux.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/cpNameLite.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/dentry.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/dir.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/file.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/filesystem.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/fsutil.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/hgfsBd.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/hgfsEscape.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/hgfsUtil.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/inode.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/link.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/message.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/module.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/page.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/request.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/rpcout.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/stubs.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/super.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/transport.o
  CC [M]  /tmp/modconfig-NYli9y/vmhgfs-only/kernelStubsLinux.o
  LD [M]  /tmp/modconfig-NYli9y/vmhgfs-only/vmhgfs.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/modconfig-NYli9y/vmhgfs-only/vmhgfs.mod.o
  LD [M]  /tmp/modconfig-NYli9y/vmhgfs-only/vmhgfs.ko
make[1]: ディレクトリ `/usr/src/linux-headers-3.16.0-38-generic' から出ます
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: ディレクトリ `/tmp/modconfig-NYli9y/vmhgfs-only' に入ります
make[1]: `postbuild' は更新済みです
make[1]: ディレクトリ `/tmp/modconfig-NYli9y/vmhgfs-only' から出ます
cp -f vmhgfs.ko ./../vmhgfs.o
make: ディレクトリ `/tmp/modconfig-NYli9y/vmhgfs-only' から出ます

The vmxnet driver is no longer supported on kernels 3.3 and greater. Please 
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

The vmblock enables dragging or copying files between host and guest in a 
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[yes] 

VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?
[no] 

Thinprint provides driver-free printing. Do you wish to enable this feature? 
[yes] 


Disabling timer-based audio scheduling in pulseaudio.

Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed 
if you want to enable Common Agent (caf). [yes] 

Do you want to enable Common Agent (caf)? [yes] 



Detected X server version 1.15.1



Distribution provided drivers for Xorg X server are used.

Skipping X configuration because X drivers are not included.

Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-3.16.0-38-generic
Warning: No support for locale: ja_JP.utf8
Generating the key and certificate files.
Successfully generated the key and certificate files.
vmware-tools start/running
vmware-tools-thinprint start/running
The configuration of VMware Tools 10.0.5 build-3228253 for Linux for this 
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take 
effect.

You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and 
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

なんか終わったらしい。

あとは VM を再起動すると、フルスクリーン時に画面全体が使えるようになっていた。またフォルダの共有を忘れないように。これをしておくと VM とホスト間で簡単にファイル共有ができたりする。

※参考
Linux 仮想マシンへの VMware Tools の手動インストール
Vmware Toolsを手動でインストールする - Qiita
 

VMware Player 12.1.0 で走ったもの、走らなかったもの

ホストは Ubuntu 16.04 LTS、カーネルは 4.4.0-98-lowlatency にて。

  • 走ったもの
    • linuxmint-17.2-cinnamon-64bit.iso
    • bl-Deuterium-i386_20170429.iso
    • Zorin-OS-12.4-Lite-64.iso
  • 走らなかったもの
    • zorin-os-9-lite-32.iso