qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] No useful documentation.


From: NyOS
Subject: Re: [Qemu-devel] No useful documentation.
Date: Thu, 06 Jul 2006 00:41:49 +0200
User-agent: Opera Mail/9.00 (Linux)

Hi!

---------------------------------------
Let's see an example: installation.

Qemu is a virtual machine program. So, that's a machine in the machine.
There is a computer, called "host", which runs an OS, called Host OS, and Qemu (besides other programs).
Qemu is a simple program from the host point of view.

To use it, you need at least one disc image. You can create one with the qemu-img command:
e.g.:
qemu-img create my_os.img 2G

That will create a simple file (2GiB size), called my_os.img

Suppose you have an install iso image, called my_os_install.iso

The following command:
qemu -cdrom my_os_install.iso -hda my_os.img -boot d

will run a virtual machine. It will have two drives, the primary master is that 2GiB image. The secondary master is that cdrom image. Note that (from the host point of view) those are still two plain files. But from the guest OS (running in the VM), those are real drives.

So, the virtual machine is started. It shows in a window what would be shown in the monitor if that was a real hardware.

First you probably need to create partitions, format them, run installer to copy files, and so on. If it needs to reboot the guest, feel free to do that, Qemu will not stop working.

If you don't like windowed mode, press ctrl-alt-f to go fullscreen. When you'd like to use your host OS, press ctrl-alt to release mouse grab. You can return to the VM any time.

When you stop guest OS, and the virtual machine halts, Qemu exits. But the image file is modified (the guest OS remains on that), so, you don't have to reinstall it every time.

If you want, you can compress that to backup, or do anything.

Note that closing the VM window is like unplugging the computer. It might explain next time.

2nd example: adding sound and user networking, and some more memory.

qemu -m 256 -soundhw sb16 -hda my_os.img -localtime -net nic -net user
-m 256
allocate 256 MiB RAM for the guest (read note)
-soundhw sb16
just like putting a soundblaster card into the slot
-localtime
in case the host OS runs in local time (and not GMT)
-net nic -net user
called "user mode" networking, which is the simplest way to reach internet from inside. It just works (getting IP address from DHCP automatically)

(If you call qemu without parameters, it will show its possibile parameter list)

note: on some systems, you need the following commands (as root) to add more memory:

umount /dev/shm
mount -t tmpfs -o size=512m none /dev/shm


3rd example: making kqemu working (I'm not sure, please correct it)

(as root) type the following:
mknod /dev/kqemu c 250 0
if it worked, the ls -al /dev/kqemu command would answer like that:
crw-rw-rw- 1 root 250, 0 Mar 31 01:00 /dev/kqemu

call
modprobe kqemu
to load kqemu kernel module (later you might install it somwhere into /lib/modules/...)

If you start Qemu now, it will probably run significantly faster.

---------------------------------------

Use that 'doc' for whatever purpose you want. I don't need it anymore :).
(but please ask a native speaker to rewrite it :) )




reply via email to

[Prev in Thread] Current Thread [Next in Thread]