From: Juan Quintela <quintela@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: "libvir-list@redhat.com" <libvir-list@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: Supporting hypervisor specific APIs in libvirt
Date: Wed, 24 Mar 2010 09:49:40 +0100 [thread overview]
Message-ID: <m3eijacdej.fsf@trasno.mitica> (raw)
In-Reply-To: <87sk7qfoh9.fsf@basil.nowhere.org> (Andi Kleen's message of "Wed, 24 Mar 2010 03:22:10 +0100")
Andi Kleen <andi@firstfloor.org> wrote:
> Juan Quintela <quintela@redhat.com> writes:
>>
>> - networking: man, setting networking is a mess, libvirt just does it
>> for you.
>
> Agreed it's messy, but isn't this something that the standard qemu
> command line tool could potentially do better by itself? I don't see why you
> need a wrapper for that.
In my case, basically it is MAC addresses. I have dhcp setup, and it
always give the same IP to the same MAC. But you have to remember to
type the MAC addresses.
This is the typical command line that virsh start launch for me:
/usr/libexec/qemu-kvm -S -M pc-0.12 -enable-kvm -m 1024 -smp
2,sockets=2,cores=1,threads=1 -name f12X-64 -uuid
1fbe73a6-f519-e848-03bd-6636f765d143 -nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/f12X-64.monitor,server,nowait
-mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive
file=/mnt/kvm/images/f12X-64.img,if=none,id=drive-virtio-disk0,boot=on,cache=none
-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
-device
virtio-net-pci,vlan=0,id=net0,mac=54:52:00:44:72:e6,bus=pci.0,addr=0x5
-net tap,fd=18,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device
isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc
127.0.0.1:0 -k es -vga cirrus -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
>From parts:
/usr/libexec/qemu-kvm
-S
I don't want that
-M pc-0.12
I don't care.
-enable-kvm
I _want_ :)
-m 1024
Also god idea
-smp 2,sockets=2,cores=1,threads=1
by hand it is always "-smp 2"
-name f12X-64
-uuid 1fbe73a6-f519-e848-03bd-6636f765d143
don't care
-nodefaults
-chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/f12X-64.monitor,server,nowait
-mon chardev=monitor,mode=readline
this is simplified as:
-monitor stdio
when I launch it by hand.
-rtc base=utc -boot c
don't care
-drive file=/mnt/kvm/images/f12X-64.img,if=none,id=drive-virtio-disk0,boot=on,cache=none
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
this is _wow_, I only want to put the disk image path and convince it to
use virtio driver
-device virtio-net-pci,vlan=0,id=net0,mac=54:52:00:44:72:e6,bus=pci.0,addr=0x5
-net tap,fd=18,vlan=0,name=hostnet0
this always have to be changed. s/fd=18/script=/etc/kvm-ifup/
and then I normally found that I want "downscript=" to avoid the warning
at exit time. If I don't put a mac address, qemu command line works
well, but as I normally also use vnc I have to:
- launch qemu
- kill it, relaunch with -vnc :0 instead of -vnc 127.0.0.1:0
- re-launch qemu
- connect to vnc
- check what address the dhcp server was giving to it this time
- I can ssh to the client now
with libvirt handling the command line, I just ssh to the same dhcp
address that was given the previous time/day/...
-chardev pty,id=serial0 -device isa-serial,chardev=serial0
I only use serial from time to time, and using -serial
tcp:0,server,nowait (or whatever is the sintax is easier by hand)
-usb -device usb-tablet,id=input0
usb tablet is mandatory, just in case the guest is able to _not_ grab
the mouse.
-vnc 127.0.0.1:0
Allways wrong in my case, because I want to run the vnc client in a
different machine. a way to convince virt-viewer to connect to a qemu
launched by hand, or a way to convince libvirt to let me edit the
command line will be great.
-k es -vga cirrus
this get right by default.
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
I normally don't use balloon.
Notice for the "normally I don't care bits", that at the end I always
care. Why? because then somebody arrives and told me that sound don't
work, and I have to edit the config file, and add sound option. add a
sound option to the command line of qemu is not too complicate.
The other big problem for me are snapshots, I have to remember
_exactly_ what was the qemu command line with which I saved the
snapshot. Guess what, I normally don't remember and end:
- launching old qemu
- save a new snapshot
- test with the new qemu and new snapshot (because now I have the
command line that I launched 5 mins before).
Just in case it helps.
Later, Juan.
next prev parent reply other threads:[~2010-03-24 8:50 UTC|newest]
Thread overview: 109+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 19:25 [Qemu-devel] Supporting hypervisor specific APIs in libvirt Anthony Liguori
2010-03-22 20:10 ` [Qemu-devel] Re: [libvirt] " Daniel P. Berrange
2010-03-22 21:33 ` Gerd Hoffmann
2010-03-22 21:53 ` Anthony Liguori
2010-03-23 8:54 ` Jes Sorensen
2010-03-23 10:25 ` Gerd Hoffmann
2010-03-23 10:31 ` Jes Sorensen
2010-03-23 10:58 ` Gerd Hoffmann
2010-03-22 23:36 ` Cole Robinson
2010-03-22 21:49 ` Anthony Liguori
2010-03-23 7:35 ` Alexander Graf
2010-03-23 23:25 ` Jamie Lokier
2010-03-24 0:55 ` Anthony Liguori
2010-03-24 10:05 ` Markus Armbruster
2010-03-24 12:25 ` Paul Brook
2010-03-24 12:48 ` Anthony Liguori
2010-03-25 2:43 ` Jamie Lokier
2010-03-23 11:33 ` Daniel P. Berrange
2010-03-24 10:23 ` Daniel P. Berrange
2010-03-22 20:25 ` [Qemu-devel] " Daniel P. Berrange
2010-03-23 10:06 ` [Qemu-devel] " Juan Quintela
2010-03-23 10:41 ` Gerd Hoffmann
2010-03-23 10:50 ` Juan Quintela
2010-03-23 11:08 ` Daniel P. Berrange
2010-03-23 12:19 ` Juan Quintela
2010-03-23 23:13 ` Jamie Lokier
2010-03-24 7:59 ` Gerd Hoffmann
2010-03-24 13:52 ` Cole Robinson
2010-03-24 14:00 ` Gerd Hoffmann
2010-03-23 23:19 ` Jamie Lokier
2010-03-24 2:22 ` Andi Kleen
2010-03-24 8:49 ` Juan Quintela [this message]
[not found] ` <20100323145105.GV16253@redhat.com>
2010-03-23 15:05 ` [Qemu-devel] Re: [libvirt] " Anthony Liguori
2010-03-23 15:57 ` Paul Brook
2010-03-23 16:06 ` Anthony Liguori
2010-03-23 18:00 ` Avi Kivity
2010-03-23 18:23 ` [libvirt] [Qemu-devel] " Daniel P. Berrange
2010-03-24 1:05 ` Anthony Liguori
2010-03-24 4:48 ` Avi Kivity
2010-03-23 19:28 ` [Qemu-devel] Re: [libvirt] " Anthony Liguori
2010-03-23 23:09 ` Jamie Lokier
2010-03-24 5:17 ` Avi Kivity
2010-03-24 10:36 ` Daniel P. Berrange
2010-03-24 10:42 ` Avi Kivity
2010-03-24 12:23 ` Anthony Liguori
2010-03-24 12:29 ` Avi Kivity
2010-03-24 12:32 ` Anthony Liguori
2010-03-24 12:33 ` Avi Kivity
2010-03-25 0:28 ` Jamie Lokier
2010-03-24 16:42 ` Luiz Capitulino
2010-03-24 19:49 ` Avi Kivity
2010-03-24 20:12 ` Luiz Capitulino
2010-03-24 20:32 ` Anthony Liguori
2010-03-24 20:54 ` Alexander Graf
2010-03-24 21:33 ` Luiz Capitulino
2010-03-25 7:49 ` Alexander Graf
2010-03-24 21:25 ` Luiz Capitulino
2010-03-24 21:40 ` Anthony Liguori
2010-03-25 8:26 ` Vincent Hanquez
2010-03-25 8:49 ` Avi Kivity
2010-03-25 12:33 ` Anthony Liguori
2010-03-25 12:37 ` Avi Kivity
2010-03-25 13:44 ` Anthony Liguori
2010-03-25 13:48 ` Avi Kivity
2010-03-25 13:57 ` Anthony Liguori
2010-03-25 14:09 ` Luiz Capitulino
2010-03-25 15:59 ` Anthony Liguori
2010-03-26 2:11 ` Jamie Lokier
2010-03-25 14:21 ` Avi Kivity
2010-03-25 14:22 ` Vincent Hanquez
2010-03-25 16:50 ` Markus Armbruster
2010-03-25 17:40 ` Anthony Liguori
2010-03-26 7:37 ` Markus Armbruster
2010-03-26 9:26 ` [libvirt] [Qemu-devel] " Paolo Bonzini
2010-03-26 9:51 ` [Qemu-devel] Re: [libvirt] " Avi Kivity
2010-03-26 12:53 ` Anthony Liguori
2010-03-26 13:53 ` Anthony Liguori
2010-03-25 13:37 ` Gildas Le Nadan
2010-03-25 13:59 ` Daniel P. Berrange
2010-03-25 14:56 ` Vincent Hanquez
2010-03-25 15:07 ` Daniel P. Berrange
2010-03-25 15:14 ` Vincent Hanquez
2010-03-25 15:16 ` Daniel P. Berrange
2010-03-25 16:01 ` Anthony Liguori
2010-03-25 16:30 ` Alexander Graf
2010-03-26 2:18 ` Jamie Lokier
2010-03-25 13:23 ` Luiz Capitulino
2010-03-25 13:55 ` Anthony Liguori
2010-03-26 12:52 ` Luiz Capitulino
2010-03-25 6:37 ` Avi Kivity
2010-03-25 8:18 ` Alexander Graf
2010-03-26 16:01 ` Avi Kivity
2010-03-24 12:19 ` Anthony Liguori
2010-03-24 12:27 ` Avi Kivity
2010-03-24 12:30 ` Anthony Liguori
2010-03-24 12:32 ` Avi Kivity
2010-03-23 18:07 ` Daniel P. Berrange
2010-03-23 19:24 ` Anthony Liguori
2010-03-24 5:49 ` Avi Kivity
2010-03-24 12:30 ` Paul Brook
2010-03-24 12:34 ` Avi Kivity
2010-03-24 13:03 ` Paul Brook
2010-03-24 15:55 ` Markus Armbruster
2010-03-24 16:12 ` Paul Brook
2010-03-23 23:22 ` Jamie Lokier
2010-03-23 17:57 ` [Qemu-devel] " Avi Kivity
2010-03-23 19:31 ` Anthony Liguori
2010-03-24 4:53 ` Avi Kivity
2010-03-26 2:31 ` Jamie Lokier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3eijacdej.fsf@trasno.mitica \
--to=quintela@redhat.com \
--cc=andi@firstfloor.org \
--cc=libvir-list@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.