From 04501bbe773dbf606a722f86fb47ae933ddd82b7 Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Wed, 13 Jun 2007 15:20:43 -0400 Subject: [PATCH] Fix BZ 239763 -- we shouldn't add a disk twice when we add it to a live domain on Xen 3.1. --- src/virtManager/domain.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py index 4869fb99b..051e0a926 100644 --- a/src/virtManager/domain.py +++ b/src/virtManager/domain.py @@ -538,10 +538,13 @@ class vmmDomain(gobject.GObject): def add_device(self, xml): logging.debug("Adding device " + xml) + # get the XML for the live domain before we attach the device + # otherwise the device gets added to the XML twice. + vmxml = self.vm.XMLDesc(0) + if self.is_active(): self.vm.attachDevice(xml) - vmxml = self.vm.XMLDesc(0) index = vmxml.find("") newxml = vmxml[0:index] + xml + vmxml[index:]