V9.2 support Hyper-V Copy-VMFile of guest integration?

Hello,
we use CentOS->RockyLinux bcs it’s work very good on Windows Server with Hyper-V/FailOverClustering feature with buil-in LIS.

We now test a RLv9.2 and get

PS C:\Windows\system32> Get-VMIntegrationService -VMName RL92-ARCH

VMName   Name                    Enabled PrimaryStatusDescription SecondaryStatusDescription
------   ----                    ------- ------------------------ --------------------------
RL92-ARCH Guest Service Interface True    OK
RL92-ARCH Heartbeat               True    OK
RL92-ARCH Key-Value Pair Exchange True    No Contact
RL92-ARCH Shutdown                True    OK
RL92-ARCH Time Synchronization    True    OK
RL92-ARCH VSS                     True    OK                       The protocol version of the component installed in the virtual machine does not match the version expected by the hosting system


PS C:\Windows\system32> Copy-VMFile -Name RL92-ARCH -SourcePath .\logoff.exe -DestinationPath '/root/' -FileSource Host -Force
Copy-VMFile : Failed to initiate copying files to the guest.
Failed to copy the source file 'C:\Windows\system32\logoff.exe' to the destination '/root/' in the guest.
'RL92-ARCH' failed to initiate copying files to the guest: Unspecified error (0x80004005). (Virtual machine ID A43230FC-8AF0-47AF-819A-55FAE29A33B3)
'RL92-ARCH' failed to copy the source file 'C:\Windows\system32\logoff.exe' to the destination '/root/' in the guest: Unspecified error (0x80004005). (Virtual machine ID A43230FC-8AF0-47AF-819A-55FAE29A33
B3)
At line:1 char:1
+ Copy-VMFile -Name RL92-ARCH -SourcePath .\logoff.exe -DestinationPath  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Copy-VMFile], VirtualizationException
    + FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.CopyVMFile

And we see that support should work out-of-box in Supported CentOS and Red Hat Enterprise Linux virtual machines on Hyper-V | Microsoft Docs

Second and probably a MicroSoft problem is when we use a HV Console then we cannot paste a text into vm, problem with paste username/password/commands into hv console.
When copy a ‘12345678’ and paste it we get ‘nm,./*’ :frowning:

image

Best Regards
SiB

Same here. I’m using Rocky Linux 9.3 on Hyper-V and I have the exact same behavior. I cant copy files with Copy-VMFile in PowerShell and the copy and paste from the clipboard doesn’t work either. Running the command

lsmod | grep hv

gives the following result

(Sorry for posting a screenshot, but I also can’t copy from the terminal window to the local clipboard)

It seems, that the LIS components are running, but the copy and paste is not. Has anyone solved this already? I would appreciate a tip, because copy and paste would be nice. Thanks in advance.

Hmm… two things to check, perhaps.

  1. Are the Hyper-V services actually running on the linux guest?
 $ systemctl status {hypervfcopyd,hypervkvpd,hypervvssd}.service 
  1. Do all the Integration Services show as enabled for the linux guest?
    Open Hyper-V Manager, right-click the VM, then left-click Settings.
    Left-click “Integration Services” under the “Management” section.
    Are all enabled (with a checkmark)?
1 Like

Hi again. I just checked the command you mentioned. When executing

$ systemctl status {hypervfcopyd,hypervkvpd,hypervvssd}.service

I got the following output

Unit hypervfcopyd.service could not be found.
Unit hypervkvpd.service could not be found.
Unit hypervvssd.service could not be found.

I then did the following

sudo dnf update

and

sudo dnf upgrade

followed by

sudo dnf install hyperv-daemons

After a reboot I now get the following output from

systemctl status hypervkvpd.service
● hypervkvpd.service - Hyper-V KVP daemon
     Loaded: loaded (/usr/lib/systemd/system/hypervkvpd.service; static)
     Active: active (running) since Fri 2023-12-15 22:51:01 CET; 1min 49s ago
   Main PID: 711 (hypervkvpd)
      Tasks: 1 (limit: 10613)
     Memory: 568.0K
        CPU: 3ms
     CGroup: /system.slice/hypervkvpd.service
             └─711 /usr/sbin/hypervkvpd -n

Dec 15 22:51:01 rocky1 systemd[1]: Started Hyper-V KVP daemon.
Dec 15 22:51:01 rocky1 KVP[711]: KVP starting; pid is:711
Dec 15 22:51:01 rocky1 KVP[711]: KVP LIC Version: 3.1

from

systemctl status hypervfcopyd.service
● hypervfcopyd.service - Hyper-V FCOPY daemon
     Loaded: loaded (/usr/lib/systemd/system/hypervfcopyd.service; static)
     Active: active (running) since Fri 2023-12-15 22:51:01 CET; 3min 51s ago
   Main PID: 710 (hypervfcopyd)
      Tasks: 1 (limit: 10613)
     Memory: 204.0K
        CPU: 1ms
     CGroup: /system.slice/hypervfcopyd.service
             └─710 /usr/sbin/hypervfcopyd -n

Dec 15 22:51:01 rocky1 systemd[1]: Started Hyper-V FCOPY daemon.
Dec 15 22:51:01 rocky1 HV_FCOPY[710]: starting; pid is:710
Dec 15 22:51:01 rocky1 HV_FCOPY[710]: kernel module version: 1

and from

systemctl status hypervvssd.service
● hypervvssd.service - Hyper-V VSS daemon
     Loaded: loaded (/usr/lib/systemd/system/hypervvssd.service; static)
     Active: active (running) since Fri 2023-12-15 22:51:01 CET; 4min 21s ago
   Main PID: 712 (hypervvssd)
      Tasks: 1 (limit: 10613)
     Memory: 208.0K
        CPU: 1ms
     CGroup: /system.slice/hypervvssd.service
             └─712 /usr/sbin/hypervvssd -n

Dec 15 22:51:01 rocky1 systemd[1]: Started Hyper-V VSS daemon.
Dec 15 22:51:01 rocky1 hypervvssd[712]: Hyper-V VSS: VSS starting; pid is:712
Dec 15 22:51:01 rocky1 hypervvssd[712]: Hyper-V VSS: VSS: kernel module version: 129

Now, when I use the following Copy-VMFile commandlet in PowerShell

Copy-VMFile -Name rocky1 -SourcePath .\Copytest.txt -DestinationPath '/home/markus' -FileSource HOST

that works as expected now and the file is copied to my home drive inside the rocky1 vm.

Unfortunately, copying and pasting into the Hyper-V console on Windows still doesn’t work. Not with Ctrl-V and also not with the menu option. This is no longer a pain for me, because i can copy a file via Copy-VMFile and PowerShell now, that the services work. Just wanted to give feedback about this. Hope this helps somebody.

Glad that fixed the main issue for you.
Yes, if the Hyper-V services/daemons were not installed or running, that definitely would explain it! :grinning:

For me, the most important is to paste a long password from KeePassXC, but not I cannot paste even simple 12345678 string :(.

Still the same behavior.
image

I’ve not really had great experiences with Hyper-V overall. To work around this, I’d highly recommend using something which officially supports copy and paste for this instead of the Hyper-V Manager application. PuTTY, for example, if you’re working on the command line of the linux guest anyway…

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.