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?
我刚刚意识到,在导入期间使用GetVirtualSystemImportSettingData
方法创建的Msvm_VirtualSystemImportSettingData
类包含我需要的所有信息。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.