[libvirt-users] virsh define function question

Hi, How do I view the libvirt virsh domxml-to-native function implementation? I think this function contains some error. Because we use libvirt to manage some host and vms on vmware hypervisor. We use openenbula generate a template for libvirt ,such as my attachment windows2008.xml. but when i use domxml-to-native to convert xml file to vmware config file vmx as below. This may not be accurate. For example: 1. guestOs type : could I config this parameter in xml file ,so after domxml-to-native to vmware.vmx , guestOS in my vmx file is "windows7srv-64 ". And also my pciBridge disappeared ! So could someone help me and tell us about 'virsh-c the esx :/ /@host?no_verify=1 define windows2008.xml' function realization。 Thanks all! virsh # domxml-to-native vmware-vmx windows2008.xml .encoding = "UTF-8" config.version = "8" virtualHW.version = "7" guestOS = "other-64" uuid.bios = "42 11 25 27 fd b6 7b 6d-72 3f 75 c6 25 fe ef 3e" displayName = "windows2008" memsize = "2048" numvcpus = "2" sched.cpu.shares = "normal" ide0:0.present = "true" ide0:0.deviceType = "ata-hardDisk" ide0:0.fileName = "/vmfs/volumes/349969f9-070dee8d/./windows2008.vmdk" floppy0.present = "false" floppy1.present = "false" ethernet0.present = "true" ethernet0.virtualDev = "e1000" ethernet0.networkName = "VM Network" ethernet0.connectionType = "bridged" ethernet0.addressType = "vpx" ethernet0.generatedAddress = "00:50:56:91:00:07" svga.vramSize = "8388608" zhanggp --------------------------------------------------------------------------------------------------- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. ---------------------------------------------------------------------------------------------------

On 07/19/2012 01:01 AM, zhanggp wrote:
Hi, How do I view the libvirt virsh domxml-to-native function implementation?
Do you mean the virsh implementation (which just calls the API, and works), or the qemu driver implementation (which is where you are encountering the problems)?
I think this function contains some error.
I would not be surprised if domxml-from-native had bugs - that area of the qemu driver (src/qemu/qemu_command.c) has been historically under-maintained; but domxml-to-native should just work (because it's how we create the qemu command line that starts your guest).
Because we use libvirt to manage some host and vms on vmware hypervisor.
Oh, you're using vmware, not qemu (I guess I should read the whole email first :) In that case, the code would be in src/vmware/vmware_driver.c; but while I see .domainXMLFromNative implemented for vmware as of 0.9.11, no one has yet implemented .domainXMLToNative for vmware. Patches welcome.
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
This is a publicly archived list; your employer's disclaimer is unenforceable here. It is considered better netiquette to post from a personal account that won't spam the list with legalese disclaimers. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
zhanggp