最新消息:

VMware Workstation之共享虚拟机

工具 admin 6010浏览 0评论

ps:如果share虚拟机的vmware是装在windows上的,那么按照下面的步骤操作即可轻松完成分享,如果是安装在linux上的,则可能涉及到端口问题。我在ubuntu上安装的vmware workstation进行设置共享时,就遇到了端口问题,原因是iptable设置阻止了端口的开放。要开放需要使用的端口的过程如下:

(1)使用命令gedit  /etc/sysconfig/iptables 编辑iptable配置文件,增加:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j Accept
-A INPUT -m state --state NEW -m tcp -p tcp --dport 902 -j Accept

20140827111047

(2)使用命令service iptables restart来重启iptables。

重启之后,客户端就可以连接vmware分享的虚拟机了。

——————————————————————————————————–

自从VMware Workstation 8 Beta版开始vmware就支持共享虚拟机。

在本文中,将介绍“共享虚拟机”功能。

实际上,所谓“共享虚拟机”功能,在VMware系列产品中,与VMwareServer产品中、使用VMware Server控制台“连接到另一台VMware Server”的功能类似,简单来说,该功能实现如下的功能:

网络中有多台VMware Workstation 8,在其中启用“共享虚拟机”功能后(假设这台主机为A),其他安装VMware Workstation
8的主机(假设主机为B),可以使用“连接到服务器”功能,连接到“提供共享”功能的VMware
Workstation,并使用A主机上的虚拟机并在A主机运行,只是显示界面、操作在B主机上控制。

该功能与VMware Workstation的“远程显示”(在新的VMware Workstation 8中中称为VNC Connections)的区别是:

(1)共享虚拟机功能,需要使用VMwareWorkstation 8。

(2)使用“远程显示”功能,需要在客户端计算机,安装VNCView客户端程序。

(3)使用共享虚拟机功能,远程主机可以自主修改提供共享的虚拟机的配置、启动并关闭共享虚拟机。而“远程显示”功能,只能连接已经启动的虚拟机,不能连接已经关闭的虚拟机。

1
创建虚拟机并提供共享

在提供共享的VMware
Workstation 8中,进行如下的操作:

(1)在“Preferences”属性页中,在“Shared
VMs”选项中,修改要保存共享虚拟机的位置,如图1所示。

 

图1
修改共享虚拟机的位置

所有要共享的虚拟机,都会被移动到这个位置。

(2)创建一个虚拟机,硬件格式选择“Workstation
8.0”格式,如图2所示。

 

图2
虚拟机硬件格式

(3)创建好虚拟机之后,安装操作系统、安装VMware
Tools。本例中安装Windows XP。安装好操作系统、常用软件与VMware Tools之后,关闭虚拟机。

(4)右击要共享的虚拟机,在弹出的快捷菜单中选择“Manage→Share”,如图3所示。

 

图3
共享虚拟机

(5)在“Select
Transfer Type”对话框中,设置共享的虚拟机的名称,以及传送虚拟机到共享目录的方法。如果是一个新创建的虚拟机,则可以选择“Move the
virtual
machine”(移动虚拟机到指定位置),如果虚拟机是一个“链接克隆”的虚拟机,则只能以“全克隆”的方式复制虚拟机到指定的位置,如图4所示。

 

图4
指定虚拟机的共享方式与名称

(6)创建完成后,进行下面的操作。

2
在远程计算机连接到提供共享的VMware Workstation

在网络中的另外一台计算机上,安装VMware
Workstation 8,并进行如下的操作(我们在虚拟机中做这个测试):

(1)在“File”菜单选择“Connect
to Server”,如图5所示。

 

图5
连接到服务器

(2)输入要连接到VMware
Workstation 8的IP地址、用户名及密码(在Windows XP及其以后的操作系统中,默认的策略是必须有密码,才能访问网络资源),如图6所示。

 

图6
指定要连接的VMware Workstation 8的IP地址、用户名及密码

(3)在弹出的警告对话框中,单击“Connect
Anyway”,也可以单击“View Certificate”按钮,查看并安装证书,如图7所示。

 

图7
查看并信任根证书颁发机构

这样,以后再连接到该服务器时,将不会再出现警告提示。

(4)之后,就可以连接到提供共享虚拟机服务的VMware
Workstation,并在“192.168.80.1”中看到共享的虚拟机,此时可以启动并操作远程的虚拟机,就像本地的虚拟机一样。如图8所示。

 

图8
使用共享的虚拟机

(5)使用这一功能,你也可以创建共享的虚拟机到主机A,并且可以操作创建的共享的虚拟机,如图9所示。

 

图9
在远程主机A创建Windows 8虚拟机并进入BIOS操作

