Bài này dạy cài VMware Tools trong VM để tăng performance guest OS và dùng advanced features VMware products.
Thật không may, thủ tục seemingly trivial không simple như nghe và gây đau khổ nhiều user. Nhận email troubled readers, quyết định viết tutorial.
Áp dụng VMware Server và Workstation. Host choice không important. Demo cài VMware Tools cho Linux và Windows guest.
Bài sau nói VirtualBox và Guest Addons. Đọc toàn bộ Virtualization section để info hơn. Let's rock.
Cài VMware Tools cho Windows Guest
Đã cài đặt thành công VMware Server/Workstation. Đã cài thành công Windows guest. Bây giờ enhance. Rất đơn giản. VMware Console main menu: VM > Install VMware Tools.
Popup installation wizard trong guest. Giống mọi Windows install. Click Install, follow menu, done. Reboot sau cài.
Sau reboot, check system tray. Nên có VMware icon -> VMware Tools running. Bob's your uncle.
Cài VMware Tools cho Linux Guest
Guide dưới lấy từ bài "Installing Linux Mint - Full tutorial". Procedure documented chi tiết pages 3-4. Cover không chỉ cài tools, còn giải thích cần gì TRƯỚC khi cài Tools (compilation involved, entirely automatic) và sau cài: add VMware Tools vào startup session để chạy khi login. Note: dù demo Linux Mint, valid cho all distros.
Cài VMware Tools
VMware Server File Menu: VM > Install VMware Tools, OK warning. Mount virtual CD-ROM chứa VMware Tools binaries.
Virtual CD-ROM chứa 2 file: .rpm (RedHat Package Manager, suitable RedHat-based distros) và .tar.gz. Linux Mint Debian-based -> .rpm không suitable (instantly). Dù suitable, vẫn muốn dùng archive (.tar.gz).
Extract trước. Command line (demo trong Highly useful Linux commands article) nhưng dùng GUI.
Right-click file > Extract-To...
Chọn destination.
Sau extract, cài Tools thực tế. Phải dùng command line. Mở Terminal (Menu > System).
Command line: navigate đến directory chứa VMware Tools files. Local execute installation script (wizard):
sudo ./vmware-install.pl
Xem ảnh dưới; notice geeky fortune.
Script simple, friendly. Hỏi câu hỏi, default answers selected. Chỉ Enter vài lần - nhưng đọc kỹ mỗi bước.
Sau vài bước, hit snag. Đừng lo, dẫn dắt délibérément. Purpose: show ngay cả khi install supposedly fails, workaround simple/fast.
Lý do error: default Linux Mint install, như hầu hết distros, không có packages cần thiết compile sources. Sẽ install missing packages, repeat VMware Tools install.
Đọc kỹ: installer báo missing packages - gcc, binutils, make, kernel sources - và where to find: installation CD. Có nghĩa: ngay cả không có Internet, vẫn lấy được.
Extremely important: real life, missing modules có thể là network adapters. May mắn sources trên CD hardware. Nhưng compile fail cùng lý do VMware Tools fail. Không Internet -> không tìm sources Synaptic. Nếu không trên CD -> stuck.
Missing tools tìm/cài bằng command line hoặc GUI. Show both ways.
Cài Packages Cần Thiết Cho Compilation
Launch Synaptic (System > Package Manager).
Search missing packages, mark for installation. Right-click > Mark for installation.
Sau cài packages thành công, restart VMware Tools install. Lần này no error, should work.
Restart X session (Ctrl+Alt+Backspace) và network service (sudo /etc/init.d/networking restart) cho changes take effect. Hoặc reboot nếu uncomfortable.
Quan trọng: VMware Tools cho phép đổi resolution. Đây là mục tiêu. Sau restart, enjoy normal-sized desktop. Đừng quan tâm missing bottom panel, screenshot khi desktop loading.
Cũng có thể cài missing packages (gcc, binutils, make, kernel sources) 1 command Terminal:
sudo apt-get install build-essential
Xem ảnh dưới: command line thường simpler/faster - không nên sợ!
Setup VMware Tools Khởi Động Cùng Session
Cuối cùng, setup VMware Toolbox. Toolbox cho sync time, clipboard, mouse movement host-guest. Không run mặc định. Manual invoke: Terminal: vmware-toolbox. Hoặc add auto-start session. Menu > Preferences > Sessions.
Startup Programs tab: programs listed/enabled cho all sessions. Cần này. Click Add tạo mới.
Name (VD: VMware Toolbox), Command (path to command), optional Comment. Path VMware Toolbox: /usr/bin/vmware-toolbox (trừ khi specified khác khi cài). Unsure? Tìm vmware-toolbox binary:
- Terminal gõ vmware, Tab x2 -> suggest commands vmware* trong PATH.
- which vmware-toolbox -> xem installed where.
- find/locate: cd /; find . -name vmware-toolbox. locate: sudo updatedb; locate vmware-toolbox.
Nhập path binary vmware-toolbox.
Restart máy hoặc manual run Toolbox -> VMware Tools Properties window hiện lên, setup options. Enjoy extras: keep VMware Toolbox running (minimized). Scripts và Shrink cần root permissions.
Kết Luận
Cài VMware Tools trivial trên Windows. Linux: quite a bit of work. Nhưng familiar steps -> ~5 phút.
Linux-wise: tutorial cũng dạy art fiddling archives, command-line scripts, install build-essential, compile, config startup sessions. Valuable lessons everyday computing.
Hy vọng enjoy tutorial.
Cheers.