「VMware Workstation 」- 虚拟机,配置,管理

创建虚拟机(增)

迁移 VirtualBox 虚拟机

Importing Virtual Machine from Oracle VirtualBox to …
Import an Open Virtualization Format Virtual Machine

VirtualBox 7.0, VMware Workstation 16.2

第一步、导出虚拟机(VirtualBox)
1)Power off the virtual machine in VirtualBox.
2)Click File > Export Appliance.
3)Select one or more VMs to export, and click Next.
4)Select a Format(我们选择 1.0 格式)& provide a location to store the .ova file.
5)Follow the onscreen instructions to make the necessary changes.
6)Click Export to begin the export process.

第二步、导入虚拟机(VMware Workstation)
1)In Workstation Pro, select File > Open.
2)Browse to the .ovf or .ova file and click Open.
3)Type a name for the virtual machine, type or browse to the directory for the virtual machine files, and click Import.
4)然后,VMware Workstation 将完成导入工作;

鉴于 VMware Workstation 针对 OVF 严格检查,导入过程可能失败,点击 Retry 忽略;

修改虚拟机(改)

剪贴板共享

1)安装 VMware Tools 组件;
2)<VM> / Settings / Options / Guest Isolation / Enable ….
3)经过配置与测试,我们用到的「Host 到 Guest 复制粘贴」功能能够正常工作;

Q:在 Linux Guest 中,剪贴板共享无法正常工作(02/19/2023);
A:我们检查 open-vm-tools-desktop 包,发现 /etc/xdg/autostart/vmware-user.desktop 文件,所以我们猜测「该自启动程序将在用户开机时运行,以实现启用剪贴板复制的功能」,其将运行 /usr/bin/vmware-user-suid-wrapper 命令。所以,我们以当前用户重新运行 vmware-user-suid-wrapper 命令,问题得以解决;

安装 VMware Tools 扩展

for Linux

Manually Installing VMware Tools on a Linux Virtual Machine
open-vm-tools/README.md at master · vmware/open-vm-tools · GitHub
How to Install VMware Tools on Ubuntu/Debian VMware Virtual Machine

Q:我们的 Guest VM: Ubuntu 20.04 未显示 Install VMware Tools 按钮?
A:适用于 Linux 虚拟机的 VMware Tar Tool 在版本 10.3.10 中功能冻结,因此 Workstation Pro 中包含的 tar 工具 (linux.iso) 为 10.3.10,不会更新。鉴于此更改,部分 Linux VM 的 Install/Update/Reinstall VMware Tools 菜单按钮被禁用;

根据官方文档建议,安装 Open VM Tools 模块:

# https://github.com/vmware/open-vm-tools/blob/master/README.md
apt-get install -y open-vm-tools open-vm-tools-desktop

存储(Storage)

访问主机目录

How do I mount shared folders in Ubuntu using VMware tools? – Ask Ubuntu
How to configure VMware Tools Shared Folders Linux mounts (60262)

1)在 Host 中,进入 <Your VM> / Settings / Options / Shared Folders 配置,添加要被共享的主机目录;

2)在 Guest 中,安装 VMware Tools 扩展;

3)在 Guest 中,通过如下命令进行挂载:

// 查看共享目录 

# vmware-hgfsclient
my-shared-folder

// 挂载共享目录

# vmhgfs-fuse .host:/my-shared-folder /mnt/hgfs/ -o allow_other -o uid=1000

// 开机自动挂载

# vim /etc/fstab
.host:/    /mnt/hgfs/    fuse.vmhgfs-fuse    defaults,allow_other,uid=1000

网络(Network)

WIP