about the new added attributes "check" and "type" for interface mac element

Yalan Zhang yalzhang at redhat.com
Mon Nov 2 05:43:15 UTC 2020


Hi,

I have filed a bug about the error messages,
https://bugzilla.redhat.com/show_bug.cgi?id=1892130
And I will track the questions on that bug, please help to update on the
bug comments about the questions.
Thank you!

-------
Best Regards,
Yalan Zhang
IRC: yalzhang


On Wed, Oct 21, 2020 at 10:51 AM Yalan Zhang <yalzhang at redhat.com> wrote:

> Hi all,
>
> I have done some tests for the new attributes "check" and "type", could
> you please help to have a check?  And I have some questions about the
> patch, please help to have a look, Thank you!
>
> The questions:
> 1. in step 4 below, the error message should be updated:
> Actual results:
> XML error: invalid mac address **check** value: 'next'. Valid values are
> "generated" and "static".
> expected results:
> XML error: invalid mac address **type** value: 'next'. Valid values are
> "generated" and "static".
>
> 2. I have checked the vmware OUI definition and found this:
> https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-1B6A280E-0C77-4775-8F84-4B3F40673178.html
> it says the VMware OUI is 00:50:56, not 00:0c:29 in the patches.  Am I
> missing something?
>
> 3. Could you please tell more about the user story? as I can not
> understand the scenario when " it will ignore all the checks libvirt does
> about the origin of the MAC address(whether or not it's in a VMWare OUI)
> and forward the original one to the ESX server telling it not to check it
> either". Does it happen when we try to transform a kvm guest to a vmware
> guest?
>
> 4. How to test it as a libvirt QE? Are the test scenarios below enough
> without ESX env?
>
>
> Test steps:
>
> 1. Start vm with different configuration with mac in "00:0c:29" range:
> # virsh dumpxml rhel | grep /interface -B12
> ...
> <interface type='network'>
>       <mac address='00:0c:29:e7:9b:cb' type='generated' check='yes'/>
>       <source network='default'/>
>       <model type='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x04' slot='0x00'
> function='0x0'/>
>     </interface>
>     <interface type='network'>
>       <mac address='00:0c:29:3b:e0:50' type='static' check='no'/>
>       <source network='default'/>
>       <model type='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x0d' slot='0x00'
> function='0x0'/>
>     </interface>
>     <interface type='network'>
>       <mac address='00:0c:29:73:f6:dc' type='generated' check='no'/>
>       <source network='default'/>
>       <model type='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x0e' slot='0x00'
> function='0x0'/>
>     </interface>
>     <interface type='network'>
>       <mac address='00:0c:29:aa:dc:6c' type='static' check='yes'/>
>       <source network='default'/>
>       <model type='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x0f' slot='0x00'
> function='0x0'/>
>     </interface>
>
> # virsh start rhel
> Domain rhel started
>
> 2. login guest and check the interfaces:
> # ip addr
> ...
> 2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state
> UP group default qlen 1000
>     link/ether 00:0c:29:e7:9b:cb brd ff:ff:ff:ff:ff:ff
>     inet 192.168.122.142/24 brd 192.168.122.255 scope global dynamic
> noprefixroute enp5s0
>        valid_lft 3584sec preferred_lft 3584sec
>     inet6 fe80::351c:686a:863e:4a7f/64 scope link noprefixroute
>        valid_lft forever preferred_lft forever
> 3: enp11s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel
> state UP group default qlen 1000
>     link/ether 00:0c:29:3b:e0:50 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.122.202/24 brd 192.168.122.255 scope global dynamic
> noprefixroute enp11s0
>        valid_lft 3584sec preferred_lft 3584sec
>     inet6 fe80::2b79:4675:6c59:6822/64 scope link noprefixroute
>        valid_lft forever preferred_lft forever
> 4: enp12s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel
> state UP group default qlen 1000
>     link/ether 00:0c:29:73:f6:dc brd ff:ff:ff:ff:ff:ff
>     inet 192.168.122.33/24 brd 192.168.122.255 scope global dynamic
> noprefixroute enp12s0
>        valid_lft 3584sec preferred_lft 3584sec
>     inet6 fe80::e43d:555:ba85:4030/64 scope link noprefixroute
>        valid_lft forever preferred_lft forever
> 5: enp13s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel
> state UP group default qlen 1000
>     link/ether 00:0c:29:aa:dc:6c brd ff:ff:ff:ff:ff:ff
>     inet 192.168.122.161/24 brd 192.168.122.255 scope global dynamic
> noprefixroute enp13s0
>        valid_lft 3584sec preferred_lft 3584sec
>     inet6 fe80::f32d:e2e8:9c8b:47fd/64 scope link noprefixroute
>        valid_lft forever preferred_lft forever
>
>
> 3. start vm without the "check" and "type" attributes, and check the live
> xml do not include these attributes, either.
>  # virsh start vm1
> virshDomain vm1 started
> # virsh dumpxml vm1 | grep /interface -B8
>     </controller>
>     <interface type='network'>
>       <mac address='52:54:00:bb:cd:89'/>
>       <source network='default'
> portid='b02dc78f-69ad-4db7-870c-f371fd730537' bridge='virbr0'/>
>       <target dev='vnet22'/>
>       <model type='virtio'/>
>       <alias name='net0'/>
>       <address type='pci' domain='0x0000' bus='0x01' slot='0x00'
> function='0x0'/>
>     </interface>
>
> 4. negative test:
> Set "<mac address='52:54:00:bb:cd:89' type='next'/>" in virsh edit
> # virsh edit vm1
> error: XML document failed to validate against schema: Unable to validate
> doc against /usr/share/libvirt/schemas/domain.rng
> Extra element devices in interleave
> Element domain failed to validate content
>
> Failed. Try again? [y,n,i,f,?]:   ----> press 'i'
> error: XML error: invalid mac address check value: 'next'. Valid values
> are "generated" and "static".
> Failed. Try again? [y,n,f,?]:
>
>
> -------
> Best Regards,
> Yalan Zhang
> IRC: yalzhang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20201102/9a0a095c/attachment.htm>


More information about the libvirt-users mailing list