Qemu

From Linuxintro
Revision as of 08:59, 17 February 2010 by imported>ThorstenStaerk

QEmu emulates a computer, so you can use it to run several operating system images on one physical computer. Regarding the user experience, emulation is the same as virtualization, just slower.

Install it

SUSE

yast -i qemu

Use it

Create a virtual harddisk

With 2GB:

qemu-img create -f raw harddisk.img 2G

with networking

modprobe tun
qemu -k de-ch -m 256 -hda harddisk.img -cdrom cdromimage -boot d -net tap

exchange CD

  • change to qemu konsole by pressing CTRL_2
  • enter the command
eject cdrom
  • insert next CD and enter
change cdrom /dev/cdrom
  • Zugriff auf die virtuelle Platte

access the virtual harddisk

Use mtools to access the virtual hard disk. Enter into ~/.mtoolsrc:

 mtools_skip_check=1
 drive c: file="/home/user/qemu/harddisk.img" partition=1

Now you can show the virtual disk's content using the command

mdir c:

And copy files like

mcopy file c: