Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2172414

Summary: [virtiofs][virtio-win] Give some hint when start virtiofs service with device is disabled detached
Product: Red Hat Enterprise Linux 9 Reporter: xiagao
Component: virtio-winAssignee: Yvugenfi <yvugenfi>
virtio-win sub component: virtio-win-prewhql QA Contact: xiagao
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: coli, jinzhao, juzhang, lijin, qizhu, viktor, virt-maint, vrozenfe, ymankad, yvugenfi
Version: 9.2Keywords: Triaged, ZStream
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2211912 (view as bug list) Environment:
Last Closed: 2023-11-07 08:29:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2211912    

Description xiagao 2023-02-22 10:39:31 UTC
Description of problem:
Currently, when the virtiofs device is detached or disabled, the virtiofs service can be started successfully without any hint.

Version-Release number of selected component (if applicable):
virtio-win-prewhql-0.1-234

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:

Expected results:
Give some useful/resonable hint in this scenario.


Additional info:

Comment 1 Yvugenfi@redhat.com 2023-02-22 11:34:54 UTC
Upstream fix addressing the case when service stated without a device:
https://github.com/virtio-win/kvm-guest-drivers-windows/pull/883

Comment 3 xiagao 2023-03-21 02:52:14 UTC
(In reply to Yvugenfi from comment #1)
> Upstream fix addressing the case when service stated without a device:
> https://github.com/virtio-win/kvm-guest-drivers-windows/pull/883

I saw this patch is included in prewhql 235 version. And I have a try with it, but there is no return output when starting virtiofs service without virtiofs attached.
Is there any special steps to get the message?

Comment 4 Yvugenfi@redhat.com 2023-03-22 13:31:27 UTC
(In reply to xiagao from comment #3)
> (In reply to Yvugenfi from comment #1)
> > Upstream fix addressing the case when service stated without a device:
> > https://github.com/virtio-win/kvm-guest-drivers-windows/pull/883
> 
> I saw this patch is included in prewhql 235 version. And I have a try with
> it, but there is no return output when starting virtiofs service without
> virtiofs attached.
> Is there any special steps to get the message?

Sorry, can you please provide the exact steps for starting the service you are using?

Comment 5 xiagao 2023-03-23 02:22:01 UTC
(In reply to Yvugenfi from comment #4)

> 
> Sorry, can you please provide the exact steps for starting the service you
> are using?

Sure, I list the steps below.
1. start virtiofsd and ws2022 guest.
2. create virtiofs service.
sc create VirtioFsSvc binpath=C:\virtiofs.exe start=auto depend="WinFsp.Launcher/VirtioFsDrv" DisplayName="Virtio FS Service"
3. Stop VirtioFsSvc service
4. disable virtiofs device in device manager
5. try to start VirtioFsSvc service in service manager

The service is started successfully and no any message output.

Comment 6 Yvugenfi@redhat.com 2023-03-23 11:22:42 UTC
(In reply to xiagao from comment #5)
> (In reply to Yvugenfi from comment #4)
> 
> > 
> > Sorry, can you please provide the exact steps for starting the service you
> > are using?
> 
> Sure, I list the steps below.
> 1. start virtiofsd and ws2022 guest.
> 2. create virtiofs service.
> sc create VirtioFsSvc binpath=C:\virtiofs.exe start=auto
> depend="WinFsp.Launcher/VirtioFsDrv" DisplayName="Virtio FS Service"
> 3. Stop VirtioFsSvc service
> 4. disable virtiofs device in device manager
> 5. try to start VirtioFsSvc service in service manager
> 
> The service is started successfully and no any message output.

When the service started as a Windows service, it has no console. So either there should be a log file configured through the registry or to test start the service as an application from the console.

Comment 7 xiagao 2023-03-24 07:14:47 UTC
(In reply to Yvugenfi from comment #6)
> (In reply to xiagao from comment #5)
> > (In reply to Yvugenfi from comment #4)
> > 
> > > 
> > > Sorry, can you please provide the exact steps for starting the service you
> > > are using?
> > 
> > Sure, I list the steps below.
> > 1. start virtiofsd and ws2022 guest.
> > 2. create virtiofs service.
> > sc create VirtioFsSvc binpath=C:\virtiofs.exe start=auto
> > depend="WinFsp.Launcher/VirtioFsDrv" DisplayName="Virtio FS Service"
> > 3. Stop VirtioFsSvc service
> > 4. disable virtiofs device in device manager
> > 5. try to start VirtioFsSvc service in service manager
> > 
> > The service is started successfully and no any message output.
> 
> When the service started as a Windows service, it has no console. So either
> there should be a log file configured through the registry or to test start
> the service as an application from the console.

I tested with the service way and start virtiofs.exe via cmd line, but there is still no error output.

1. Disable the virtiofs device in device manager
2. f:\viofs\2k22\amd64>virtiofs.exe -d -1 -D -
The VirtIO-FS service will start and wait for the device.
The service VirtIO-FS has been started.

-----> no debug log, and no shared disk shown.

3. add DebugFlags (DWORD) param with C:\virtiofs.log value on the registry, reboot guest, and start virtiofs service.
----> there is no any log in C:\virtiofs.log.

Comment 8 Viktor Prutyanov 2023-03-28 09:35:12 UTC
Hi

> The VirtIO-FS service will start and wait for the device.

This is the line.

Comment 9 Viktor Prutyanov 2023-03-28 09:37:33 UTC
In case of service, it should be printed to event log.

Comment 10 xiagao 2023-03-29 03:46:14 UTC
(In reply to Viktor Prutyanov from comment #9)
> In case of service, it should be printed to event log.

I just had a try and saw there were two 'information' level messages shown, one is 'The VirtIO-FS service will start and wait for the device' and the other is 'The service VirtIO-FS has been started'.

I think the return message is good.

I remember Yan mentioned before in virtio-win meeting, the service will be started successfully even though the device is disabled. But I still want to ask if there is some way to let the service fail to start if the driver is disabled.

Thanks.

Comment 11 Yvugenfi@redhat.com 2023-03-29 10:12:17 UTC
(In reply to xiagao from comment #10)
> (In reply to Viktor Prutyanov from comment #9)
> > In case of service, it should be printed to event log.
> 
> I just had a try and saw there were two 'information' level messages shown,
> one is 'The VirtIO-FS service will start and wait for the device' and the
> other is 'The service VirtIO-FS has been started'.
> 
> I think the return message is good.
> 
> I remember Yan mentioned before in virtio-win meeting, the service will be
> started successfully even though the device is disabled. But I still want to
> ask if there is some way to let the service fail to start if the driver is
> disabled.

There is no such way now.

> 
> Thanks.

Comment 12 xiagao 2023-03-30 07:11:49 UTC
G(In reply to Yvugenfi from comment #11)
> (In reply to xiagao from comment #10)
> > (In reply to Viktor Prutyanov from comment #9)
> > > In case of service, it should be printed to event log.
> > 
> > I just had a try and saw there were two 'information' level messages shown,
> > one is 'The VirtIO-FS service will start and wait for the device' and the
> > other is 'The service VirtIO-FS has been started'.
> > 
> > I think the return message is good.
> > 
> > I remember Yan mentioned before in virtio-win meeting, the service will be
> > started successfully even though the device is disabled. But I still want to
> > ask if there is some way to let the service fail to start if the driver is
> > disabled.
> 
> There is no such way now.

Get it, then it's ok for QE.
Btw, could you change the bug status regarding it already included in prewhql-0.1-235.

> 
> > 
> > Thanks.

Comment 20 errata-xmlrpc 2023-11-07 08:29:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virtio-win bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6388