~ubuntu-branches/ubuntu/quantal/virtinst/quantal-proposed

« back to all changes in this revision

Viewing changes to virtinst/ParaVirtGuest.py

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2011-02-01 15:40:11 UTC
  • mfrom: (1.3.16 experimental)
  • Revision ID: james.westby@ubuntu.com-20110201154011-op0nusgc240xajvb
Tags: 0.500.5-1ubuntu1
* Merge from debian experimental. Remaining changes:
  - debian/patches/9001_Ubuntu.patch:
     + Updated to add maverick and natty to OS list and enable virtio
       for them.
  - debian/patches/9003-fix-path-to-hvmloader-in-testsuite.patch: adjust
    testsuite for 0001-fix-path-to-hvmloader.patch and
    0002-Fix-path-to-pygrub.patch. (refreshed)
  - debian/control: added acl package to depends.
  - Demote virt-viewer to Suggests, as it's in universe.
  - Recommends libvirt-bin
* Removed patches:
  - debian/patches/9002-libvirt_disk_format.patch: Upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
# MA 02110-1301 USA.
21
21
 
22
22
from Guest import Guest
23
 
from DistroInstaller import DistroInstaller
24
 
from VirtualInputDevice import VirtualInputDevice
25
 
from VirtualDevice import VirtualDevice
26
 
from VirtualDisk import VirtualDisk
27
 
import _util
28
23
 
29
24
class ParaVirtGuest(Guest):
30
 
    def __init__(self, type=None, connection=None, hypervisorURI=None,
31
 
                 installer=None):
32
 
        if not installer:
33
 
            installer = DistroInstaller(type = type, os_type = "xen",
34
 
                                        conn=connection)
35
 
        Guest.__init__(self, type, connection, hypervisorURI, installer)
36
 
        self.disknode = "xvd"
37
 
        self._diskbus = "xen"
38
 
 
39
 
        self.features = {"acpi": False, "apic": False, "pae": False}
40
 
 
41
 
        # Add default input device
42
 
        self._set_default_input_dev()
43
 
 
44
 
    def _get_input_device(self):
45
 
        dev = VirtualInputDevice(self.conn)
46
 
        dev.type = "mouse"
47
 
        dev.bus = "xen"
48
 
        return dev
49
 
 
50
 
    def _set_defaults(self, devlist_func):
51
 
        # Default file backed PV guests to tap driver
52
 
        for d in devlist_func(VirtualDevice.VIRTUAL_DEV_DISK):
53
 
            if (d.type == VirtualDisk.TYPE_FILE
54
 
                and _util.is_blktap_capable()
55
 
                and d.driver_name == None):
56
 
                d.driver_name = VirtualDisk.DRIVER_TAP
57
 
 
58
 
        Guest._set_defaults(self, devlist_func)
 
25
    _default_os_type = "xen"