K
kbarto
Guest
Hello,
Can anyone help me with creating virtual iSCSI controller and assigning it to virtual machine using WMI? I need it because I want to create virtual machine with controller attached to it. As far as I can understand this issue i need to create iscsi setting data, but I can't find any reference on which wmi class to use? This is what I am trying to do and It's not working :
ManagementClass scsiClass =
new ManagementClass(@"root\virtualization\v2:Msvm_SCSIProtocolController");
ManagementObject scsiData = scsiClass.CreateInstance();
string[] resourceSettings = new string[3];
// Memory settings.
resourceSettings[0] = memorySettingData.GetText(TextFormat.CimDtd20);
// Processor settings.
resourceSettings[1] = processorSettingData.GetText(TextFormat.CimDtd20);
// Add SCSI
resourceSettings[2] = scsiData.GetText(TextFormat.CimDtd20);
If I remove "scsiData" then virtual machine creates successfully, any help please?
Documentation : Hyper-V WMI provider (V2) - Windows applications
Continue reading...
Can anyone help me with creating virtual iSCSI controller and assigning it to virtual machine using WMI? I need it because I want to create virtual machine with controller attached to it. As far as I can understand this issue i need to create iscsi setting data, but I can't find any reference on which wmi class to use? This is what I am trying to do and It's not working :
ManagementClass scsiClass =
new ManagementClass(@"root\virtualization\v2:Msvm_SCSIProtocolController");
ManagementObject scsiData = scsiClass.CreateInstance();
string[] resourceSettings = new string[3];
// Memory settings.
resourceSettings[0] = memorySettingData.GetText(TextFormat.CimDtd20);
// Processor settings.
resourceSettings[1] = processorSettingData.GetText(TextFormat.CimDtd20);
// Add SCSI
resourceSettings[2] = scsiData.GetText(TextFormat.CimDtd20);
If I remove "scsiData" then virtual machine creates successfully, any help please?
Documentation : Hyper-V WMI provider (V2) - Windows applications
Continue reading...