P2V fails: "ReadFile - 1. Incorrect function"

VM image converter (VMDK, VHD, VHDX, IMG, RAW, QCOW and QCOW2), P2V migrator

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
Ivan.K
Posts: 5
Joined: Mon Feb 06, 2023 6:51 am

Mon Feb 06, 2023 7:09 am

when trying to convert Server 2016 to HyperV, conversion process starts but then fails with an error

P2V::getBuffer: ReadFile - 1. Incorrect function.

Full log - below.
chkdsk /r comes out clean, no errors.
Destination machine has 1.7Tb free, "required space" when I start the process shows only 1.1.Tb.
Trying to figure out if this is something with a particular file or files (because the source machine is a bit problematic) or I'm missing something in settings/setup/etc.
Any help will be greatly appreciated.

-----------

The log file name: 'logs\V2V_Log-20230206-022538.log' (PID 9164)
2/6 2:25:38.841 2bdc Facility ???INFO: CV2V_ConverterApp::InitInstance: SetDllDirectory: C:\Program Files\StarWind Software\StarWind V2V Converter\lib
2/6 2:25:38.842 2bdc Facility ???INFO: CV2V_ConverterApp::InitInstance: File Version: 9.0.1.268
2/6 2:25:38.854 2bdc Facility ???INFO: CV2V_ConverterApp::InitInstance: Load language IDR_XML_ENGLISH
2/6 2:25:38.854 2bdc Facility ???INFO: CV2V_ConverterApp::InitInstance: Set current language English
2/6 2:25:38.860 2bdc Facility ???INFO: CPS_V2V_Converter::CPS_V2V_Converter: Version MajorVersion 10, MinorVersion 0, BuildNumber 14393
2/6 2:25:38.877 2bdc Facility ???INFO: WrapperHyperV::WrapperHyperV: LoadLibrary C:\windows\system32\wbem\wmiutils.dll - 45860000
2/6 2:25:38.879 2bdc Facility ???INFO: WrapperHyperV::WrapperHyperV: LoadLibrary C:\windows\system32\wbem\wmiutils.dll - 45860000
2/6 2:25:47.376 2bdc Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eTypeP2V
2/6 2:25:56.273 2bdc Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eVolumeSelectVM
2/6 2:26:04.958 2bdc Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eLocationTo
2/6 2:27:43.238 2bdc Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eHYPERVConnectionTo
2/6 2:28:21.506 2bdc Facility ???INFO: WrapperHyperV::connect: Host - \\STA-SR-SPR011\root\virtualization\v2
2/6 2:28:21.629 2bdc Facility ???INFO: WrapperHyperV::connect: user: Administrator
2/6 2:28:21.630 2bdc Facility ???WARNING: WrapperHyperV::connect: Domain not found - Administrator
2/6 2:28:21.674 2bdc Facility ???INFO: WrapperHyperV::connectToCIMV2: user: Administrator
2/6 2:28:21.675 2bdc Facility ???WARNING: WrapperHyperV::connectToCIMV2: Domain not found - Administrator
2/6 2:28:24.071 2bdc Facility ???INFO: WrapperHyperV::init_version: HyperV version: 10.0.20348
2/6 2:28:24.073 2bdc Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eVMSettingsHyperV
2/6 2:28:41.396 2bdc Facility ???INFO: WrapperHyperV::connectToCIMV2: user: Administrator
2/6 2:28:41.396 2bdc Facility ???WARNING: WrapperHyperV::connectToCIMV2: Domain not found - Administrator
2/6 2:29:23.028 2bdc Facility ???INFO: WrapperHyperV::connectToCIMV2: user: Administrator
2/6 2:29:23.028 2bdc Facility ???WARNING: WrapperHyperV::connectToCIMV2: Domain not found - Administrator
2/6 2:29:37.262 2bdc Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eConverting
2/6 2:29:37.265 4004 Facility ???INFO: CPPConverting::Convert: InConvertType: 3, OutConvertType: 8
2/6 2:29:37.771 4004 Facility ???INFO: WrapperHyperV::modify_cpu_and_memory: MaxCPU - 16
2/6 2:29:37.815 4004 Facility ???INFO: WrapperHyperV::getMaxMemory: MaxRAM - 62322
2/6 2:29:38.019 4004 Facility ???INFO: CPPConverting::ConverterHyperV: Create VM F8DD4DA1-1E3F-425A-91E9-72953455E30B
2/6 2:29:38.035 4004 Facility ???INFO: CPPConverting::ConvertImage: pathInput: 0, pathOutput: F:\DUP-SR-DC01\DUP-SR-DC01\Virtual Hard Disks\HDD0.vhdx
2/6 2:29:38.035 4004 Facility ???INFO: P2V::CreateInputImage: path 0
2/6 2:29:38.035 4004 Facility ???INFO: P2V::CreateInputImage: Size 0 - 1793996095488, BytesPerSector - 512
2/6 2:30:26.758 4004 Facility ???INFO: CPPConverting::ConvertImage: CreateInputImage: 0
2/6 2:30:26.780 4004 Facility ???INFO: CPPConverting::ConvertImage: CreateOutputImage: 0
2/6 2:30:34.936 4004 Facility ???INFO: P2V::getSectorsNext: countClusters - 54727920, dwCountBytes - 54727920
2/6 2:30:37.918 4004 Facility ???INFO: P2V::getSectorsNext: countClusters - 54727920, dwCountBytes - 54727920
2/6 2:30:41.028 4004 Facility ???INFO: P2V::getSectorsNext: countClusters - 54727920, dwCountBytes - 54727920
2/6 2:30:44.267 4004 Facility ???INFO: P2V::getSectorsNext: countClusters - 54727920, dwCountBytes - 54727920
2/6 2:30:45.652 4004 Facility ???INFO: P2V::getSectorsNext: countClusters - 54727920, dwCountBytes - 54727920
2/6 2:30:46.998 4004 Facility ???INFO: P2V::getSectorsNext: countClusters - 54727920, dwCountBytes - 54727920
2/6 2:30:53.224 4004 Facility ???WARNING: P2V::getBuffer: ReadFile - 1. Incorrect function.
2/6 2:30:53.224 4004 Facility ???ERROR: CPPConverting::ConvertImage: Read 3
2/6 2:32:55.467 4004 Facility ???ERROR: CPPConverting::Convert: FAILED
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Mon Feb 06, 2023 8:53 am

