[one-users] change ebtables-xen to work with KVM?

Ruben S. Montero rubensm at dacya.ucm.es
Tue Sep 22 13:39:53 PDT 2009


Hi Shi,

Please try VMID.

Cheers


On Tue, Sep 22, 2009 at 7:08 PM, Shi Jin <jinzishuai at gmail.com> wrote:
> Thank you.
> I tried it but it seems that the $VM_ID specified as the command line
> argument has no value.
> I got errors like:
> Tue Sep 22 10:05:07 2009 [HKM][I]: Command execution fail:
> '/srv/cloud/one/share/hooks/ebtables-kvm start one-'
> Tue Sep 22 10:05:07 2009 [HKM][I]: STDERR follows.
> Tue Sep 22 10:05:07 2009 [HKM][I]: Connecting to uri: qemu:///system
> Tue Sep 22 10:05:07 2009 [HKM][I]: error: failed to get domain 'one-'
> Tue Sep 22 10:05:07 2009 [HKM][I]: error: Domain not found
> Tue Sep 22 10:05:07 2009 [HKM][I]:
> /srv/cloud/one/share/hooks/ebtables-kvm:21: undefined method
> `elements' for nil:NilClass (NoMethodError)
> Tue Sep 22 10:05:07 2009 [HKM][I]: ExitCode: 1
> Tue Sep 22 10:05:07 2009 [HKM][E]: Error executing Hook: ebtables-running.
>
> When I manually run /srv/cloud/one/share/hooks/ebtables-kvm start
> one-50, it does seem to work. I get
> root at node1:~# ebtables -L
> Bridge table: filter
>
> Bridge chain: INPUT, entries: 1, policy: ACCEPT
> -d ! 0:3:c0:a8:1:84 -i vnet0 -j DROP
>
> Bridge chain: FORWARD, entries: 0, policy: ACCEPT
>
> Bridge chain: OUTPUT, entries: 1, policy: ACCEPT
> -s ! 0:3:c0:a8:1:0/ff:ff:ff:ff:ff:0 -o vnet0 -j DROP
>
> Do you know what the problem is here?
> Thank you.
>
> Shi
>
> On Mon, Sep 21, 2009 at 6:58 PM, Javier Fontan <jfontan at gmail.com> wrote:
>> Hello,
>>
>> A first version for kvm is already uploaded to svn:
>>
>> http://dev.opennebula.org/projects/opennebula/repository/entry/trunk/share/hooks/ebtables-kvm
>>
>> It is still not added to the install script but you can copy it
>> manually. Tell us if you find any problem.
>>
>> Bye
>>
>> On Mon, Sep 21, 2009 at 11:34 PM, Shi Jin <jinzishuai at gmail.com> wrote:
>>> Hi, there,
>>>
>>> I am reading the documentation at
>>> http://www.opennebula.org/doku.php?id=documentation:rel1.4:nm
>>> to isolate the virtual networks. It seems that we need to change the
>>> ebtables-xen script a little bit to make it work for KVM, right?
>>>
>>> I guess all we need to do is the replace the following two lines to
>>> use virsh or something similar, right?
>>> vm_id=`sudo xm domid #{VM_NAME}`.strip
>>> networks=`sudo xm network-list #{vm_id}`.split("\n")[1..-1]
>>>
>>> Has anyone worked out a solution already so that I don't have to
>>> reinvent the wheel? Thanks a lot.
>>>
>>> Shi
>>>
>>> --
>>> Shi Jin, Ph.D.
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>
>>
>>
>> --
>> Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
>> DSA Research Group: http://dsa-research.org
>> Globus GridWay Metascheduler: http://www.GridWay.org
>> OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org
>>
>
>
>
> --
> Shi Jin, Ph.D.
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
+---------------------------------------------------------------+
 Dr. Ruben Santiago Montero
 Associate Professor
 Distributed System Architecture Group (http://dsa-research.org)

 URL:    http://dsa-research.org/doku.php?id=people:ruben
 Weblog: http://blog.dsa-research.org/?author=7

 GridWay, http://www.gridway.org
 OpenNebula, http://www.opennebula.org
+---------------------------------------------------------------+



More information about the Users mailing list