张光鹏
2012-Jul-24 01:53 UTC
[libvirt-users] libvirt shortcomings of virsh domxml-to-native and domxml-from-native
Hi,all. we use libvirt to manage some host and vms on vmware hypervisor.I have found the libvirt there are some shortcomings . Such as virsh domxml-to-native and domxml-from-native .I have reviewed the libvirt source --src/vmx/vmx.c, code as follows : libvirt0.9.13??xml ???vmxvmx???xml /* def:os.arch -> vmx:guestOS */ if (def->os.arch == NULL || STRCASEEQ(def->os.arch, "i686")) { virBufferAddLit(&buffer, "guestOS = \"other\"\n"); } else if (STRCASEEQ(def->os.arch, "x86_64")) { virBufferAddLit(&buffer, "guestOS = \"other-64\"\n"); } else { VMX_ERROR(VIR_ERR_INTERNAL_ERROR, _("Expecting domain XML attribute 'arch' of entry 'os/type' " "to be 'i686' or 'x86_64' but found '%s'"), def->os.arch); goto cleanup; }/* vmx:guestOS -> def:os.arch */ if (virVMXGetConfigString(conf, "guestOS", &guestOS, true) < 0) { goto cleanup; } if (guestOS != NULL && virFileHasSuffix(guestOS, "-64")) { def->os.arch = strdup("x86_64"); } else { def->os.arch = strdup("i686"); } if (def->os.arch == NULL) { virReportOOMError(); goto cleanup; } Vmware support many guestOS types like "windows7srv-64 ",If I use 64-bit Windows virtual machine, other-64 this type is not correct. NIC e1000 system can not be used . So I suggest to The libvirt improve the vmware support, especially the mutual transformation of the xml and vmx format guestOS only one parameter. Thanks all. ??? tel: 13718913184 mail: zhanggp at neusoft.com ???????? ?????????? http://www.neusoft.com --------------------------------------------------------------------------------------------------- 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. --------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120724/46e44b3f/attachment.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: 11635_??20??????logo(0(01-16-12-08-11).jpg Type: image/jpeg Size: 11635 bytes Desc: not available URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120724/46e44b3f/attachment.jpg>
张光鹏
2012-Jul-25 03:24 UTC
[libvirt-users] libvirt shortcomings of virsh domxml-to-native and domxml-from-native
Hi,all. we use libvirt to manage some host and vms on vmware hypervisor.I have found the libvirt there are some shortcomings . Such as virsh domxml-to-native and domxml-from-native .I have reviewed the libvirt source --src/vmx/vmx.c, code as follows : libvirt0.9.13??xml ???vmxvmx???xml /* def:os.arch -> vmx:guestOS */ if (def->os.arch == NULL || STRCASEEQ(def->os.arch, "i686")) { virBufferAddLit(&buffer, "guestOS = \"other\"\n"); } else if (STRCASEEQ(def->os.arch, "x86_64")) { virBufferAddLit(&buffer, "guestOS = \"other-64\"\n"); } else { VMX_ERROR(VIR_ERR_INTERNAL_ERROR, _("Expecting domain XML attribute 'arch' of entry 'os/type' " "to be 'i686' or 'x86_64' but found '%s'"), def->os.arch); goto cleanup; }/* vmx:guestOS -> def:os.arch */ if (virVMXGetConfigString(conf, "guestOS", &guestOS, true) < 0) { goto cleanup; } if (guestOS != NULL && virFileHasSuffix(guestOS, "-64")) { def->os.arch = strdup("x86_64"); } else { def->os.arch = strdup("i686"); } if (def->os.arch == NULL) { virReportOOMError(); goto cleanup; } Vmware support many guestOS types like "windows7srv-64 ",If I use 64-bit Windows virtual machine, other-64 this type is not correct. NIC e1000 system can not be used . So I suggest to The libvirt improve the vmware support, especially the mutual transformation of the xml and vmx format guestOS only one parameter. Thanks all. ??? tel: 13718913184 mail: zhanggp at neusoft.com ???????? ?????????? http://www.neusoft.com --------------------------------------------------------------------------------------------------- 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. --------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120725/910cc764/attachment.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: 11635_??20??????(07-25-11-23-56).jpg Type: image/jpeg Size: 11635 bytes Desc: not available URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120725/910cc764/attachment.jpg>