Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 119450 Details for
Bug 157987
KVM user space (new ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
kvm-kvm-24.patch
kvm-kvm-24.patch (text/plain), 3.49 KB, created by
Matthew Schultz
on 2007-05-16 16:54:22 UTC
(
hide
)
Description:
kvm-kvm-24.patch
Filename:
MIME Type:
Creator:
Matthew Schultz
Created:
2007-05-16 16:54:22 UTC
Size:
3.49 KB
patch
obsolete
>--- kvm.orig 2007-05-09 16:26:28.197491214 -0500 >+++ kvm 2007-05-09 16:40:31.657557264 -0500 >@@ -5,13 +5,6 @@ > > optparser = optparse.OptionParser() > >-optparser.add_option('--no-reload-module', >- help = 'do not reload kvm module', >- action = 'store_false', >- dest = 'reload', >- default = True, >- ) >- > optparser.add_option('--install', > help = 'start up guest in installer boot cd', > action = 'store_true', >@@ -50,22 +43,18 @@ > default = None, > ) > >-optparser.add_option('--no-kvm', >- help = 'use standard qemu, without kvm', >- action = 'store_false', >- dest = 'kvm', >- default = True, >- ) > optparser.add_option('--image', > help = 'select disk image', > dest = 'image', > default = '/tmp/disk', > ) >+ > optparser.add_option('--cdrom', > help = 'select cdrom image', > dest = 'cdrom', > default = None, > ) >+ > optparser.add_option('--loadvm', > help = 'select saved vm-image', > dest = 'saved_image', >@@ -100,45 +89,14 @@ > if len(args) > 1: > options.cdrom = args[1] > >-def remove_module(module): >- module = module.replace('-', '_') >- lines = commands.getoutput('/sbin/lsmod').split('\n') >- for x in lines: >- if x.startswith(module + ' '): >- if os.spawnl(os.P_WAIT, '/sbin/rmmod', 'rmmod', module) != 0: >- raise Exception('failed to remove %s module' % (module,)) >- >-def insert_module(module): >- if os.spawnl(os.P_WAIT, '/sbin/insmod', 'insmod', >- 'kernel/%s.ko' % (module,)) != 0: >- if os.spawnl(os.P_WAIT, '/sbin/modprobe', 'modprobe', module) != 0: >- raise Exception('failed to load kvm module') >- >-def vendor(): >- for x in file('/proc/cpuinfo').readlines(): >- m = re.match(r'vendor_id[ \t]*: *([a-zA-Z]+),*', x) >- if m: >- return m.group(1) >- return unknown >- >-vendor_module = { >- 'GenuineIntel': 'kvm-intel', >- 'AuthenticAMD': 'kvm-amd', >- }[vendor()] >- >-if options.kvm and options.reload: >- for module in [vendor_module, 'kvm']: >- remove_module(module) >- for module in ['kvm', vendor_module]: >- insert_module(module) >- commands.getstatusoutput('/sbin/udevsettle') >- if not os.access('/dev/kvm', os.F_OK): >- print '/dev/kvm not present' >+commands.getstatusoutput('/sbin/udevsettle') >+if not os.access('/dev/kvm', os.F_OK): >+ print '/dev/kvm not present' > > disk = options.image > if options.install: > (status, output) = commands.getstatusoutput( >- 'qemu/qemu-img create -f qcow2 "%s" 10G' % disk) >+ 'qemu-img create -f qcow2 "%s" 10G' % disk) > if status: > raise Exception, output > >@@ -157,12 +115,6 @@ > else: > cmd = 'qemu' > >-local_cmd = 'qemu/' + arch + '-softmmu/' + cmd >-if os.access(local_cmd, os.F_OK): >- cmd = local_cmd >-else: >- cmd = '/usr/bin/kvm' >- > qemu_args = (cmd, '-boot', bootdisk, > '-hda', disk, '-m', str(options.memory), > '-serial', 'file:/tmp/serial.log', >@@ -172,9 +124,6 @@ > if options.cdrom: > qemu_args += ('-cdrom', options.cdrom,) > >-if not options.kvm: >- qemu_args += ('-no-kvm',) >- > if options.debugger: > qemu_args += ('-s',) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 157987
:
108867
|
109180
|
109596
|
109612
|
109613
|
109614
|
109615
|
109929
|
110542
|
110544
|
111591
|
111593
|
111594
|
111721
|
111722
|
111725
|
111726
|
111727
|
111730
|
111731
|
111732
|
117585
|
117587
|
117589
|
117590
|
117592
|
117594
|
117595
|
117596
|
117597
|
119450
|
119452
|
119454
|
120155
|
120283
|
120488
|
121167
|
121170
|
121172
|
121174
|
121176
|
121177
|
121179
|
121181
|
121183
|
124934
|
124936
|
124937
|
124939
|
125905
|
125989
|
125991
|
125993
|
125994
|
125996
|
126072
|
130577
|
131298
|
132381
|
132382
|
132422
|
132486
|
132866
|
132899
|
133157
|
133510
|
133515
|
133859
|
137185
|
137723
|
137946
|
139324
|
139488
|
140913