Difference between revisions of "Qemu"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
 
Line 12: Line 12:
 
  qemu-img create -f raw harddisk.img ''2G''
 
  qemu-img create -f raw harddisk.img ''2G''
  
== with networking ==
+
== start with networking ==
 
  modprobe tun
 
  modprobe tun
 
  qemu -k de-ch -m 256 -hda harddisk.img -cdrom ''cdromimage'' -boot d -net tap
 
  qemu -k de-ch -m 256 -hda harddisk.img -cdrom ''cdromimage'' -boot d -net tap

Latest revision as of 09:07, 17 February 2010

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

start 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: