[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] disable kvm support


Below you can find an example of such wrapper:


if [ "`echo "$@" | grep "kvm" | wc -l`" -eq "1" ]; then
  args=( "$@" "-no-kvm" )
  args=( "$@" )

if [ "`uname -a | grep x86_64 | wc -l`" -eq "1" ]; then

exec $bin "${args[ ]}"

This isn't awesome piece of code and may have a different behavior than you expect (for example if your disk contains 'kvm' in the name). But it's a good start for you.



On 9 lip 2011, at 00:05, Richard W.M. Jones wrote:

> On Fri, Jul 08, 2011 at 12:26:27AM +0530, yeswanth swami wrote:
>> Hi,
>> whenever I perform 'launch' operation to launch a disk, guestfs looks for
>> KVM support and prints this message "Could not initialize KVM, will disable
>> KVM support" . Is there a way to turn it off.. I dont want guestfs to look
>> for KVM .
> This message probably comes from your KVM binary.  I'm curious why you
> want to disable KVM, since it's transparent and just makes things
> faster (if available).
> Anyway, if you want to remove this sort of message, you have to write
> a "qemu wrapper".  This is just a short piece of shell script which
> edits the parameters that are passed to QEMU.  Boxgrinder, for
> example, contains one of these because of problems launching KVM on
> Amazon EC2 guests.
> See:
> http://libguestfs.org/guestfs.3.html#qemu_wrappers
> http://libguestfs.org/guestfs.3.html#guestfs_set_qemu
> http://libguestfs.org/guestfs.3.html#libguestfs_qemu
> Rich.
> -- 
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> Read my programming blog: http://rwmj.wordpress.com
> Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
> http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
> _______________________________________________
> Libguestfs mailing list
> Libguestfs redhat com
> https://www.redhat.com/mailman/listinfo/libguestfs

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]