我正在使用 Hyper-V WMI 提供程序 在 Hyper-V 中导入虚拟机,特别是使用 ImportVirtualSystemEx 方法rel="nofollow">Msvm_VirtualSystemManagementService
类,主要使用 MS 提供的 C# 代码片段。
我需要在导入后立即使用 CreateVirtualSystemSnapshot
方法,但我不知道如何在 Hyper 中已导入的所有其他虚拟机中识别新导入的虚拟机 -V。
我希望从 ImportVirtualSystemEx
方法中得到一些信息,但情况似乎并非如此。
有什么线索吗?
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?
发布评论
评论(1)
我刚刚意识到
Msvm_VirtualSystemImportSettingData
使用<创建的类导入期间的 code>GetVirtualSystemImportSettingData 方法包含我需要的所有信息。I just realised that the
Msvm_VirtualSystemImportSettingData
class that is created using theGetVirtualSystemImportSettingData
method during import contains all the information I need.