[PATCH] Relax permissions on schema install temporary directory
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1206375916 25200
# Node ID 6cc2fd98582341e8a5068efaa19fb6dc2f61c140
# Parent ff7434bc724db507c23a8c4f9628d82dcae44ec7
Relax permissions on schema install temporary directory
This eliminates a failure if the pegasus utilities are setuid to the
Pegasus user
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r ff7434bc724d -r 6cc2fd985823 base_schema/install_base_schema.sh.in
--- a/base_schema/install_base_schema.sh.in Fri Mar 21 09:40:51 2008 -0700
+++ b/base_schema/install_base_schema.sh.in Mon Mar 24 09:25:16 2008 -0700
@@ -6,6 +6,7 @@ SCHEMA_VERSION="2.16"
SCHEMA_VERSION="2.16"
TMPDIR=$(mktemp -d /tmp/cim_schema.XXXXX)
+chmod a+x $TMPDIR
if [ ! -z "$CIM_DEBUG" ]; then
set -x
16 years, 9 months
[PATCH] Add kernel/initrd support to Xen_VSSD
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1206117651 25200
# Node ID ff7434bc724db507c23a8c4f9628d82dcae44ec7
# Parent 6c2d68b9722a23a94075172270acffad1bbbad6f
Add kernel/initrd support to Xen_VSSD
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 6c2d68b9722a -r ff7434bc724d schema/VSSD.mof
--- a/schema/VSSD.mof Fri Mar 21 08:29:49 2008 -0700
+++ b/schema/VSSD.mof Fri Mar 21 09:40:51 2008 -0700
@@ -15,6 +15,12 @@ class Xen_VirtualSystemSettingData : CIM
"para-virtualized mode")]
string Bootloader;
string BootloaderArgs;
+
+ [Description ("The direct-boot kernel for PV guests not using a bootloader")]
+ string Kernel;
+
+ [Description ("The direct-boot ramdisk for PV guests not using a bootloader")]
+ string Ramdisk;
[Description ("The device to boot from when in fully-virtualized mode."
"One of hd,fd,cdrom.")]
diff -r 6c2d68b9722a -r ff7434bc724d src/Virt_VSSD.c
--- a/src/Virt_VSSD.c Fri Mar 21 08:29:49 2008 -0700
+++ b/src/Virt_VSSD.c Fri Mar 21 09:40:51 2008 -0700
@@ -70,6 +70,16 @@ static void _set_pv_prop(struct domain *
if (dominfo->bootloader_args != NULL)
CMSetProperty(inst, "BootloaderArgs",
(CMPIValue *)dominfo->bootloader_args,
+ CMPI_chars);
+
+ if (dominfo->os_info.pv.kernel != NULL)
+ CMSetProperty(inst, "Kernel",
+ (CMPIValue *)dominfo->os_info.pv.kernel,
+ CMPI_chars);
+
+ if (dominfo->os_info.pv.initrd != NULL)
+ CMSetProperty(inst, "Ramdisk",
+ (CMPIValue *)dominfo->os_info.pv.initrd,
CMPI_chars);
}
diff -r 6c2d68b9722a -r ff7434bc724d src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Fri Mar 21 08:29:49 2008 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Fri Mar 21 09:40:51 2008 -0700
@@ -90,19 +90,33 @@ static int xenpv_vssd_to_domain(CMPIInst
domain->type = DOMAIN_XENPV;
+ free(domain->bootloader);
ret = cu_get_str_prop(inst, "Bootloader", &val);
- if (ret != CMPI_RC_OK)
- val = "";
-
- free(domain->bootloader);
- domain->bootloader = strdup(val);
-
+ if (ret == CMPI_RC_OK)
+ domain->bootloader = strdup(val);
+ else
+ domain->bootloader = NULL;
+
+ free(domain->bootloader_args);
ret = cu_get_str_prop(inst, "BootloaderArgs", &val);
- if (ret != CMPI_RC_OK)
- val = "";
-
- free(domain->bootloader_args);
- domain->bootloader_args = strdup(val);
+ if (ret == CMPI_RC_OK)
+ domain->bootloader_args = strdup(val);
+ else
+ domain->bootloader_args = NULL;
+
+ free(domain->os_info.pv.kernel);
+ ret = cu_get_str_prop(inst, "Kernel", &val);
+ if (ret == CMPI_RC_OK)
+ domain->os_info.pv.kernel = strdup(val);
+ else
+ domain->os_info.pv.kernel = NULL;
+
+ free(domain->os_info.pv.initrd);
+ ret = cu_get_str_prop(inst, "Ramdisk", &val);
+ if (ret == CMPI_RC_OK)
+ domain->os_info.pv.initrd = strdup(val);
+ else
+ domain->os_info.pv.initrd = NULL;
return 1;
}
16 years, 9 months
[PATCH 0 of 2] Implement restart-style migration
by Dan Smith
Adds restart migration, which shuts down a guest, moves the config to a remote
host, and then restarts the domain.
Also includes a fix to domain_online()
This seems like a pretty effective and safe way to move a guest around if
you don't need it to stay up in the process.
16 years, 9 months
State of libvirt-cim project
by Mellquist, Peter
Hello,
I am interested in the current status of this project.
Is Xen the only hypervisor supported at this point?
What DMTF virtualization profiles are currently complete?, which ones are not?
What level of testing / verification exists?
Are both OpenPegasus and SFCB fully supported?
What areas of contribution are needed?
Thanks and sorry for all the questions.
Peter
Peter Mellquist
Hewlett-Packard Company
Open Source and Linux Organization
peter.mellquist(a)hp.com
16 years, 9 months
[PATCH 0 of 2] Add first bits of LXC support
by Dan Smith
This set adds very preliminary support to libvirt-cim for LXC guests. Added
are changes to the ComputerSystem, HostSystem, and VSSD schema as well as the
change required to make misc_utils capable of generation lxc:// URIs.
16 years, 9 months
[PATCH] Document the Type values in MSD's schema
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1206044037 25200
# Node ID 594c9195e59c8025ea18b3d6b5ca43b322db55e1
# Parent 205b3e4958957713fd45a211c6229f09af19e243
Document the Type values in MSD's schema
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 205b3e495895 -r 594c9195e59c schema/VSMigrationSettingData.mof
--- a/schema/VSMigrationSettingData.mof Thu Mar 20 11:28:31 2008 -0700
+++ b/schema/VSMigrationSettingData.mof Thu Mar 20 13:13:57 2008 -0700
@@ -1,6 +1,20 @@
// Copyright IBM Corp. 2007
class CIM_VirtualSystemMigrationSettingData : CIM_SettingData {
+ [ Description(
+ "MigrationType describes a type of migration operation "
+ "to be performed.\n"
+ "A value of 2 - Virtual System is to be migrated in a 'live' "
+ "manner such that the running of the Virtual System is "
+ "minimally impacted during the move.\n"
+ "A value of 3 - Virtual System will be temporarily paused "
+ "prior to migration and then resume running after it is "
+ "moved.\n"
+ "A value of 4 - The Virtual System will be quiesced to a "
+ "stopped state prior to migration and then restarted after "
+ "it is moved."),
+ ValueMap {"0","1","2","3","4"},
+ Values { "Unknown", "Other", "Live", "Resume", "Restart" }]
uint16 MigrationType;
uint16 Priority;
16 years, 9 months
[PATCH] Make IsMigratable return "not migratable" instead of error, unless an error
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1206037711 25200
# Node ID 205b3e4958957713fd45a211c6229f09af19e243
# Parent c8c0e264c75cccccb40ff0de1cfdfc7a14c3d65a
Make IsMigratable return "not migratable" instead of error, unless an error
really occurred. Log the failure of an individual check for tracking down
an error. It really seems that a status message return value to indicate
*why* something isn't migratable.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r c8c0e264c75c -r 205b3e495895 src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Thu Mar 20 10:47:48 2008 -0700
+++ b/src/Virt_VSMigrationService.c Thu Mar 20 11:28:31 2008 -0700
@@ -523,6 +523,14 @@ static char *get_parms_file(const CMPIOb
return NULL;
}
+static void log_status(CMPIStatus *s, const char *prefix)
+{
+ CU_DEBUG("%s: %s", prefix, CMGetCharPtr(s->msg));
+
+ s->rc = CMPI_RC_OK;
+ s->msg = NULL;
+}
+
static CMPIStatus vs_migratable(const CMPIObjectPath *ref,
CMPIObjectPath *system,
const char *destination,
@@ -557,8 +565,10 @@ static CMPIStatus vs_migratable(const CM
goto out;
s = check_hver(conn, dconn);
- if (s.rc != CMPI_RC_OK)
- goto out;
+ if (s.rc != CMPI_RC_OK) {
+ log_status(&s, "Hypervisor version check failed");
+ goto out;
+ }
dom = virDomainLookupByName(conn, domain);
if (dom == NULL) {
@@ -574,13 +584,17 @@ static CMPIStatus vs_migratable(const CM
goto out;
s = check_caps(conn, dconn);
- if (s.rc != CMPI_RC_OK)
- goto out;
+ if (s.rc != CMPI_RC_OK) {
+ log_status(&s, "Hypervisor capabilities check failed");
+ goto out;
+ }
path = get_parms_file(ref, argsin);
s = call_external_checks(dom, path);
- if (s.rc != CMPI_RC_OK)
- goto out;
+ if (s.rc != CMPI_RC_OK) {
+ log_status(&s, "An external check failed");
+ goto out;
+ }
retcode = CIM_SVPC_RETURN_COMPLETED;
cu_statusf(_BROKER, &s,
16 years, 9 months
[PATCH] Revert VirtualSystemType change from ComputerSystem
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1205953799 25200
# Node ID bca26ef36f5c53123f43113c4f0564dc06f715fe
# Parent 7c94914c7796139bb6afd9a64acde9558216affe
Revert VirtualSystemType change from ComputerSystem
I misread the profile while writing the previous patch up. This is
already done correctly in our VSSD. My bad.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 7c94914c7796 -r bca26ef36f5c src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Tue Mar 18 13:29:54 2008 -0700
+++ b/src/Virt_ComputerSystem.c Wed Mar 19 12:09:59 2008 -0700
@@ -301,35 +301,6 @@ static int set_other_id_info(const CMPIB
return 1;
}
-static bool set_type(CMPIInstance *instance)
-{
- CMPIObjectPath *op;
- CMPIStatus s;
- char *prefix = NULL;
- bool rc = false;
-
- op = CMGetObjectPath(instance, &s);
- if ((s.rc != CMPI_RC_OK) || (op == NULL)) {
- CU_DEBUG("Failed to get OP from CS instance to set type");
- goto out;
- }
-
- prefix = class_prefix_name(CLASSNAME(op));
- if (prefix == NULL) {
- CU_DEBUG("Unknown prefix for class: %s", CLASSNAME(op));
- goto out;
- }
-
- CMSetProperty(instance, "VirtualSystemType",
- prefix, CMPI_chars);
-
- rc = true;
- out:
- free(prefix);
-
- return rc;
-}
-
/* Populate an instance with information from a domain */
static CMPIStatus set_properties(const CMPIBroker *broker,
virDomainPtr dom,
@@ -366,10 +337,6 @@ static CMPIStatus set_properties(const C
if (!set_other_id_info(broker, uuid, prefix, instance)) {
/* Print trace error */
- goto out;
- }
-
- if (!set_type(instance)) {
goto out;
}
16 years, 9 months