virt-manager/531dd0ca-lxc-define-private-network.patch
Charles Arnold f54391e5a2 - Fix start_libvirtd to correctly use systemd to start libvirtd
virtman-libvirtd-not-running.patch
- Upstream bug fixes
  531dd0ca-lxc-define-private-network.patch
  53207f40-invalidate-cached-caps.patch
  5320c976-fix-adding-empty-cdrom-floppy-drive.patch

- bnc#867796 - virt-manager New Virtual Machine "Vm-install"
  virtman-vminstall.patch

- bnc#867749 - virt-manager polling connection
  virtman-load-stored-uris.patch
- bnc#866287 - virt-manager suggests to install
  "qemu / libvirt-daemon-qemu / libvirt-daemon-driver-network" at startup
  virtman-packages.patch
- Use qemu-system-x86_64 instead of the deprecated qemu-kvm 
  virtman-kvm.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=150
2014-03-13 23:44:08 +00:00

71 lines
2.5 KiB
Diff

Subject: lxc: define a private network for OS containers
From: Giuseppe Scrivano gscrivan@redhat.com Mon Mar 10 15:25:14 2014 +0100
Date: Mon Mar 10 15:48:42 2014 +0100:
Git: 75349b9cf075b229c027ef1fcabeb5ebac981cc8
By default, specify the the "<privnet>" feature with LXC operating
system containers.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1040406
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Index: virt-manager-1.0.0/tests/cli-test-xml/compare/virt-install-fs-default.xml
===================================================================
--- virt-manager-1.0.0.orig/tests/cli-test-xml/compare/virt-install-fs-default.xml
+++ virt-manager-1.0.0/tests/cli-test-xml/compare/virt-install-fs-default.xml
@@ -8,6 +8,9 @@
<type arch="x86_64">exe</type>
<init>/sbin/init</init>
</os>
+ <features>
+ <privnet/>
+ </features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
Index: virt-manager-1.0.0/virtinst/guest.py
===================================================================
--- virt-manager-1.0.0.orig/virtinst/guest.py
+++ virt-manager-1.0.0/virtinst/guest.py
@@ -1,7 +1,7 @@
#
# Common code for all guests
#
-# Copyright 2006-2009, 2013 Red Hat, Inc.
+# Copyright 2006-2009, 2013, 2014 Red Hat, Inc.
# Jeremy Katz <katzj@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
@@ -645,12 +645,18 @@ class Guest(XMLBuilder):
self._set_video_defaults()
self._set_sound_defaults()
+ def _is_os_container(self):
+ if not self.os.is_container():
+ return False
+ for fs in self.get_devices("filesystem"):
+ if fs.target == "/":
+ return True
+ return False
+
def _set_osxml_defaults(self):
if self.os.is_container() and not self.os.init:
- for fs in self.get_devices("filesystem"):
- if fs.target == "/":
- self.os.init = "/sbin/init"
- break
+ if self._is_os_container():
+ self.os.init = "/sbin/init"
self.os.init = self.os.init or "/bin/sh"
if not self.os.loader and self.os.is_hvm() and self.type == "xen":
@@ -736,6 +742,8 @@ class Guest(XMLBuilder):
self.features.acpi = None
self.features.apic = None
self.features.pae = None
+ if self._is_os_container():
+ self.features.privnet = True
return
if not self.os.is_hvm():