commit 56945e1374bd254148643d76a98fba9be67fba15 Author: Chunyan Liu Date: Thu Sep 17 01:15:22 2015 -0400 libxl: fix AttachDeviceConfig on hostdev type After attach-device a with --config, new device doesn't show up in dumpxml and in guest. To fix that, set dev->data.hostdev = NULL after work so that the pointer is not freed, since vmdef has the pointer and still need it. Signed-off-by: Chunyan Liu Index: libvirt-1.2.19/src/libxl/libxl_driver.c =================================================================== --- libvirt-1.2.19.orig/src/libxl/libxl_driver.c +++ libvirt-1.2.19/src/libxl/libxl_driver.c @@ -3311,6 +3311,7 @@ libxlDomainAttachDeviceConfig(virDomainD if (virDomainHostdevInsert(vmdef, hostdev) < 0) return -1; + dev->data.hostdev = NULL; break; default: