virtualbox设置虚拟机是无法选用host-only的连接方式

Kvm、VMware、Virtualbox、Xen、Qemu 等
回复
Jonlinver
帖子: 5
注册时间: 2014-09-21 16:02
系统: ubuntu 14.04

virtualbox设置虚拟机是无法选用host-only的连接方式

#1

帖子 Jonlinver » 2014-09-25 0:29

vbox无法使用host-only连接方式.png
如图,发现无效设置(未指定要仅主机(Host-Only)的网络界面),但是界面名称那一项没有选项啊。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: virtualbox设置虚拟机是无法选用host-only的连接方式

#2

帖子 poloshiao » 2014-09-25 10:18

下載 virtualbox 使用說明書
6.7 Host-only networking
Instead, when host-only networking is used, VirtualBox creates a new software interface on the host ...
头像
photor
论坛版主
帖子: 11004
注册时间: 2008-04-26 12:41

Re: virtualbox设置虚拟机是无法选用host-only的连接方式

#3

帖子 photor » 2014-09-25 14:09

poloshiao 写了:下載 virtualbox 使用說明書
6.7 Host-only networking
Instead, when host-only networking is used, VirtualBox creates a new software interface on the host ...
意思是必须以root身份运行,否则没有权限?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: virtualbox设置虚拟机是无法选用host-only的连接方式

#4

帖子 poloshiao » 2014-09-25 14:24

意思是必须以root身份运行,否则没有权限?
本來想讓原貼文者 自己看 使用說明書
既然您有興趣
把它整段 複製貼在下面

6.7 Host-only networking

Host-only networking is another networking mode that was added with version 2.2 of VirtualBox.
It can be thought of as a hybrid between the bridged and internal networking modes: as with bridged networking, the virtual machines can talk to each other and the host as if they were connected through a physical Ethernet switch. Similarly, as with internal networking however, a physical networking interface need not be present, and the virtual machines cannot talk to the world outside the host since they are not connected to a physical networking interface.

Instead, when host-only networking is used, VirtualBox creates a new software interface on the host which then appears next to your existing network interfaces. In other words, whereas with bridged networking an existing physical interface is used to attach virtual machines to, with host-only networking a new “loopback” interface is created on the host. And whereas with internal networking, the traffic between the virtual machines cannot be seen, the traffic on the “loopback” interface on the host can be intercepted.

Host-only networking is particularly useful for preconfigured virtual appliances, where multiple virtual machines are shipped together and designed to cooperate. For example, one virtual machine may contain a web server and a second one a database, and since they are intended
to talk to each other, the appliance can instruct VirtualBox to set up a host-only network for the two. A second (bridged) network would then connect the web server to the outside world to serve data to, but the outside world cannot connect to the database.

To change a virtual machine’s virtual network interface to “host only” mode:

either go to the “Network” page in the virtual machine’s settings notebook in the graphical user interface and select “Host-only networking”, or

on the command line, type VBoxManage modifyvm "VM name" --nic<x> hostonly; see chapter 8.8, VBoxManage modifyvm, page 125 for details.

For host-only networking, like with internal networking, you may find the DHCP server useful that is built into VirtualBox. This can be enabled to then manage the IP addresses in the host-only network since otherwise you would need to configure all IP addresses statically.

In the VirtualBox graphical user interface, you can configure all these items in the global settings via “File” -> “Settings” -> “Network”, which lists all host-only networks which are presently in use. Click on the network name and then on the “Edit” button to the right, and
you can modify the adapter and DHCP settings.

Alternatively, you can use VBoxManage dhcpserver on the command line; please see chapter 8.35, VBoxManage dhcpserver, page 156 for details.

Note: On Linux and Mac OS X hosts the number of host-only interfaces is limited to 128. There is no such limit for Solaris and Windows hosts.

意思是 只要設定 Host-only networking 即可
头像
iridiumcao
帖子: 245
注册时间: 2007-01-18 18:05
来自: Shanghai
联系:

Re: virtualbox设置虚拟机是无法选用host-only的连接方式

#5

帖子 iridiumcao » 2014-12-12 13:29

你需要创建一块用于 Host-Only 的虚拟网卡:

VirtualBox 菜单「管理」-「全局设定」-「网络」,为该模式增加一块网卡即可。
增加 Host-Only 网卡的方法
增加 Host-Only 网卡的方法
截图是我在 Win7 下取到的,Ubuntu 中,请注意「管理」菜单的位置。

PS:
当 Host OS 为 Mac or Ubuntu,使用 Host-Only 网络时都可能遇到这个问题。
Dell Inspiron 1501
Xubuntu&Lubuntu 11.10

Ade, Gnome3, Ade, Unity!

随心所欲不逾矩
回复