RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1867575 - qemu-ga shows ip info even if the interface is not configured
Summary: qemu-ga shows ip info even if the interface is not configured
Keywords:
Status: CLOSED DUPLICATE of bug 1862893
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virtio-win
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 8.0
Assignee: Basil Salman
QA Contact: dehanmeng
URL:
Whiteboard:
Depends On:
Blocks: 1862893
TreeView+ depends on / blocked
 
Reported: 2020-08-10 11:54 UTC by Tomáš Golembiovský
Modified: 2020-11-10 10:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-10 09:50:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
Get-NetIPAddress output (166.55 KB, image/png)
2020-08-31 10:39 UTC, Basil Salman
no flags Details

Description Tomáš Golembiovský 2020-08-10 11:54:39 UTC
This bug was initially created as a copy of Bug #1862893

I am copying this bug because: 

This seems to be a bug in qemu-ga of some sort. The IP info is reported for interface even though the interface is disabled and configured for DHCP (so it is not a static setup).

Description of problem:
Rhv shows ip info even if guest's ip doesn't exist

Version-Release number of selected component (if applicable):
rhv:4.4.1.8-0.7.el8ev
virt-v2v-1.40.2-24.module+el8.2.1+7154+47ffd890.x86_64
qemu-kvm-4.2.0-19.module+el8.3.0+6473+93e27135.x86_64
libvirt-6.0.0-25.module+el8.2.1+7154+47ffd890.x86_64
virtio-win-1.9.11-1.el8.noarch


How reproducible:
100%

Steps to Reproduce:
1. Prepare a windows guest which has static IP, gateway, subnet mask and DNS in ESXI6.7
static ip: 192.168.122.11
subnet mask:255.255.248.0
default gateway:192.168.1.1
DNS server: 196.168.11.1 

2. Convert the guest from VMware to rhv, set static IP address,gateway, subnet mask and DNS in --mac option
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io  vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA  -o rhv-upload -oo rhv-cafile=/tmp/ca.pem -oo rhv-direct -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd esx6.7-win2019-static-ip -of raw -os nfs_data --mac 00:50:56:ac:90:79:ip:10.66.147.203,10.66.147.254,24 

3.Check the guest's network after finishing conversion,
3.1 Can find network's error info in firstboot log
3.2 The guest's ip doesn't exist,please see screenshot named:guest's ip info
3.3 But the rhv still shows guest's ip info,pls see screenshot named:rhv shows ip info

Actual results:
As above

Expected results:
RHV cannot show ip info if guest's ip doestn't exist.

Additional info:
1. Can reproduce the bug in rhv4.3
2. Cannot reproduce the bug when directly disable the guest network adapter in rhv

Comment 4 dehanmeng 2020-08-21 05:56:39 UTC
For this bug I've tried to reproduce it:
1.To disable net drive ,but the Ethernet device was not same as attachment,device was gone not appeared red fork.
2.To delete /etc/qemu-ifup and qemu-ifdown file to simulate a bridge cable disconnect.but I cannot connect with guest.
Both these operations for simulating reproduce driver problems during convert guest between two different product,and google it said that most probles were caused by driver disfunction.
looked through some blogs and materials.Vmware and RHV are both high-level application ,Not only that, but the two have very different network models,so I need the image that guest booted with no IP or Gateway infomation to liuzi.waiting for the image now.

Comment 7 Basil Salman 2020-08-31 10:39:54 UTC
Created attachment 1713130 [details]
Get-NetIPAddress output

Comment 8 Basil Salman 2020-08-31 10:51:21 UTC
Checking the vm where the issue is reproduced, this does not seem to be a qemu-ga bug.
in fact, qemu-ga is actually reflecting valid information from the guest-os.
this information can be viewed using Powershell cmdlet "Get-NetIPAddress" (view attachment)
https://bugzilla.redhat.com/attachment.cgi?id=1713130

Apparently there are still some IpAddress object that holds this IpAddress configuration,
this can be a leftover of network configuration from the VM conversion.
it can also be related to static ip configuration before the conversion,
for example if the static ip was set using New-NetIPAddress powershell cmdlet (which adds a new Ip address),
instead of Set-NetIPAddress (which Modifies the configuration of an IP address).

