문제

I'm using the Hyper-V WMI Provider to import virtual machines in Hyper-V, specifically using the ImportVirtualSystemEx method of the Msvm_VirtualSystemManagementService class, largely using the C# code snippets provided by MS.

I need to create a snapshot immediately after import, using the CreateVirtualSystemSnapshot method, but I can't figure out how to identify the newly imported virtual machine among all the other virtual machines that have already been imported in Hyper-V.

I was hoping to get something back from the ImportVirtualSystemEx method, but that doesn't seem to be the case.

Any clues?

도움이 되었습니까?

해결책

I just realised that the Msvm_VirtualSystemImportSettingData class that is created using the GetVirtualSystemImportSettingData method during import contains all the information I need.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top