XenServer虚拟机Promiscuous模式配置

   今天在XenServer中新建了一个FreeBSD的虚拟机,本想用来跑Panabit,但结果因为目前FreeBSD里还不能安装Xentools而不能实现。XenServer官方称目前只支持Windows和Linux。具体的操作步骤如下:

1)启用物理网卡的promiscuous模式
Modify the promiscuous setting for the physical interface (pif)
  1. Grab the PIF UUID by executing the following command on the XenServer host:
    xe pif-list network-name-label=<name_of_network>

    Where <name_of_network> is the common name for the network as it appears in XenCenter (Network 0, for example).
    Note the UUID for the PIF because you need it for the next command.
  2. To enable promiscuous mode for the PIF, use the following command on the XenServer host:
    xe pif-param-set uuid=<uuid_of_pif> other-config:promiscuous="true"

    Where <uuid_of_pif> is the UUID for the PIF copied from step 1.
  3. You can verify that the option has been set by using the following command:
    xe pif-param-list uuid=<uuid_of_pif>

    In the output of this command you can see the following line:
    other-config (MRW): promiscuous: true
    This indicates that promiscuous mode is active on the PIF.
2)启用虚拟网卡的promiscuous模式
Modify the promiscuous setting for the VIF
  1. Grab the VIF UUID by using the following command on the XenServer host:
    xe vif-list vm-name-label=<name_of_vm>

    Where <name_of_vm> is the common name of the virtual machine as it appears in XenCenter.
    Note the UUID for the VIF because you need it for the next command.
  2. To enable promiscuous mode for the VIF, use the following command on the XenServer host:
    xe vif-param-set Uuid=<uuid_of_vif> other-config:promiscuous="true"

    Where <uuid_of_vif> is the UUID for the VIF copied from step 1.
  3. You can verify that the option has been set by using the following command:
    xe vif-param-list uuid=<uuid_of_vif>

    In the output of this command you can see the following line:
    other-config (MRW): promiscuous: true
    This indicates that promiscuous mode is active on the VIF.
3)重置虚拟机网卡。此步要求虚拟机里一定要安装xentools,否则会出现“需要PV driver……”这样的错误提示。
Reset the VM virtual interface to apply the change
  1. the commands below to activate the changes made above:
  2. xe vif-unplug uuid=<uuid_of_vif>
    xe vif-plug uuid=<uuid_of_vif>
  3. disconnects and reconnects the VIF to the VM, it comes back up with promiscuous mode active. Note: Issuing the unplug command takes the VM VIF offline, bringing down the interface to the VM until you run the vif-plug command.

本文出自 “面朝大海,春暖花开” 博客,谢绝转载!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值