Can you try P2V a device, not the entire VM, please?
Ivan.K
Posts: 5
Joined: Mon Feb 06, 2023 6:51 am

Mon Feb 06, 2023 6:03 pm

Hi, yaroslav

thank you for reply

I'm doing P2V, which I guess means Physical-to-Virtual (I mean - I'm not trying to convert from the VM).
Source OS = MS Server 2016 essentials on the Lenovo ThinkSystem ST250, with RAID 530-8i controller.
Destination - Microsoft Hyper-V server

On a step "select physical data to convert" - was trying to convert the "entire machine", which was giving me the error.
Tried to select "Physical Disk" - same result.

2/6 13:49:14.145 4460 Facility ???WARNING: P2V::getBuffer: ReadFile - 1. Incorrect function.
2/6 13:49:14.145 4460 Facility ???ERROR: CPPConverting::ConvertImage: Read 3
2/6 13:50:08.237 4460 Facility ???ERROR: CPPConverting::Convert: FAILED


and next attempt was "Disk Volume", to see if it makes any difference. Same error.
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Wed Feb 08, 2023 9:02 am

Can you please test converting a partition as a local device?
Ivan.K
Posts: 5
Joined: Mon Feb 06, 2023 6:51 am

Wed Feb 08, 2023 12:32 pm

Unfortunately, there's not enough space on a local storage.
I tried to create a backup P2V: Disk volume -> Local file, setting the destination for the <local file> on the network share.
It starts the process, creates a file in the given destination of approx. 1Gb size, and then fails with the identical error - "P2V::getBuffer: ReadFile - 1. Incorrect function"
Still makes me think - the problem is in the file system on the source machine.
Still wondering - is there a way to understand which exactly file(s) or sector(s) it fails to read, and is there a way to skip a given file(s) in case I understand it's not a critical system item?
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Wed Feb 08, 2023 1:10 pm

Sadly, there is no way to skip the problematic section of the disk or files.
And, verbose conversion output is not possible. Can you convert the C:\ alone and copy the data volume across the network?

Also, try converting a test VHDX to the destination host just to see if the problem is somewhere between the hosts or inside the source.
Ivan.K
Posts: 5
Joined: Mon Feb 06, 2023 6:51 am

Wed Feb 08, 2023 1:43 pm

>>Sadly, there is no way to skip the problematic section of the disk or files. And, verbose conversion output is not possible.
Very unfortunately. But this answers my question at least in the negative way.

>>Can you convert the C:\ alone and copy the data volume across the network?
the whole array is drive C:, I'm not able to do the backup smaller than 1.3Tb (unfortunately)

Anyhow, thank you so much for your time. Appreciate the prompt responses.
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Fri Feb 10, 2023 11:34 am

You are always welcome!
Can you please try running a conversion for a VHDX from the target server to the destination? This is a different mechanism but helps to understand if there is something in between the servers or locally.
Ivan.K
Posts: 5
Joined: Mon Feb 06, 2023 6:51 am

Fri Feb 10, 2023 9:19 pm

I'm not 100% sure I understand the suggestion.
do you mean - try conversion 'in a backward direction', from the now-destination server to now-source server, to check if there're any issues or this direction it works fine?
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Fri Feb 10, 2023 10:17 pm

You can put the VMDK on the local C:\ and convert it to the destination host (i.e., local file -> a file on the remote system) or another way around.
In other words, you can also try V2V the file the way you suggested just recently.

Thanks!
Post Reply