Welcome to the new location of Alien's Wiki, sharing a single dokuwiki install with the SlackDocs Wiki.

Welcome to Eric Hameleers (Alien BOB)'s Wiki pages.

If you want to support my work, please consider a small donation:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
slackware:qemu [2006/09/22 21:35] – Added section about PXE booting your Virtual Machine. alienslackware:qemu [2007/11/16 09:10] – Conform to current udev syntax: change KERNEL="kqemu" to KERNEL=="kqemu" alien
Line 67: Line 67:
   - download, unpack kqemu archive   - download, unpack kqemu archive
   - configure and build kqemu, and install it on your computer using ''make install''.   - configure and build kqemu, and install it on your computer using ''make install''.
 +
  
 ==== Running QEMU and kqemu ==== ==== Running QEMU and kqemu ====
Line 98: Line 99:
 </code> My kqemu package also installs a [[http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html | udev]] rule file as ''/etc/udev/rules.d/50-kqemu-rule'' in case you run QEMU on a 2.6 kernel, with these contents: <code> </code> My kqemu package also installs a [[http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html | udev]] rule file as ''/etc/udev/rules.d/50-kqemu-rule'' in case you run QEMU on a 2.6 kernel, with these contents: <code>
 # kqemu # kqemu
-KERNEL="kqemu", NAME="%k", MODE="0666"</code> If you decided to restrict access to ''/dev/kqemu'', then you should modify this file to for instance <code>+KERNEL=="kqemu", NAME="%k", MODE="0666"</code> If you decided to restrict access to ''/dev/kqemu'', then you should modify this file to for instance <code>
 # kqemu # kqemu
-KERNEL="kqemu", NAME="%k", MODE="0660" , GROUP="qemu"</code>.+KERNEL=="kqemu", NAME="%k", MODE="0660" , GROUP="qemu" 
 +</code>.
  
   * To make the kqemu module load on boot, you should add the following line to the file ''/etc/rc.d/rc.modules'': <code>   * To make the kqemu module load on boot, you should add the following line to the file ''/etc/rc.d/rc.modules'': <code>
Line 303: Line 305:
  
 In [[:slackware:pxe|another article]] on this Wiki, i talk about the advantages of network booting ([[wp>PXE boot]]) when you are installing Slackware. Booting the Slackware installer from the network can sometimes be the only way of installing Slackware - imagine a PC without floppy and CDROM drives. QEMU on the other hand, has no need for network boot since you can just create an ISO image and pass that as the "//-cdrom//" parameter and that's it.\\ In [[:slackware:pxe|another article]] on this Wiki, i talk about the advantages of network booting ([[wp>PXE boot]]) when you are installing Slackware. Booting the Slackware installer from the network can sometimes be the only way of installing Slackware - imagine a PC without floppy and CDROM drives. QEMU on the other hand, has no need for network boot since you can just create an ISO image and pass that as the "//-cdrom//" parameter and that's it.\\
-Yet there are times when you'd want your QEMU virtual machine were able to use PXE to boot from the network, if only to test your network setup without sacrificing real hardware. Only problem, the emulated QEMU network card (Realtek 8029, a NE2000 clone) does not support booting from the network (it does not emulate a boot ROM).+Yet there are times when you'd want your QEMU virtual machine were able to use PXE to boot from the network, if only to test your network setup without sacrificing real hardware. There is only one problem, the emulated QEMU network card (Realtek 8029, a NE2000 clone) does not support booting from the network (it does not emulate a boot ROM)
 + 
 +There are two ways to overcome this problem. 
 + 
 +  * The first is to use the [[http://rom-o-matic.net/|ROM-o-Matic]]. ROM-o-matic.net dynamically generates Etherboot ROM images. We will let it create a PXE-capable ISO image that has support for our emulated Realtec network card. We can then use this small (~130kB) ISO image with the "//-cdrom//" parameter to QEMU to let it serve as a "replacement" PXE-boot ROM for the emulated network card.\\ The ISO generation works as follows - on the ROM-o-Matic start page, 
 +    * Select //latest production release//  
 +    * Choose NIC/ROM type **ns8390:rtl8029 - [0x10ec,0x8029]** 
 +    * Choose ROM output format **ISO bootable image without legacy floppy emulation (.iso)** 
 +    * To generate and download a ROM image press: <key>Get ROM</key>\\ No further customizations are needed, the default options are exactly right for our purposes. 
 +    * Save the generated ISO file on your local hard disk (for instance as //qemu_pxeboot.iso//)\\ \\ To use this ISO to boot from your PXE server, run qemu as follows: <code> 
 +qemu -cdrom qemu_pxeboot.iso -boot d <other options> 
 +</code> Read the article on [[:slackware:pxe|installing Slackware using PXE]] if you want to know more about how to setup a full-blown PXE server.
  
-There is a way to overcome this problem, and that is to use the [[http://rom-o-matic.net/|ROM-o-Matic]]ROM-o-matic.net dynamically generates Etherboot ROM imagesWe will let it create a PXE-capable ISO image that has support for our emulated Realtec network card. We can then use this small (~130kB) ISO image with the "//-cdrom//" parameter to QEMU to let it serve as a "replacement" PXE-boot ROM for the emulated network card.\\ +  * The other option you have is available since QEMU 0.9.0 and that is to use the //''-option-rom''// parameterAs of the 0.9.0 release, QEMU can do PXE boot using one of the PXE-capable boot roms available in ''/usr/share/qemu'': 
-The ISO generation works as follows - on the ROM-o-Matic start page, +    * /usr/share/qemu/pxe-ne2k_pci.bin 
-  * Select //latest production release//  +    * /usr/share/qemu/pxe-pcnet.bin 
-  * Choose NIC/ROM type **ns8390:rtl8029 [0x10ec,0x8029]** +    * /usr/share/qemu/pxe-rtl8139.bin\\ In order to support booting from the network, the ''-boot'' parameter has been extended with the possible value //''n''// for "network". An example of the command to PXE-boot your QEMU Virtual Machine from the network follows: <code> 
-  * Choose ROM output format **ISO bootable image without legacy floppy emulation (.iso)** +qemu -localtime -m 256 -hda slackware.img -boot n -option-rom /usr/share/qemu/pxe-ne2k_pci.bin <other_parameters></code>
-  * To generate and download a ROM image press: <key>Get ROM</key>\\ No further customizations are needed, the default options are exactly right for our purposes. +
-  * Save the generated ISO file on your local hard disk (for instance as //qemu_pxeboot.iso//)+
  
-To use this ISO to boot from your PXE server, run qemu as follows: <code>qemu -cdrom qemu_pxeboot.iso -boot d <other options></code> 
-Read the article on [[:slackware:pxe|installing Slackware using PXE]] if you want to know more about how to setup a full-blown PXE server. 
  
 <note tip> <note tip>
 Hardware virtualization with QEMU ()
SlackDocs