【说明】VMware
Workstation
8在提供共享虚拟机服务时,默认需要TCP的80、443、902端口,如果你提供共享服务的主机有防火墙,请在防火墙中开启这些端口,如图10所示。

 

图10
修改防火墙的入站规则

转自:http://wangchunhai.blog.51cto.com/225186/638829/

—————————————————————————————————————————–

How to share VMware Workstation VMs (ESX Virtualization)

VMware Workstation 10 allows sharing VMs on a network. It’s possible to allow (or not) users to access this shared VM or give them different set of privileges too. Useful if you deal with users which are for example students or and you don’t want them to break/delete the VM. Users of VMware Workstation might not be aware of all the possibilities that this piece of software offers. It might be cool to know  How to share VMware Workstation VMs  in your organization, for your colleagues, students etc… Sharing VMs allows those shared VM to be accessed by up to 100 users simultaneously from network location.

It’s not only the sharing which is cool, but you can also configure restrictions that can apply. You can create local users or allow domain users to access VMware Workstation VMs. The restriction is done via roles . A role is set of privileges (restrictions) that apply for shared VMs. For example you might want to have role where the owners can only interact with VMs, but not change configurations or create snapshots.

VMware Workstation 10  has evolved over time and only features that are really useful stayed over time. I’ve wrote many times about Workstation software in the past and gave you the details of many useful features that the software can offer for training, developing or managing VMs locally or remotely (on the ESX/ESXi hosts).

How to share Workstation VM?

01. Select your VM in the Workstation UI > right click > Manage > Share .

How to Share VM in VMware Workstation

02. If your VM has snapshot or you enabled template mode, you’ll get screenshot like this, where it basically says that you can not move the VM to the shared location on your management PC, but you have to do a full clone . This is not bad either as when you don’t want to alter your original VM too.

If your VM is not configured as template VM, you do have the choice.

How to Share VM through VMware Workstation

03. The shared location can be changed only if no shared VMs are configured. You can do it through menu Edit > Preferences > Shared VMs. You might want to do it if you have several hard disks in your system and want to dedicate an SSD drive for your shared VMs for example

How to share a VM in Workstation 10

04. Once your VM finishes the copy (or move), you can use one of the pre-defined roles, or clone one of those original roles to a new role which you can further configure to fit your needs.  I’ll show you that.

Click Shared VMs > Roles

Shared VM - VMware Workstation

Now, there can be two use cases depending if your PC is part of a domain or not. If not (most likely) than you have to create a special local user account on your PC before you can assign that user some privileges to the VM. In my case I simply created user student with some password. You can click to enlarge.

How to share Workstation VM roles

Click Ok to validate.

05.  Click the shared VMs > Permissions > to configure permissions.

How to share Workstation 10 VM

It opens a window where you can pick up users or groups.

Click Add > Click the drop-down box to select domain (or not), and pick the user. In my case you can see that my PC is not member of a domain so all the users and groups you see are local only . In case you’re member of a domain you can pick domain members to access the shared VMs.

Sharing VM with VMware Workstation

So you’ll end up with screen like this where the Student user will have access to shard VMs with restricted access role which we just cloned/created.

How to share VMs in VMware Workstation 10

To access those shared VMs you can use Workstation, Player, Fusion… or Player Plus.  The Player plus is new offering from VMware. I found this FAQ about player plus…

What is the difference between VMware Player Plus and VMware Player?

The licensed version of VMware Player is called VMware Player Plus. VMware Player Plus and VMware Player are the same download, but entering a license key entitles the users to additional benefits:

  • VMware Player Plus is designed to be used commercially . It is licensed for use by employees, training organizations, contractors and can be transferred to partners or potential customers.
  • VMware Player Plus supports restricted virtual Machines created by VMware Fusion Professional or VMware Workstation. VMware Player Plus better supports mass deployments to thousands of users including installation options and custom configuration settings to run unattended installs using system configuration software and hide unwanted features.
  • Per-incident support offerings are available to VMware Player Plus customers.

You can also install  VMware WSX  on the PC which runs the shared VMs and the users can use their browser to access the VMs remotely without installing any software …

Check VMware products and trials:

VMware Workstation 10  and  Upgrades  – Best Desktop Virtualization Software
VMware Fusion 6  – Run Windows on MAC
VMware Fusion 6 Professional  – Restricted VMs, Virtualized VT-X/EPT…

VMware Upgrades  – vSphere, Workstation, Fusion, ESXi, & vCenter Server…

Save Big on VMware Workstation 10 & Fusion 6  – VMware Academic Store

转载请注明:jinglingshu的博客 » VMware Workstation之共享虚拟机

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址