[PATCH] Fix LXC connection uri, remove default graphics device

# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1250619499 25200 # Node ID b15ece6f581dd1372261edd782f41411d1a90652 # Parent 4ceb7a25fdfe0ff4ab994d151e3e98ba70ac5e05 Fix LXC connection uri, remove default graphics device Using "lxc:///system" for the connection uri used to work, but it is no longer valid. Containers guests do not support <graphics> devices. Older versions of libvirt didn't do strict checking of guest XMLs, but this has been changed in newer versions. Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r 4ceb7a25fdfe -r b15ece6f581d libxkutil/misc_util.c --- a/libxkutil/misc_util.c Tue Aug 18 11:18:18 2009 -0700 +++ b/libxkutil/misc_util.c Tue Aug 18 11:18:19 2009 -0700 @@ -50,7 +50,7 @@ else if (STARTS_WITH(classname, "KVM")) return "qemu:///system"; else if (STARTS_WITH(classname, "LXC")) - return "lxc:///system"; + return "lxc:///"; else return NULL; } diff -r 4ceb7a25fdfe -r b15ece6f581d src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Tue Aug 18 11:18:18 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Tue Aug 18 11:18:19 2009 -0700 @@ -323,6 +323,9 @@ static bool default_graphics_device(struct domain *domain) { + if (domain->type == DOMAIN_LXC) + return true; + free(domain->dev_graphics); domain->dev_graphics = calloc(1, sizeof(*domain->dev_graphics)); if (domain->dev_graphics == NULL) { @@ -946,8 +949,6 @@ return net_rasd_to_vdev(inst, dev, ns); } else if (type == CIM_RES_TYPE_PROC) { return lxc_proc_rasd_to_vdev(inst, dev); - } else if (type == CIM_RES_TYPE_GRAPHICS) { - return graphics_rasd_to_vdev(inst, dev); } else if (type == CIM_RES_TYPE_INPUT) { return input_rasd_to_vdev(inst, dev); }

+1 On 08/18/2009 03:18 PM, Kaitlin Rupert wrote:
# HG changeset patch # User Kaitlin Rupert<karupert@us.ibm.com> # Date 1250619499 25200 # Node ID b15ece6f581dd1372261edd782f41411d1a90652 # Parent 4ceb7a25fdfe0ff4ab994d151e3e98ba70ac5e05 Fix LXC connection uri, remove default graphics device
Using "lxc:///system" for the connection uri used to work, but it is no longer valid.
Containers guests do not support<graphics> devices. Older versions of libvirt didn't do strict checking of guest XMLs, but this has been changed in newer versions.
Signed-off-by: Kaitlin Rupert<karupert@us.ibm.com>
diff -r 4ceb7a25fdfe -r b15ece6f581d libxkutil/misc_util.c --- a/libxkutil/misc_util.c Tue Aug 18 11:18:18 2009 -0700 +++ b/libxkutil/misc_util.c Tue Aug 18 11:18:19 2009 -0700 @@ -50,7 +50,7 @@ else if (STARTS_WITH(classname, "KVM")) return "qemu:///system"; else if (STARTS_WITH(classname, "LXC")) - return "lxc:///system"; + return "lxc:///"; else return NULL; } diff -r 4ceb7a25fdfe -r b15ece6f581d src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Tue Aug 18 11:18:18 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Tue Aug 18 11:18:19 2009 -0700 @@ -323,6 +323,9 @@
static bool default_graphics_device(struct domain *domain) { + if (domain->type == DOMAIN_LXC) + return true; + free(domain->dev_graphics); domain->dev_graphics = calloc(1, sizeof(*domain->dev_graphics)); if (domain->dev_graphics == NULL) { @@ -946,8 +949,6 @@ return net_rasd_to_vdev(inst, dev, ns); } else if (type == CIM_RES_TYPE_PROC) { return lxc_proc_rasd_to_vdev(inst, dev); - } else if (type == CIM_RES_TYPE_GRAPHICS) { - return graphics_rasd_to_vdev(inst, dev); } else if (type == CIM_RES_TYPE_INPUT) { return input_rasd_to_vdev(inst, dev); }
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
-- Richard Maciel, MSc IBM Linux Technology Center rmaciel@linux.vnet.ibm.com
participants (2)
-
Kaitlin Rupert
-
Richard Maciel