return 0;
}
+virDomainXMLOptionPtr
+virBhyveDriverCreateXMLConf(bhyveConnPtr driver)
+{
+ virBhyveDriverDomainDefParserConfig.priv = driver;
+ return virDomainXMLOptionNew(&virBhyveDriverDomainDefParserConfig,
+ &virBhyveDriverPrivateDataCallbacks,
+ NULL);
+}
+
virDomainDefParserConfig virBhyveDriverDomainDefParserConfig = {
.devicesPostParseCallback = bhyveDomainDeviceDefPostParse,
.domainPostParseCallback = bhyveDomainDefPostParse,
bhyveMonitorPtr mon;
};
+virDomainXMLOptionPtr virBhyveDriverCreateXMLConf(bhyveConnPtr);
+
extern virDomainXMLPrivateDataCallbacks virBhyveDriverPrivateDataCallbacks;
extern virDomainDefParserConfig virBhyveDriverDomainDefParserConfig;
if (virBhyveProbeGrubCaps(&bhyve_driver->grubcaps) < 0)
goto cleanup;
- if (!(bhyve_driver->xmlopt = virDomainXMLOptionNew(&virBhyveDriverDomainDefParserConfig,
- &virBhyveDriverPrivateDataCallbacks,
- NULL)))
+ if (!(bhyve_driver->xmlopt = virBhyveDriverCreateXMLConf(bhyve_driver)))
goto cleanup;
if (!(bhyve_driver->domains = virDomainObjListNew()))
# include "datatypes.h"
# include "bhyve/bhyve_capabilities.h"
+# include "bhyve/bhyve_domain.h"
# include "bhyve/bhyve_utils.h"
# include "bhyve/bhyve_command.h"
if ((driver.caps = virBhyveCapsBuild()) == NULL)
return EXIT_FAILURE;
- if ((driver.xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL)) == NULL)
+ if ((driver.xmlopt = virBhyveDriverCreateXMLConf(&driver)) == NULL)
return EXIT_FAILURE;
# define DO_TEST_FULL(name, flags) \
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:81:c4:b1'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:b9:94:02'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='4' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:8d:10:e1'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='4' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:92:68:0e'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:1e:63:25'/>
<boot order='1'/>
<address type='drive' controller='0' bus='0' target='4' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:7a:f5:a4'/>
<boot order='1'/>
<address type='drive' controller='0' bus='0' target='4' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:fe:97:82'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:11:bd:26'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:b1:42:eb'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:35:99:c2'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:6f:6a:53'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:e3:ec:9b'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<interface type='bridge'>
<mac address='52:54:00:bc:85:fe'/>
<source bridge='virbr0'/>
<boot order='1'/>
<address type='drive' controller='0' bus='0' target='6' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:f4:6c:be'/>
<boot order='3'/>
<address type='drive' controller='0' bus='0' target='6' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:0e:d2:6f'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:ee:f5:79'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:82:ca:a3'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:22:ee:11'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:ad:55:51'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:a7:cd:5b'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:f0:72:11'/>
<target dev='hda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='2' unit='0'/>
</disk>
+ <controller type='pci' index='0' model='pci-root'/>
<controller type='sata' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:4f:f3:5b'/>
#ifdef WITH_BHYVE
# include "bhyve/bhyve_capabilities.h"
+# include "bhyve/bhyve_domain.h"
# include "bhyve/bhyve_utils.h"
# define VIR_FROM_THIS VIR_FROM_NONE
if ((driver.caps = virBhyveCapsBuild()) == NULL)
return EXIT_FAILURE;
- if ((driver.xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL)) == NULL)
+ if ((driver.xmlopt = virBhyveDriverCreateXMLConf(&driver)) == NULL)
return EXIT_FAILURE;
# define DO_TEST_FULL(name, is_different) \