I just verified the behavior on all Ubuntu Pro versions for 16.04,
18.04, 20.04, 22.04:

- The behavior works great on all of these provided that the user
remembers to check off "Guest services" in the Hyper-V Manager VM's
Settings.  Additionally, hv-fcopy-daemon.service, hv-kvp-daemon.service,
and hv-vss-daemon.service were all smart enough to start/stop
dynamically themselves at runtime whenever the respective integration
services checkbox in the Hyper-V Manager are enabled/disabled.

^ So the bug described appears fixed in those releases.

I also tested Ubuntu Pro 24.04, and there's definitely an issue still
that I had touched on in my last comment.  In more detail:

1) `/lib/udev/rules.d/60-fcopy-daemon.rules` attempts to tag a virtual
device in systemd aligning with the `vmbus/hv_fcopy` driver, and was
previously how this systemd virtual device setup a dynamic "Wants" on
hv-fcopy-daemon.service whenever the "Guest services" checkbox is
enabled/disabled in Hyer-V Manager.

2) Because the "vmbus/hv_fcopy" driver is removed in kernel >= 6.10, the
kernel never creates `/dev/vmbus/hv_fcopy` anymore, then it is
impossible to satisfy the condition which hv-fcopy-daemon.service
depends upon during startup, so it never willingly starts itself when
booting.

3) Even when I get everything in my hyper-v VM setup correctly with
"Guest Services" enabled, it appears that
`/sys/bus/vmbus/devices/eb765408-105f-49b6-b4aa-c123b64d17d4/uio` path
is never created; although the parent folder is dynamically
created/destroyed anytime "Guest Services" is enabled/disabled (just no
"uio" file inside it).

4) Manually launching `hv_fcopy_uio_daemon -n` as root when "Guest
Services" is enabled in Hyper-V Settings causes it to exit with an error
stating that it expects the above path to exist.

@ebonato This might require a separate patch for 24.04 and above, due to
all those releases running kernels >= 6.10.  hv_fcopy_uio_daemon just
doesn't work at all on those kernels.  It's probably related to this
ticket in the overall symptom, although the overall issue on those newer
releases now appears to be more caused by Microsoft's recent "uio"
refactoring in kernel 6.10 and above.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-azure in Ubuntu.
https://bugs.launchpad.net/bugs/1766300

Title:
  hv-fcopy-daemon service fails to start if /dev/vmbus/hv_fcopy doesn't
  exist

Status in linux package in Ubuntu:
  Incomplete
Status in linux-azure package in Ubuntu:
  New
Status in linux source package in Trusty:
  New
Status in linux-azure source package in Trusty:
  New
Status in linux source package in Xenial:
  New
Status in linux-azure source package in Xenial:
  New
Status in linux source package in Artful:
  Won't Fix
Status in linux-azure source package in Artful:
  Won't Fix
Status in linux source package in Bionic:
  Incomplete
Status in linux-azure source package in Bionic:
  New

Bug description:
  On VMs launched in Azure, /dev/vmbus/hv_fcopy doesn't exist, so hv-
  fcopy-daemon fails to start.  This means that boot is degraded by
  default:

  $ systemctl list-units --failed --no-legend
  hv-fcopy-daemon.service loaded failed failed Hyper-V File Copy Protocol Daemon

  $ systemctl is-system-running 
  degraded

  which makes detecting other failures much harder to automate.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: linux-cloud-tools-common 4.15.0-15.16
  ProcVersionSignature: User Name 4.15.0-1004.4-azure 4.15.15
  Uname: Linux 4.15.0-1004-azure x86_64
  AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 
2: ls: cannot access '/dev/snd/': No such file or directory
  AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
  ApportVersion: 2.20.9-0ubuntu6
  Architecture: amd64
  ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 
'arecord'
  CRDA: N/A
  Date: Mon Apr 23 16:27:47 2018
  Dependencies:
   
  IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
  Lsusb: Error: command ['lsusb'] failed with exit code 1:
  MachineType: Microsoft Corporation Virtual Machine
  PackageArchitecture: all
  PciMultimedia:
   
  ProcFB: 0 hyperv_fb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-1004-azure 
root=UUID=fda9466a-9068-447f-8572-6d8d310eabd3 ro console=tty1 console=ttyS0 
earlyprintk=ttyS0 rootdelay=300
  RelatedPackageVersions:
   linux-restricted-modules-4.15.0-1004-azure N/A
   linux-backports-modules-4.15.0-1004-azure  N/A
   linux-firmware                             N/A
  RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
  SourcePackage: linux
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 06/02/2017
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: 090007
  dmi.board.name: Virtual Machine
  dmi.board.vendor: Microsoft Corporation
  dmi.board.version: 7.0
  dmi.chassis.asset.tag: 7783-7084-3265-9085-8269-3286-77
  dmi.chassis.type: 3
  dmi.chassis.vendor: Microsoft Corporation
  dmi.chassis.version: 7.0
  dmi.modalias: 
dmi:bvnAmericanMegatrendsInc.:bvr090007:bd06/02/2017:svnMicrosoftCorporation:pnVirtualMachine:pvr7.0:rvnMicrosoftCorporation:rnVirtualMachine:rvr7.0:cvnMicrosoftCorporation:ct3:cvr7.0:
  dmi.product.name: Virtual Machine
  dmi.product.uuid: 44FD5ABF-DE16-AD4A-B2E0-6E70167950AF
  dmi.product.version: 7.0
  dmi.sys.vendor: Microsoft Corporation

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1766300/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to