def get_basic_fullyvirt_guest(typ="xen", installer=None): g = virtinst.Guest(_conn) g.type = typ g.name = "TestGuest" g.memory = int(200 * 1024) g.maxmemory = int(400 * 1024) g.uuid = "12345678-1234-1234-1234-123456789012" g.installer.location = "/dev/null" g.installer.cdrom = True gdev = VirtualGraphics(_conn) gdev.type = "sdl" gdev.display = ":3.4" gdev.xauth = "/tmp/.Xauthority" g.add_device(gdev) g.features.pae = False g.vcpus = 5 if installer: g.installer = installer g.emulator = "/usr/lib/xen/bin/qemu-dm" g.os.arch = "i686" g.os.os_type = "hvm" g.add_default_input_device() g.add_default_console_device() return g
def get_basic_fullyvirt_guest(typ="xen", installer=None): g = virtinst.Guest(_conn) g.type = typ g.name = "TestGuest" g.memory = int(200 * 1024) g.maxmemory = int(400 * 1024) g.uuid = "12345678-1234-1234-1234-123456789012" g.installer.location = "/dev/null" g.installer.cdrom = True gdev = VirtualGraphics(_conn) gdev.type = "vnc" gdev.keymap = "ja" g.add_device(gdev) g.features.pae = False g.vcpus = 5 if installer: g.installer = installer g.emulator = "/usr/lib/xen/bin/qemu-dm" g.os.arch = "i686" g.os.os_type = "hvm" g.add_default_input_device() g.add_default_console_device() return g
def get_basic_paravirt_guest(installer=None): g = virtinst.Guest(_conn) g.type = "xen" g.name = "TestGuest" g.memory = int(200 * 1024) g.maxmemory = int(400 * 1024) g.uuid = "12345678-1234-1234-1234-123456789012" gdev = VirtualGraphics(_conn) gdev.type = "vnc" gdev.keymap = "ja" g.add_device(gdev) g.vcpus = 5 if installer: g.installer = installer else: g.installer._install_kernel = "/boot/vmlinuz" g.installer._install_initrd = "/boot/initrd" g.add_default_input_device() g.add_default_console_device() return g