regarding configuration to be used to create a VM

Hi All, We are interested to create/delete/update a VM using libvirt-CIM. Could you please help us to understand what is the standard/common format to be used as input for the libvirt-cim to create a VIM? Can we use OVF to create a VM? If so, are there any libraries which can convert OVF file to libvirt understandable xml format and vice versa? Thanks in advance for your help. Best Regards Raghu

libvirt-cim is used as a bridge to convert standard CIM model call to libvirt functions, here is a example to make a call to create a VM. You can modify it with your resource settings(such as image place,name), save it to a xml file, and using "wbemexec" tool to give a try, such as wbemexec create_vm.xml. Not sure if there is a lib converting OVF files. <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="4711" PROTOCOLVERSION="1.0"> <SIMPLEREQ> <METHODCALL NAME="DefineSystem"> <LOCALINSTANCEPATH> <LOCALNAMESPACEPATH> <NAMESPACE NAME="root"></NAMESPACE><NAMESPACE NAME="virt"></NAMESPACE> </LOCALNAMESPACEPATH> <INSTANCENAME CLASSNAME="KVM_VirtualSystemManagementService"> <KEYBINDING NAME="CreationClassName"><KEYVALUE VALUETYPE="string">KVM_VirtualSystemManagementService</KEYVALUE></KEYBINDING> <KEYBINDING NAME="Name"><KEYVALUE VALUETYPE="string">Management Service</KEYVALUE></KEYBINDING> <KEYBINDING NAME="SystemCreationClassName"><KEYVALUE VALUETYPE="string">KVM_HostSystem</KEYVALUE></KEYBINDING> <KEYBINDING NAME="SystemName"><KEYVALUE VALUETYPE="string">RedHat62GAWSWenchao</KEYVALUE></KEYBINDING> </INSTANCENAME> </LOCALINSTANCEPATH> <PARAMVALUE NAME="SystemSettings" PARAMTYPE="string"> <VALUE> instance of KVM_VirtualSystemSettingData { VirtualSystemIdentifier ="test_created_vm"; }; </VALUE> </PARAMVALUE> <PARAMVALUE NAME="ResourceSettings" PARAMTYPE="string"> <VALUE.ARRAY> <VALUE> instance of KVM_DiskResourceAllocationSettingData { VirtualDevice = "hda"; Address = "/var/lib/libvirt/images/test_created_vm.img"; EmulatedType = 0; BusType = "ide"; DriverName = "qemu"; DriverType = "qcow2"; DriverCache = "none"; }; </VALUE> <VALUE> instance of KVM_DiskResourceAllocationSettingData { VirtualDevice = "hdb"; Address = "/var/lib/libvirt/images/test_created_vm_raw.img"; EmulatedType = 0; BusType = "ide"; DriverName = "qemu"; DriverType = "raw"; DriverCache = "none"; }; </VALUE> <VALUE> instance of KVM_ProcResourceAllocationSettingData { VirtualQuantity = 1; }; </VALUE> </VALUE.ARRAY> </PARAMVALUE> </METHODCALL> </SIMPLEREQ> </MESSAGE> </CIM> ------------------ Best Regards Wenchao Xia 2012-07-09 ------------------------------------------------------------- 发件人:"Raghunatha Reddy P (raghunp)" <raghunp@cisco.com> 发送日期:2012-07-09 14:11 收件人:libvirt-cim@redhat.com 抄送: 主题:[Libvirt-cim] regarding configuration to be used to create a VM Hi All, We are interested to create/delete/update a VM using libvirt-CIM. Could you please help us to understand what is the standard/common format to be used as input for the libvirt-cim to create a VIM? Can we use OVF to create a VM? If so, are there any libraries which can convert OVF file to libvirt understandable xml format and vice versa? Thanks in advance for your help. Best Regards Raghu _______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
participants (2)
-
Raghunatha Reddy P (raghunp)
-
xiaxia347work