question

ManuelFloresBonilla-7693 avatar image
0 Votes"
ManuelFloresBonilla-7693 asked DSPatrick commented

File Transfer Issue From Hyper-V Host to Guest VM

I created a guest VM hosting Centos 7 and I've noticed the PrimaryStatusDescription of the VMIntegration service, Key-value Pair Exchange, is displaying as "no contact" versus showing "ok." In addition, the time synchronization service is also displaying "The protocol version of the component installed in the virtual machine does not match the version expected by the hosting system" under SecondaryStatusDescription. This is also seen by running:

Get-VMIntegrationService –VMName "test-vm"

I've rebuilt the VM a few times times and the issue keeps repeating itself. I've disabled and enabled the services as well rebooted the VM itself but to no avail. I've asked a few colleagues and we're baffled by the issue. Is anyone familiar with this issue?

To mention, this issue in services is preventing me from doing file transfers from the host machine (Windows server 2019) to the guest VM. I was able to transfer files at one point between both but I suddenly couldn't one week and can't determine the culprit.

I read that the aforementioned SecondaryStatusDescription message could be ignored for certain OS's: https://docs.microsoft.com/en-us/troubleshoot/windows-server/virtualization/vm-integration-services-status-protocol-version-mismatch. As far as establishing the communication connection for the 'Key-Value Pair Exchange' service, I'm not sure how to go about it.

windows-server-powershellwindows-server-hyper-v
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

An error I keep getting when trying to transfer a file from the host machine to guest VM includes: Copy-VMFile : Failed to initiate copying files to the guest....failed to initiate copying files to the guest: Unspecified error (0x80004005). (Virtual machine...

I'm going about the transfer with the following powershell command:

Copy-VMFile -Name test-vm -SourcePath 'C:\temp\file' -DestinationPath '/home/data' -CreateFullPath -FileSource Host

0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered DSPatrick commented

Might check the correct integration services are available and installed.
https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/supported-centos-and-red-hat-enterprise-linux-virtual-machines-on-hyper-v#rhelcentos-7x-series

--please don't forget to upvote and Accept as answer if the reply is helpful--



· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

So that's one of the files I'm actually attempting to transfer to the guest machine. Oddly enough, I was able to transfer such a file before but one week, I just couldn't. I can't seem to understand why.

0 Votes 0 ·
DSPatrick avatar image DSPatrick ManuelFloresBonilla-7693 ·

The simplest solution is to not transfer the ISO, but present the ISO (from host) by mounting as a CD / DVD-Rom to the guest. Then install it.

--please don't forget to upvote and Accept as answer if the reply is helpful--





0 Votes 0 ·

Just checking if there's any progress or updates?

--please don't forget to upvote and Accept as answer if the reply is helpful--



0 Votes 0 ·
Show more comments
LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered ManuelFloresBonilla-7693 commented

Hello @ManuelFloresBonilla-7693


You can transfer files to\from Linux VM by using any SFTP client like FileZilla or WinSCP.

You need to just enter IP of Linux server and username, password , then you can do file transfer easily (I assume you can access Linux server by SSH using putty)



If the reply was helpful, please don’t forget to upvote or accept as answer.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the suggestion @LimitlessTechnology-2700. I've tried WinSCP but the application seems to break during the attempt. I'll try again since it's been a few weeks and let you know how it goes. Thanks!

0 Votes 0 ·
LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello again @ManuelFloresBonilla-7693

I assume that you have already updated the Integration Services to latest versions. You can check with the cmdlet: Get-VMIntegrationService –VMName <VM names in comma separated list> | Where-Object {$_.SecondaryOperationalStatus –eq 'ProtocolMismatch'}

To update them:
https://support.microsoft.com/en-us/topic/hyper-v-integration-components-update-for-windows-virtual-machines-8a74ffad-576e-d5a0-5a2f-d6fb2594f990

or
Copy vmguest.iso from a patched host (\Windows\System32\vmguest.iso) and mount it

I would also suggest, that in case that this machine has been migrated from Physical to Virtual, this s a non-recommended scenario, as has been proven many times to have different points of failure like you are experiencing. If that is the case, best to create a new VM from scratch.

Last but not least, you can try to troubleshoot the services with the next cmdlets from an elevated PS console:

  1. Check the status of services: Invoke-Command –ComputerName <Hostname> -Credential <Domain><Username> -Scriptblock {Get-Service -Name vmi*}

  2. Invoke-Command –ComputerName <Hostname> -Credential <Domain><Username> -Scriptblock {Start-Service -Name <comma separated service names>}
    3.Repeat step 1

You can also try the file transfers with the next cmdlet:
Copy-VMFile “<Name of target Guest VM>” –SourcePath “<Path to file on host system>” –DestinationPath “<Path to new location on guest system>” –CreateFullPath –FileSource Host

Hope this helps in your case,
Best regards,

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.