---
diff from v1.
Remove call of vzDomainSuspend() in case of VIR_DOMAIN_START_PAUSED flag is set.
Now we don't support to create instance in stopped state.
src/vz/vz_driver.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index ea1090a..4498e01 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -979,6 +979,29 @@ vzDomainUndefine(virDomainPtr domain)
return vzDomainUndefineFlags(domain, 0);
}
+static virDomainPtr
+vzDomainCreateXML(virConnectPtr conn,
+ const char *xml,
+ unsigned int flags)
+{
+ virDomainPtr domain;
+ int ret;
+
+ virCheckFlags(0, NULL);
+
+ domain = vzDomainDefineXMLFlags(conn, xml, 0);
+ if (domain == NULL)
+ return domain;
+
+ ret = vzDomainCreate(domain);
+ if (ret != 0) {
+ vzDomainUndefine(domain);
+ return NULL;
+ }
+
+ return domain;
+}
+
static int
vzDomainHasManagedSaveImage(virDomainPtr domain, unsigned int flags)
{
@@ -1493,6 +1516,7 @@ static virHypervisorDriver vzDriver = {
.domainShutdown = vzDomainShutdown, /* 0.10.0 */
.domainCreate = vzDomainCreate, /* 0.10.0 */
.domainCreateWithFlags = vzDomainCreateWithFlags, /* 1.2.10 */
+ .domainCreateXML = vzDomainCreateXML, /* 1.2.22 */
.domainReboot = vzDomainReboot, /* 1.3.0 */
.domainDefineXML = vzDomainDefineXML, /* 0.10.0 */
.domainDefineXMLFlags = vzDomainDefineXMLFlags, /* 1.2.12 */
--
1.8.3.1