求助,virt-manager的两个虚拟机之间ping不通

Kvm、VMware、Virtualbox、Xen、Qemu 等
回复
头像
bzimage
帖子: 716
注册时间: 2006-03-14 10:25

求助,virt-manager的两个虚拟机之间ping不通

#1

帖子 bzimage » 2014-07-09 1:52

求助,用virt-manager创建了两个虚拟机,工作一切正常,访问外网也正常,但就是两个虚拟机之间ping不通。使用的NAT模式,如图
附件
2.png
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 求助,virt-manager的两个虚拟机之间ping不通

#2

帖子 poloshiao » 2014-07-09 7:41

使用的NAT模式
https://help.ubuntu.com/community/KVM/Networking

The default virtual network configuration is known as Usermode Networking. Traffic is NATed through the host interface to the outside network.
一般 使用 Nat 方便上外網 但是 要讓 其它電腦看到 Guest 不容易

Alternately, you can configure Bridged Networking to enable external hosts to directly access services on the guest operating system.
如果你希望 其它電腦 存取你的 Guest 試試 Bridged Networking

詳細細節 參閱
https://help.ubuntu.com/community/KVM/Networking

補充
https://help.ubuntu.com/community/KVM
Ubuntu uses KVM as the back-end virtualization technology primarily for non-graphic servers and libvirt as its toolkit/API. Libvirt front ends for managing VMs include virt-manager (GUI) or virsh (CLI). Alternative management options include convirt (GUI) or convirt2 (WWW).
意思是 virt-manager 是 前端工具 KVM 是後端服務
头像
bzimage
帖子: 716
注册时间: 2006-03-14 10:25

Re: 求助,virt-manager的两个虚拟机之间ping不通

#3

帖子 bzimage » 2014-07-09 20:37

你好,我看的是这篇,
http://wiki.libvirt.org/page/VirtualNet ... lated_mode

我主要需要两个虚拟机相互能访问,不需要能访问外网,按照上面的说法
In this mode, guests connected to the virtual switch can communicate with each other

我按照下面的链接做,但是两个虚拟机之间还是ping不通
http://wiki.libvirt.org/page/TaskIsolat ... irtManager

是不是这个文档的说法不准确呢
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 求助,virt-manager的两个虚拟机之间ping不通

#4

帖子 poloshiao » 2014-07-09 20:54

使用的NAT模式
Other virtual network switch routing types
Virtual network switches can operate in two other modes, instead of NAT:
Virtual network switches 不是使用 NAT 而是在兩種模式下運作
Routed mode
Isolated mode
In this mode, guests connected to the virtual switch can communicate with each other

所以 你要選的是 Isolated mode 就不是 NAT
两个虚拟机之间还是ping不通
分別到 兩個虛擬機 及 host
sudo ifconfig -a
sudo route -nv
把結果複製 貼上來
头像
bzimage
帖子: 716
注册时间: 2006-03-14 10:25

Re: 求助,virt-manager的两个虚拟机之间ping不通

#5

帖子 bzimage » 2014-07-10 13:23

你好,附件是两个guest和host的打印信息,请帮忙看看,现在是isolated mode
附件
guest-win8.txt
(3.42 KiB) 已下载 95 次
guest-winxp.txt
(2.11 KiB) 已下载 115 次
host-ubuntu1404.txt
(3.21 KiB) 已下载 101 次
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 求助,virt-manager的两个虚拟机之间ping不通

#6

帖子 poloshiao » 2014-07-10 16:59

回复