Comment 9 Tomáš Golembiovský 2020-09-01 15:49:30 UTC
(In reply to Basil Salman from comment #8)
> Checking the vm where the issue is reproduced, this does not seem to be a
> qemu-ga bug.
> in fact, qemu-ga is actually reflecting valid information from the guest-os.
> this information can be viewed using Powershell cmdlet "Get-NetIPAddress"
> (view attachment)
> https://bugzilla.redhat.com/attachment.cgi?id=1713130
> 

That may be but it is still questionable whether the behavior of qemu-ga is correct. Is it supposed to return IP setup for unavailable interfaces? Is it something management apps or admins care about when interacting with qemu-ga?

If we want to keep the behavior it would make sense to extend the API to reflect whether the reported interface is up or down.

> Apparently there are still some IpAddress object that holds this IpAddress
> configuration,
> this can be a leftover of network configuration from the VM conversion.
> it can also be related to static ip configuration before the conversion,
> for example if the static ip was set using New-NetIPAddress powershell
> cmdlet (which adds a new Ip address),
> instead of Set-NetIPAddress (which Modifies the configuration of an IP
> address).

Yes, most likely relic from the VMware environment.

Comment 10 Basil Salman 2020-09-01 17:02:49 UTC
(In reply to Tomáš Golembiovský from comment #9)
> (In reply to Basil Salman from comment #8)
> > Checking the vm where the issue is reproduced, this does not seem to be a
> > qemu-ga bug.
> > in fact, qemu-ga is actually reflecting valid information from the guest-os.
> > this information can be viewed using Powershell cmdlet "Get-NetIPAddress"
> > (view attachment)
> > https://bugzilla.redhat.com/attachment.cgi?id=1713130
> > 
> 
> That may be but it is still questionable whether the behavior of qemu-ga is
> correct. Is it supposed to return IP setup for unavailable interfaces? Is it
> something management apps or admins care about when interacting with qemu-ga?
> 
> If we want to keep the behavior it would make sense to extend the API to
> reflect whether the reported interface is up or down.
> 
Well in this case the interface is not unavailable, the interface is the same virtio-net device,
Ipaddress objects can be bound to a NIC using InterfaceIndex and Alias and i think that the previous 
NIC had the same value those properties, and that's why it was shown under virtio-net.
Also this is not an incorrect configuration in terms of Windows as such configuration can be useful.

> > Apparently there are still some IpAddress object that holds this IpAddress
> > configuration,
> > this can be a leftover of network configuration from the VM conversion.
> > it can also be related to static ip configuration before the conversion,
> > for example if the static ip was set using New-NetIPAddress powershell
> > cmdlet (which adds a new Ip address),
> > instead of Set-NetIPAddress (which Modifies the configuration of an IP
> > address).
> 
> Yes, most likely relic from the VMware environment.

Is it okay if we close this as not a bug?

Comment 11 Tomáš Golembiovský 2020-09-01 17:48:01 UTC
(In reply to Basil Salman from comment #10)
> (In reply to Tomáš Golembiovský from comment #9)
> > (In reply to Basil Salman from comment #8)
> > > Checking the vm where the issue is reproduced, this does not seem to be a
> > > qemu-ga bug.
> > > in fact, qemu-ga is actually reflecting valid information from the guest-os.
> > > this information can be viewed using Powershell cmdlet "Get-NetIPAddress"
> > > (view attachment)
> > > https://bugzilla.redhat.com/attachment.cgi?id=1713130
> > > 
> > 
> > That may be but it is still questionable whether the behavior of qemu-ga is
> > correct. Is it supposed to return IP setup for unavailable interfaces? Is it
> > something management apps or admins care about when interacting with qemu-ga?
> > 
> > If we want to keep the behavior it would make sense to extend the API to
> > reflect whether the reported interface is up or down.
> > 
> Well in this case the interface is not unavailable, the interface is the
> same virtio-net device,
> Ipaddress objects can be bound to a NIC using InterfaceIndex and Alias and i
> think that the previous 
> NIC had the same value those properties, and that's why it was shown under
> virtio-net.

If I recall the situation was that virtio interface was configured to use DHCP, was not enabled and did not have *any* IP assigned. So this does not quite match. Or are you implying it is possible to have both static address and DHCP configured on single interface in Windows? Or is it just reporting some cached IP from previous run? If yes than that shouldn't be reported by qemu-ga then.

> Also this is not an incorrect configuration in terms of Windows as such
> configuration can be useful.

Maybe, but the question then is how do pass the important information to the consumers of qemu-ga API. If qemu-ga reports IPs from guest OS that are not available then it does not sound too useful to me.

> 
> > > Apparently there are still some IpAddress object that holds this IpAddress
> > > configuration,
> > > this can be a leftover of network configuration from the VM conversion.
> > > it can also be related to static ip configuration before the conversion,
> > > for example if the static ip was set using New-NetIPAddress powershell
> > > cmdlet (which adds a new Ip address),
> > > instead of Set-NetIPAddress (which Modifies the configuration of an IP
> > > address).
> > 
> > Yes, most likely relic from the VMware environment.
> 
> Is it okay if we close this as not a bug?

Definitely not.

Comment 12 Basil Salman 2020-09-07 15:54:17 UTC
(In reply to Tomáš Golembiovský from comment #11)
> (In reply to Basil Salman from comment #10)
> > (In reply to Tomáš Golembiovský from comment #9)
> > > (In reply to Basil Salman from comment #8)
> > > > Checking the vm where the issue is reproduced, this does not seem to be a
> > > > qemu-ga bug.
> > > > in fact, qemu-ga is actually reflecting valid information from the guest-os.
> > > > this information can be viewed using Powershell cmdlet "Get-NetIPAddress"
> > > > (view attachment)
> > > > https://bugzilla.redhat.com/attachment.cgi?id=1713130
> > > > 
> > > 
> > > That may be but it is still questionable whether the behavior of qemu-ga is
> > > correct. Is it supposed to return IP setup for unavailable interfaces? Is it
> > > something management apps or admins care about when interacting with qemu-ga?
> > > 
> > > If we want to keep the behavior it would make sense to extend the API to
> > > reflect whether the reported interface is up or down.
> > > 
> > Well in this case the interface is not unavailable, the interface is the
> > same virtio-net device,
> > Ipaddress objects can be bound to a NIC using InterfaceIndex and Alias and i
> > think that the previous 
> > NIC had the same value those properties, and that's why it was shown under
> > virtio-net.
> 
> If I recall the situation was that virtio interface was configured to use
> DHCP, was not enabled and did not have *any* IP assigned. So this does not
> quite match. Or are you implying it is possible to have both static address
> and DHCP configured on single interface in Windows? Or is it just reporting
> some cached IP from previous run? If yes than that shouldn't be reported by
> qemu-ga then.
> 
After further inspection apparently this IP is assigned from link layer,
this is due link being off ( cable unplugged), so it
> > Also this is not an incorrect configuration in terms of Windows as such
> > configuration can be useful.
> 
> Maybe, but the question then is how do pass the important information to the
> consumers of qemu-ga API. If qemu-ga reports IPs from guest OS that are not
> available then it does not sound too useful to me.
> > 
> > > > Apparently there are still some IpAddress object that holds this IpAddress
> > > > configuration,
> > > > this can be a leftover of network configuration from the VM conversion.
> > > > it can also be related to static ip configuration before the conversion,
> > > > for example if the static ip was set using New-NetIPAddress powershell
> > > > cmdlet (which adds a new Ip address),
> > > > instead of Set-NetIPAddress (which Modifies the configuration of an IP
> > > > address).
> > > 
> > > Yes, most likely relic from the VMware environment.
> > 
> > Is it okay if we close this as not a bug?
> 
> Definitely not.

I was able to reproduce something similar with qemu cli without the use of rhv or vmware.
using set_link off qmp command.
in this case qemu-ga still reports the old ip, even though it is disconencted.

Comment 16 Yvugenfi@redhat.com 2020-09-08 15:02:17 UTC
Let's check the code: https://github.com/libguestfs/virt-v2v/blob/master/v2v/convert_windows.ml#L632 - this is PS script that should configure static IP after VM is up after V2V.

Comment 22 Yvugenfi@redhat.com 2020-11-10 09:50:47 UTC
Based on the team discussion, marking as duplicate of BZ#1862893

*** This bug has been marked as a duplicate of bug 1862893 ***


Note You need to log in before you can comment on or make changes to this bug.