[Pkg-libvirt-commits] [SCM] Virtinst Debian packaging branch, master, updated. debian/0.500.0-2

Guido Günther agx at sigxcpu.org
Wed Nov 4 10:34:03 UTC 2009


The following commit has been merged in the master branch:
commit ff8cee7a5bd8a84c0c9f70ade0a6d7968842bbc1
Author: Guido Günther <agx at sigxcpu.org>
Date:   Wed Nov 4 10:35:50 2009 +0100

    Don't use virtio for cdrom/floppy devices
    
    Patch pulled from upstream HG.
    
    Closes: #553171
    Thanks: Harald Dunkel

diff --git a/debian/patches/0003-Don-t-use-virtio-for-cdrom-floppy-devices.patch b/debian/patches/0003-Don-t-use-virtio-for-cdrom-floppy-devices.patch
new file mode 100644
index 0000000..f0c1618
--- /dev/null
+++ b/debian/patches/0003-Don-t-use-virtio-for-cdrom-floppy-devices.patch
@@ -0,0 +1,92 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Wed, 4 Nov 2009 10:34:21 +0100
+Subject: [PATCH] Don't use virtio for cdrom/floppy devices
+
+Patch pulled from upstream HG.
+
+Closes: #553171
+Thanks: Harald Dunkel
+---
+ tests/xmlconfig-xml/install-f11.xml |    9 +++++++++
+ tests/xmlconfig.py                  |   10 ++++++++--
+ virtinst/FullVirtGuest.py           |    4 +++-
+ 3 files changed, 20 insertions(+), 3 deletions(-)
+
+diff --git a/tests/xmlconfig-xml/install-f11.xml b/tests/xmlconfig-xml/install-f11.xml
+index 9ec5fdd..21354e5 100644
+--- a/tests/xmlconfig-xml/install-f11.xml
++++ b/tests/xmlconfig-xml/install-f11.xml
+@@ -17,6 +17,10 @@
+   <vcpu>5</vcpu>
+   <devices>
+     <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
++    <disk type='file' device='floppy'>
++      <source file='/default-pool/testvol1.img'/>
++      <target dev='fda' bus='fdc'/>
++    </disk>
+     <disk type='file' device='disk'>
+       <source file='/tmp/test.img'/>
+       <target dev='vda' bus='virtio'/>
+@@ -25,6 +29,11 @@
+       <source dev='/dev/loop0'/>
+       <target dev='vdb' bus='virtio'/>
+     </disk>
++    <disk type='file' device='cdrom'>
++      <source file='/default-pool/default-vol'/>
++      <target dev='hdc' bus='ide'/>
++      <readonly/>
++    </disk>
+     <interface type='network'>
+       <source network='default'/>
+       <mac address='11:22:33:44:55:66'/>
+diff --git a/tests/xmlconfig.py b/tests/xmlconfig.py
+index a2a05e0..a6570b1 100644
+--- a/tests/xmlconfig.py
++++ b/tests/xmlconfig.py
+@@ -58,6 +58,9 @@ def get_basic_fullyvirt_guest(typ="xen"):
+     g.vcpus = 5
+     return g
+ 
++def get_floppy(path="/default-pool/testvol1.img"):
++    return VirtualDisk(path, conn=conn, device=VirtualDisk.DEVICE_FLOPPY)
++
+ def get_filedisk(path="/tmp/test.img"):
+     return VirtualDisk(path, size=.0001, conn=conn)
+ 
+@@ -327,8 +330,11 @@ class TestXMLConfig(unittest.TestCase):
+         g = get_basic_fullyvirt_guest("kvm")
+         g.os_type = "linux"
+         g.os_variant = "fedora11"
+-        g.installer = virtinst.PXEInstaller(type="kvm", os_type="hvm",
+-                                            conn=g.conn)
++        g.installer = virtinst.DistroInstaller(type="kvm", os_type="hvm",
++                                               conn=g.conn,
++                                               location="/default-pool/default-vol")
++        g.installer.cdrom = True
++        g.disks.append(get_floppy())
+         g.disks.append(get_filedisk())
+         g.disks.append(get_blkdisk())
+         g.nics.append(get_virtual_network())
+diff --git a/virtinst/FullVirtGuest.py b/virtinst/FullVirtGuest.py
+index 556708e..4cfe40e 100644
+--- a/virtinst/FullVirtGuest.py
++++ b/virtinst/FullVirtGuest.py
+@@ -24,6 +24,7 @@ import DistroInstaller
+ 
+ from Guest import Guest
+ from VirtualDevice import VirtualDevice
++from VirtualDisk import VirtualDisk
+ from VirtualInputDevice import VirtualInputDevice
+ from VirtualCharDevice import VirtualCharDevice
+ 
+@@ -122,7 +123,8 @@ class FullVirtGuest(Guest):
+             if net_model and not net.model:
+                 net.model = net_model
+         for disk in self._get_install_devs(VirtualDevice.VIRTUAL_DEV_DISK):
+-            if disk_bus and not disk.bus:
++            if (disk_bus and not disk.bus and
++                disk.device == VirtualDisk.DEVICE_DISK):
+                 disk.bus = disk_bus
+ 
+         # If no serial devices were attached to the guest, stick the default
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index c258871..acae32a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-fix-path-to-hvmloader.patch
 0002-Fix-path-to-pygrub.patch
+0003-Don-t-use-virtio-for-cdrom-floppy-devices.patch

-- 
Virtinst Debian packaging



More information about the Pkg-libvirt-commits mailing list