[libvirt] [PATCH 0/4] parallels: add support of containers

Parallels Cloud Server supports containers together with fully virtualized VMs. Both types of virtual environments managed by prlctl utility using the same commands and options, where possible. This patch series adds new domain type to the driver and handles differences between containers and VMs where it's needed. Dmitry Guryanov (4): parallels: add support of containers to the driver parallels: handle unlimited cpus on containers parallels: fix parallelsDomainDefineXML for existing containers parallels: implement containers creation .gnulib | 2 +- src/parallels/parallels_driver.c | 92 ++++++++++++++++---- .../domain-parallels-ct-simple.xml | 28 ++++++ 3 files changed, 105 insertions(+), 17 deletions(-) create mode 100644 tests/domainschemadata/domain-parallels-ct-simple.xml

This patch makes parallelsLoadDomains to be able to load information about containers. So functions, which return different information and change state will work. parallelsDomainDefineXML will be fixed in separate patch. Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- src/parallels/parallels_driver.c | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index 06a75b3..45a3d82 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -130,6 +130,15 @@ parallelsBuildCapabilities(void) "parallels", NULL, NULL, 0, NULL) == NULL) goto no_memory; + if ((guest = virCapabilitiesAddGuest(caps, "exe", PARALLELS_DEFAULT_ARCH, + 64, "parallels", + NULL, 0, NULL)) == NULL) + goto no_memory; + + if (virCapabilitiesAddGuestDomain(guest, + "parallels", NULL, NULL, 0, NULL) == NULL) + goto no_memory; + caps->defaultConsoleTargetType = parallelsDefaultConsoleType; return caps; @@ -490,8 +499,20 @@ parallelsLoadDomain(parallelsConnPtr privconn, virJSONValuePtr jobj) def->mem.max_balloon <<= 10; def->mem.cur_balloon = def->mem.max_balloon; - if (!(def->os.type = strdup("hvm"))) - goto no_memory; + if (!(tmp = virJSONValueObjectGetString(jobj, "Type"))) { + parallelsParseError(); + goto cleanup; + } + + if (STREQ(tmp, "CT")) { + if (!(def->os.type = strdup("exe"))) + goto no_memory; + if (!(def->os.init = strdup("/sbin/init"))) + goto no_memory; + } else if (STREQ(tmp, "VM")) { + if (!(def->os.type = strdup("hvm"))) + goto no_memory; + } if (!(def->os.arch = strdup(PARALLELS_DEFAULT_ARCH))) goto no_memory; @@ -577,7 +598,7 @@ parallelsLoadDomains(parallelsConnPtr privconn, const char *domain_name) int ret = -1; jobj = parallelsParseOutput(PRLCTL, "list", "-j", "-a", "-i", "-H", - "--vmtype", "vm", domain_name, NULL); + "--vmtype", "all", domain_name, NULL); if (!jobj) { parallelsParseError(); goto cleanup; -- 1.7.1

On Mon, Sep 10, 2012 at 07:22:42PM +0400, Dmitry Guryanov wrote:
This patch makes parallelsLoadDomains to be able to load information about containers. So functions, which return different information and change state will work.
parallelsDomainDefineXML will be fixed in separate patch.
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- src/parallels/parallels_driver.c | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index 06a75b3..45a3d82 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -130,6 +130,15 @@ parallelsBuildCapabilities(void) "parallels", NULL, NULL, 0, NULL) == NULL) goto no_memory;
+ if ((guest = virCapabilitiesAddGuest(caps, "exe", PARALLELS_DEFAULT_ARCH, + 64, "parallels", + NULL, 0, NULL)) == NULL) + goto no_memory; + + if (virCapabilitiesAddGuestDomain(guest, + "parallels", NULL, NULL, 0, NULL) == NULL) + goto no_memory; + caps->defaultConsoleTargetType = parallelsDefaultConsoleType; return caps;
@@ -490,8 +499,20 @@ parallelsLoadDomain(parallelsConnPtr privconn, virJSONValuePtr jobj) def->mem.max_balloon <<= 10; def->mem.cur_balloon = def->mem.max_balloon;
- if (!(def->os.type = strdup("hvm"))) - goto no_memory; + if (!(tmp = virJSONValueObjectGetString(jobj, "Type"))) { + parallelsParseError(); + goto cleanup; + } + + if (STREQ(tmp, "CT")) { + if (!(def->os.type = strdup("exe"))) + goto no_memory; + if (!(def->os.init = strdup("/sbin/init"))) + goto no_memory;
okay so you end up with an hypervisor type of parallels but <os>exe</os> for those kind of domains. That sounds fine.
+ } else if (STREQ(tmp, "VM")) { + if (!(def->os.type = strdup("hvm"))) + goto no_memory; + }
if (!(def->os.arch = strdup(PARALLELS_DEFAULT_ARCH))) goto no_memory; @@ -577,7 +598,7 @@ parallelsLoadDomains(parallelsConnPtr privconn, const char *domain_name) int ret = -1;
jobj = parallelsParseOutput(PRLCTL, "list", "-j", "-a", "-i", "-H", - "--vmtype", "vm", domain_name, NULL); + "--vmtype", "all", domain_name, NULL);
and here you ask to list both kind of domains,
if (!jobj) { parallelsParseError(); goto cleanup;
That sounds right, ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

User may set "unlimited" cpus for containers, which means to take all available cpus on the node. Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- src/parallels/parallels_driver.c | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index 45a3d82..ace75a6 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -468,12 +468,29 @@ parallelsLoadDomain(parallelsConnPtr privconn, virJSONValuePtr jobj) goto cleanup; } - if (virJSONValueObjectGetNumberUint(jobj3, "cpus", &x) < 0) { + if (virJSONValueObjectGetNumberUint(jobj3, "cpus", &x) == 0) { + def->vcpus = x; + def->maxvcpus = x; + } else if ((tmp = virJSONValueObjectGetString(jobj3, "cpus"))) { + if (STREQ(tmp, "unlimited")) { + virNodeInfo nodeinfo; + + if (nodeGetInfo(NULL, &nodeinfo) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Can't get node info")); + goto cleanup; + } + + def->vcpus = nodeinfo.cpus; + def->maxvcpus = def->vcpus; + } else { + parallelsParseError(); + goto cleanup; + } + } else { parallelsParseError(); goto cleanup; } - def->vcpus = x; - def->maxvcpus = x; if (!(jobj3 = virJSONValueObjectGet(jobj2, "memory"))) { parallelsParseError(); -- 1.7.1

On Mon, Sep 10, 2012 at 07:22:43PM +0400, Dmitry Guryanov wrote:
User may set "unlimited" cpus for containers, which means to take all available cpus on the node.
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- src/parallels/parallels_driver.c | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index 45a3d82..ace75a6 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -468,12 +468,29 @@ parallelsLoadDomain(parallelsConnPtr privconn, virJSONValuePtr jobj) goto cleanup; }
- if (virJSONValueObjectGetNumberUint(jobj3, "cpus", &x) < 0) { + if (virJSONValueObjectGetNumberUint(jobj3, "cpus", &x) == 0) { + def->vcpus = x; + def->maxvcpus = x; + } else if ((tmp = virJSONValueObjectGetString(jobj3, "cpus"))) { + if (STREQ(tmp, "unlimited")) { + virNodeInfo nodeinfo; + + if (nodeGetInfo(NULL, &nodeinfo) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Can't get node info")); + goto cleanup; + } + + def->vcpus = nodeinfo.cpus; + def->maxvcpus = def->vcpus; + } else { + parallelsParseError(); + goto cleanup; + } + } else { parallelsParseError(); goto cleanup; } - def->vcpus = x; - def->maxvcpus = x;
if (!(jobj3 = virJSONValueObjectGet(jobj2, "memory"))) { parallelsParseError();
Looks unrelated to the other patches, but fine, ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On 120912 14:08:37, Daniel Veillard wrote:
On Mon, Sep 10, 2012 at 07:22:43PM +0400, Dmitry Guryanov wrote:
User may set "unlimited" cpus for containers, which means to take all available cpus on the node.
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- src/parallels/parallels_driver.c | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index 45a3d82..ace75a6 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -468,12 +468,29 @@ parallelsLoadDomain(parallelsConnPtr privconn, virJSONValuePtr jobj) goto cleanup; }
- if (virJSONValueObjectGetNumberUint(jobj3, "cpus", &x) < 0) { + if (virJSONValueObjectGetNumberUint(jobj3, "cpus", &x) == 0) { + def->vcpus = x; + def->maxvcpus = x; + } else if ((tmp = virJSONValueObjectGetString(jobj3, "cpus"))) { + if (STREQ(tmp, "unlimited")) { + virNodeInfo nodeinfo; + + if (nodeGetInfo(NULL, &nodeinfo) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Can't get node info")); + goto cleanup; + } + + def->vcpus = nodeinfo.cpus; + def->maxvcpus = def->vcpus; + } else { + parallelsParseError(); + goto cleanup; + } + } else { parallelsParseError(); goto cleanup; } - def->vcpus = x; - def->maxvcpus = x;
if (!(jobj3 = virJSONValueObjectGet(jobj2, "memory"))) { parallelsParseError();
Looks unrelated to the other patches, but fine, ACK,
Containers use all CPUs on node by default, and the driver will return error, if there are such containers. So I decided to include this patch in series.
Daniel
-- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

Fix code, which checks what is changed in virDomainDef structure. It looks slightly different for containers and VMs: containers haven't boot devices, but have init path Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- src/parallels/parallels_driver.c | 42 ++++++++++++++++++++++++++++--------- 1 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index ace75a6..fd6ba88 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -1484,24 +1484,46 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new) return -1; } - /* we fill only type and arch fields in parallelsLoadDomain, so - * we can check that all other paramenters are null */ + /* we fill only type and arch fields in parallelsLoadDomain for + * hvm type and also init for containers, so we can check that all + * other paramenters are null and boot devices config is default */ + if (!STREQ_NULLABLE(old->os.type, new->os.type) || !STREQ_NULLABLE(old->os.arch, new->os.arch) || - new->os.machine != NULL || new->os.nBootDevs != 1 || - new->os.bootDevs[0] != VIR_DOMAIN_BOOT_DISK || - new->os.bootmenu != 0 || new->os.init != NULL || - new->os.initargv != NULL || new->os.kernel != NULL || - new->os.initrd != NULL || new->os.cmdline != NULL || - new->os.root != NULL || new->os.loader != NULL || - new->os.bootloader != NULL || new->os.bootloaderArgs != NULL || - new->os.smbios_mode != 0 || new->os.bios.useserial != 0) { + new->os.machine != NULL || new->os.bootmenu != 0 || + new->os.kernel != NULL || new->os.initrd != NULL || + new->os.cmdline != NULL || new->os.root != NULL || + new->os.loader != NULL || new->os.bootloader != NULL || + new->os.bootloaderArgs != NULL || new->os.smbios_mode != 0 || + new->os.bios.useserial != 0) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", _("changing OS parameters is not supported " "by parallels driver")); return -1; } + if (STREQ(new->os.type, "hvm")) { + if (new->os.nBootDevs != 1 || + new->os.bootDevs[0] != VIR_DOMAIN_BOOT_DISK || + new->os.init != NULL || new->os.initargv != NULL) { + + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("changing OS parameters is not supported " + "by parallels driver")); + return -1; + } + } else { + if (new->os.nBootDevs != 0 || + !STREQ_NULLABLE(old->os.init, new->os.init) || + (new->os.initargv != NULL && new->os.initargv[0] != NULL)) { + + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("changing OS parameters is not supported " + "by parallels driver")); + return -1; + } + } + if (!STREQ_NULLABLE(old->emulator, new->emulator)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", -- 1.7.1

On Mon, Sep 10, 2012 at 07:22:44PM +0400, Dmitry Guryanov wrote:
Fix code, which checks what is changed in virDomainDef structure. It looks slightly different for containers and VMs: containers haven't boot devices, but have init path
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- src/parallels/parallels_driver.c | 42 ++++++++++++++++++++++++++++--------- 1 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index ace75a6..fd6ba88 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -1484,24 +1484,46 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new) return -1; }
- /* we fill only type and arch fields in parallelsLoadDomain, so - * we can check that all other paramenters are null */ + /* we fill only type and arch fields in parallelsLoadDomain for + * hvm type and also init for containers, so we can check that all + * other paramenters are null and boot devices config is default */ + if (!STREQ_NULLABLE(old->os.type, new->os.type) || !STREQ_NULLABLE(old->os.arch, new->os.arch) ||
So here you implicitely allow an update where the new os.type or os.arch would be NULL, I assume that any definition in the system should have those set, right ?
- new->os.machine != NULL || new->os.nBootDevs != 1 || - new->os.bootDevs[0] != VIR_DOMAIN_BOOT_DISK || - new->os.bootmenu != 0 || new->os.init != NULL || - new->os.initargv != NULL || new->os.kernel != NULL || - new->os.initrd != NULL || new->os.cmdline != NULL || - new->os.root != NULL || new->os.loader != NULL || - new->os.bootloader != NULL || new->os.bootloaderArgs != NULL || - new->os.smbios_mode != 0 || new->os.bios.useserial != 0) { + new->os.machine != NULL || new->os.bootmenu != 0 || + new->os.kernel != NULL || new->os.initrd != NULL || + new->os.cmdline != NULL || new->os.root != NULL || + new->os.loader != NULL || new->os.bootloader != NULL || + new->os.bootloaderArgs != NULL || new->os.smbios_mode != 0 || + new->os.bios.useserial != 0) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", _("changing OS parameters is not supported " "by parallels driver")); return -1; } + if (STREQ(new->os.type, "hvm")) {
But here you cmpare to new->os.type, which could potentially be NULL at this point. Shouldn't that be changed to old->os.type instead ?
+ if (new->os.nBootDevs != 1 || + new->os.bootDevs[0] != VIR_DOMAIN_BOOT_DISK || + new->os.init != NULL || new->os.initargv != NULL) { + + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("changing OS parameters is not supported " + "by parallels driver")); + return -1; + }
indentation error, here we are closing the second "if"
+ } else { + if (new->os.nBootDevs != 0 || + !STREQ_NULLABLE(old->os.init, new->os.init) || + (new->os.initargv != NULL && new->os.initargv[0] != NULL)) { + + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("changing OS parameters is not supported " + "by parallels driver")); + return -1; + } + } +
if (!STREQ_NULLABLE(old->emulator, new->emulator)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
Postponed with the indentation fix waiting for the 4th patch to be resubmitted, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On 120912 16:14:47, Daniel Veillard wrote:
On Mon, Sep 10, 2012 at 07:22:44PM +0400, Dmitry Guryanov wrote:
Fix code, which checks what is changed in virDomainDef structure. It looks slightly different for containers and VMs: containers haven't boot devices, but have init path
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- src/parallels/parallels_driver.c | 42 ++++++++++++++++++++++++++++--------- 1 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index ace75a6..fd6ba88 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -1484,24 +1484,46 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new) return -1; }
- /* we fill only type and arch fields in parallelsLoadDomain, so - * we can check that all other paramenters are null */ + /* we fill only type and arch fields in parallelsLoadDomain for + * hvm type and also init for containers, so we can check that all + * other paramenters are null and boot devices config is default */ + if (!STREQ_NULLABLE(old->os.type, new->os.type) || !STREQ_NULLABLE(old->os.arch, new->os.arch) ||
So here you implicitely allow an update where the new os.type or os.arch would be NULL, I assume that any definition in the system should have those set, right ?
old->os.type and old->os.arch are always non-NULL, because we set them in parallelsLoadDomain and don't change later. So if new->os.type/arch is NULL or not equal to old - we report error.
- new->os.machine != NULL || new->os.nBootDevs != 1 || - new->os.bootDevs[0] != VIR_DOMAIN_BOOT_DISK || - new->os.bootmenu != 0 || new->os.init != NULL || - new->os.initargv != NULL || new->os.kernel != NULL || - new->os.initrd != NULL || new->os.cmdline != NULL || - new->os.root != NULL || new->os.loader != NULL || - new->os.bootloader != NULL || new->os.bootloaderArgs != NULL || - new->os.smbios_mode != 0 || new->os.bios.useserial != 0) { + new->os.machine != NULL || new->os.bootmenu != 0 || + new->os.kernel != NULL || new->os.initrd != NULL || + new->os.cmdline != NULL || new->os.root != NULL || + new->os.loader != NULL || new->os.bootloader != NULL || + new->os.bootloaderArgs != NULL || new->os.smbios_mode != 0 || + new->os.bios.useserial != 0) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", _("changing OS parameters is not supported " "by parallels driver")); return -1; } + if (STREQ(new->os.type, "hvm")) {
But here you cmpare to new->os.type, which could potentially be NULL at this point. Shouldn't that be changed to old->os.type instead ?
Here we know, that new->os.type is equal to old one, and not NULL.
+ if (new->os.nBootDevs != 1 || + new->os.bootDevs[0] != VIR_DOMAIN_BOOT_DISK || + new->os.init != NULL || new->os.initargv != NULL) { + + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("changing OS parameters is not supported " + "by parallels driver")); + return -1; + }
indentation error, here we are closing the second "if"
+ } else { + if (new->os.nBootDevs != 0 || + !STREQ_NULLABLE(old->os.init, new->os.init) || + (new->os.initargv != NULL && new->os.initargv[0] != NULL)) { + + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("changing OS parameters is not supported " + "by parallels driver")); + return -1; + } + } +
if (!STREQ_NULLABLE(old->emulator, new->emulator)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
Postponed with the indentation fix waiting for the 4th patch to be resubmitted,
Daniel
-- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Wed, Sep 12, 2012 at 04:32:52PM +0400, Dmitry Guryanov wrote:
On 120912 16:14:47, Daniel Veillard wrote:
On Mon, Sep 10, 2012 at 07:22:44PM +0400, Dmitry Guryanov wrote:
Fix code, which checks what is changed in virDomainDef structure. It looks slightly different for containers and VMs: containers haven't boot devices, but have init path
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- src/parallels/parallels_driver.c | 42 ++++++++++++++++++++++++++++--------- 1 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index ace75a6..fd6ba88 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -1484,24 +1484,46 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new) return -1; }
- /* we fill only type and arch fields in parallelsLoadDomain, so - * we can check that all other paramenters are null */ + /* we fill only type and arch fields in parallelsLoadDomain for + * hvm type and also init for containers, so we can check that all + * other paramenters are null and boot devices config is default */ + if (!STREQ_NULLABLE(old->os.type, new->os.type) || !STREQ_NULLABLE(old->os.arch, new->os.arch) ||
So here you implicitely allow an update where the new os.type or os.arch would be NULL, I assume that any definition in the system should have those set, right ?
old->os.type and old->os.arch are always non-NULL, because we set them in parallelsLoadDomain and don't change later. So if new->os.type/arch is NULL or not equal to old - we report error.
Okay
Postponed with the indentation fix waiting for the 4th patch to be resubmitted,
So i have 1-3 in the queue, waiting for the 4th one :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

Add separate function parallelsCreateCt, which creates container. Also add example xml configuration domain-parallels-ct-simple.xml. Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- .gnulib | 2 +- .../domain-parallels-ct-simple.xml | 28 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletions(-) create mode 100644 tests/domainschemadata/domain-parallels-ct-simple.xml diff --git a/.gnulib b/.gnulib index 440a1db..271dd74 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 440a1dbe523e37f206252cb034c3a62f26867e42 +Subproject commit 271dd74fdf54ec2a03e73a5173b0b5697f6088f1 diff --git a/tests/domainschemadata/domain-parallels-ct-simple.xml b/tests/domainschemadata/domain-parallels-ct-simple.xml new file mode 100644 index 0000000..f25721c --- /dev/null +++ b/tests/domainschemadata/domain-parallels-ct-simple.xml @@ -0,0 +1,28 @@ +<domain type='parallels'> + <name>1010</name> + <uuid>88576506-d611-41c2-b6b6-c9043704a0dd</uuid> + <description></description> + <memory unit='KiB'>262144</memory> + <currentMemory unit='KiB'>262144</currentMemory> + <vcpu placement='static'>8</vcpu> + <os> + <type arch='x86_64'>exe</type> + <init>/sbin/init</init> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>destroy</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <filesystem type='template'> + <source name='centos-6-x86_64'/> + <target dir='/'/> + </filesystem> + <video> + <model type='vga' vram='16777216' heads='1'> + <acceleration accel3d='no' accel2d='no'/> + </model> + </video> + </devices> +</domain> + -- 1.7.1

On Mon, Sep 10, 2012 at 07:22:45PM +0400, Dmitry Guryanov wrote:
Add separate function parallelsCreateCt, which creates container. Also add example xml configuration domain-parallels-ct-simple.xml.
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- .gnulib | 2 +- .../domain-parallels-ct-simple.xml | 28 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletions(-) create mode 100644 tests/domainschemadata/domain-parallels-ct-simple.xml
diff --git a/.gnulib b/.gnulib index 440a1db..271dd74 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 440a1dbe523e37f206252cb034c3a62f26867e42 +Subproject commit 271dd74fdf54ec2a03e73a5173b0b5697f6088f1
NACK
diff --git a/tests/domainschemadata/domain-parallels-ct-simple.xml b/tests/domainschemadata/domain-parallels-ct-simple.xml new file mode 100644 index 0000000..f25721c --- /dev/null +++ b/tests/domainschemadata/domain-parallels-ct-simple.xml @@ -0,0 +1,28 @@ +<domain type='parallels'> + <name>1010</name> + <uuid>88576506-d611-41c2-b6b6-c9043704a0dd</uuid> + <description></description> + <memory unit='KiB'>262144</memory> + <currentMemory unit='KiB'>262144</currentMemory> + <vcpu placement='static'>8</vcpu> + <os> + <type arch='x86_64'>exe</type> + <init>/sbin/init</init> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>destroy</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <filesystem type='template'> + <source name='centos-6-x86_64'/> + <target dir='/'/> + </filesystem> + <video> + <model type='vga' vram='16777216' heads='1'> + <acceleration accel3d='no' accel2d='no'/> + </model> + </video> + </devices> +</domain> +
That patch has a problem, it doesn't carry the expected code in domain parsing but on the other hand include a gnulib version rebase, please fix and repost, I'm keeping your patch 1, 2 and 3 (amended with the indentation fix in a local git branch), if you can send me a correct 4/4 then i will review and push the set :-) thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On 120912 14:33:21, Daniel Veillard wrote:
On Mon, Sep 10, 2012 at 07:22:45PM +0400, Dmitry Guryanov wrote:
Add separate function parallelsCreateCt, which creates container. Also add example xml configuration domain-parallels-ct-simple.xml.
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> --- .gnulib | 2 +- .../domain-parallels-ct-simple.xml | 28 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletions(-) create mode 100644 tests/domainschemadata/domain-parallels-ct-simple.xml
diff --git a/.gnulib b/.gnulib index 440a1db..271dd74 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 440a1dbe523e37f206252cb034c3a62f26867e42 +Subproject commit 271dd74fdf54ec2a03e73a5173b0b5697f6088f1
NACK
diff --git a/tests/domainschemadata/domain-parallels-ct-simple.xml b/tests/domainschemadata/domain-parallels-ct-simple.xml new file mode 100644 index 0000000..f25721c --- /dev/null +++ b/tests/domainschemadata/domain-parallels-ct-simple.xml @@ -0,0 +1,28 @@ +<domain type='parallels'> + <name>1010</name> + <uuid>88576506-d611-41c2-b6b6-c9043704a0dd</uuid> + <description></description> + <memory unit='KiB'>262144</memory> + <currentMemory unit='KiB'>262144</currentMemory> + <vcpu placement='static'>8</vcpu> + <os> + <type arch='x86_64'>exe</type> + <init>/sbin/init</init> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>destroy</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <filesystem type='template'> + <source name='centos-6-x86_64'/> + <target dir='/'/> + </filesystem> + <video> + <model type='vga' vram='16777216' heads='1'> + <acceleration accel3d='no' accel2d='no'/> + </model> + </video> + </devices> +</domain> +
That patch has a problem, it doesn't carry the expected code in domain parsing but on the other hand include a gnulib version rebase,
please fix and repost, I'm keeping your patch 1, 2 and 3 (amended with the indentation fix in a local git branch), if you can send me a correct 4/4 then i will review and push the set :-)
thanks !
Sorry, the parallels_driver.c patch has lost somewhere, I'll sent the corrert version.
Daniel
-- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
Dmitry Guryanov