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 转化成vmx
vmx转化成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
移动互联网事业部
东软集团股份有限公司
 

---------------------------------------------------------------------------------------------------
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.
---------------------------------------------------------------------------------------------------