From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bb3cY-0000PV-6i for qemu-devel@nongnu.org; Thu, 17 Jun 2004 16:36:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bb3cW-0000Nh-6n for qemu-devel@nongnu.org; Thu, 17 Jun 2004 16:36:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bb3cW-0000NO-27 for qemu-devel@nongnu.org; Thu, 17 Jun 2004 16:36:24 -0400 Received: from [38.113.3.61] (helo=babyruth.hotpop.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bb3az-0008RP-Nm for qemu-devel@nongnu.org; Thu, 17 Jun 2004 16:34:50 -0400 Received: from phreaker.net (kubrick.hotpop.com [38.113.3.103]) by babyruth.hotpop.com (Postfix) with SMTP id 211A75C73F6 for ; Thu, 17 Jun 2004 19:56:32 +0000 (UTC) Received: from jbrown.mylinuxbox.org (pcp03144805pcs.midval01.tn.comcast.net [68.59.228.236]) by smtp-2.hotpop.com (Postfix) with ESMTP id C152B5C73F6 for ; Thu, 17 Jun 2004 19:56:24 +0000 (UTC) Date: Thu, 17 Jun 2004 16:32:22 -0400 From: "Jim C. Brown" Message-ID: <20040617203222.GA26832@jbrown.mylinuxbox.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline Subject: [Qemu-devel] vqemu - a simple wrapper Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline vqemu is a simple shell script that allows you to use a configuration file called .qemurc with qemu, instead of passing the same command-line paramaters every time. vqemu looks for .qemurc in the current directory. This is because I store the different hard disk images (and various other things) for each OS in a separate directory, so this method makes it easy for me to specify different configurations for each OS which I run. In any case this is easy to change (for those of you who are not shell script programmers just change the line ". .qemurc" to ". $HOME/.qemurc"). The next version of vqemu will have some way of specifiying a way to use a different config file on the command line. Once you have set up .qemurc, you can just run vqemu to load up the emulated system. You can pass the same paramaters to vqemu that you pass to qemu, so if an option isn't supported in .qemurc you can just pass that directly on the command line (for example "vqemu -S"). I attach both vqemu and qemurc.txt (it's a sample .qemurc file with comments explaining each option). -- Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection. --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=vqemu #! /bin/sh . .qemurc comline=`which qemu` if [ -n "$qemu" ]; then comline="$qemu" fi if [ "$vde" = "on" ]; then comline="vdeq $comline" fi if [ -n "$boot" ]; then comline="$comline -boot $boot" fi if [ -n "$megs" ]; then comline="$comline -m $megs" fi if [ -n "$fda" ]; then comline="$comline -fda $fda" fi if [ -n "$fdb" ]; then comline="$comline -fdb $fdb" fi if [ -n "$hda" ]; then comline="$comline -hda $hda" fi if [ -n "$hdachs" ]; then comline="$comline -hdachs $hdachs" fi if [ -n "$hdb" ]; then comline="$comline -hdb $hdb" fi if [ -n "$cdrom" ]; then comline="$comline -cdrom $cdrom" fi if [ -n "$hdc" ]; then comline="$comline -hda $hdc" fi if [ -n "$hdd" ]; then comline="$comline -hda $hdd" fi if [ "$audio" = "on" ]; then comline="$comline -enable-audio" fi if [ "$pci" = "on" ]; then comline="$comline -pci" fi if [ -n "$macaddr" ]; then comline="$comline -macaddr $macaddr" fi if [ "$cirrus" = "on" ]; then comline="$comline -cirrusvga" fi if [ "$localtime" = "on" ]; then comline="$comline -localtime" fi if [ "$usernet" = "on" ]; then comline="$comline -user-net" elif [ "$usernet" = "dummy" ]; then comline="$comline -dummy-net" fi if [ -n "$nics" ]; then comline="$comline -nics $nics" fi if [ -n "$netscript" ]; then comline="$comline -n $netscript" fi if [ "$graphic" = "off" ]; then comline="$comline -nographic" fi exec $comline "$@" --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="qemurc.txt" # Option "qemu" # vqemu will run this program in place of qemu. # Use only if you know what you are doing! # Default: location of the qemu binary as specified by the which command # (i.e. the first qemu found in your PATH). #qemu=/usr/bin/local/qemu # Option "vde" # If set to on, vqemu will run qemu using the vdeq wrapper. This requires # that VDE is installed. # Default: off #vde=on # Option "boot" # Can be set to a (will boot from the fda file aka floppy), # c (will boot from hard disk file), or d (generally this means the cdrom). # Default: c #boot=c # Option "megs" # This will tell qemu how much RAM, in megabytes, the emulated machine will # have. Must be set to a valid number. # Default: 32 #megs=32 # Option "fda" # This is the file that will be used to emulate the first floppy disk. # This is changable at run-time. See man page for details. # This must be set if boot is set to a. # Default: not set #fda=flpa.img # Option "fdb" # This is the file that will be used to emulate the second floppy disk. # This is changable at run-time. See man page for details. # Default: not set #fdb=flpb.img # Option "hda" # This is the file that will be used to emulate the master on the primary # IDE controller. # This must be set if boot is set to c or left unset. # Default: not set #hda=hda.img # Option "hdachs" # This may be needed if qemu can not use the hard disk (i.e. its not detecting # the geometry correctly). Use with caution. Normally not needed as qemu # is smart. # Default: auto-detected #hdachs=200,63,16 # Option "hdb" # This is the file that will be used to emulate the slave on the primary # IDE controller. # Default: not set #hdb=hdb.img # Option "cdrom" # This is the file that will be used to emulate the cdrom, which is the master # on the secondary IDE controller. This is not compatible with the hdc option. # This is changable at run-time. See man page for details. # This must be set if boot is set to d. # Default: not set #cdrom=cdrom.iso # Option "hdc" # This is the file that will be used to emulate the master on the secondary # IDE controller. This is not compatible with the cdrom option. # Note that if this is not set, the default will be to use cdrom emulation # instead of hard disk emulation, as cdroms are changable while hard disks # are not. # Default: not set #hdc=hdc.img # Option "hdd" # This is the file that will be used to emulate the slave on the secondary # IDE controller. # Default: not set #hdd=hdd.img # Option "audio" # If set to on, the sound card emulation will be enabled. # Default: off #audio=on # Option "pci" # If set to on, the PCI layer will be emulated. The network card will become # a PCI RealTek RT8029 instead of a ISA NE2000. Also you can enable the # Cirrus VGA driver if this option is on. # Default: off #pci=on # Option "macaddr" # If set, this is used as the macaddr for the emulated network card. # This is useful for certain firewalls and other services (e.g. DHCPd # can assign the same ip address to the same macaddr each time). # Must be set to the correct format (see qemu man page for details) # Default: make up a random macaddr on each run #macaddr=AA:BB:CC:DD:EE:FF # Option "cirrus" # If set to on, the Cirrus Video Adaptor emulation will be enabled. # This requires that pci is also set on. # Default: off #cirrus=on # Option "localtime" # If set to on, the emulated CMOS will return the time in the local timezone. # Otherwise it returns the time in UTC. # Default: off #localtime=on # Option "usernet" # If set to on, the user-net emulation will be enabled. This allows for # rootless network and internet access. If set to dummy, dummy-net will # be enabled. This emulates a network card that is not connected to anything. # Default: off # Note that qemu might use user-net anyways if it can't enable tuntap networking. #usernet=on #usernet=dummy # Option "nics" # If set, this is the number of network cards that will be emulated. # Must be set to a valid number. # Default: 1 #nics=1 # Option "netscript" # If set, this is the script to run to set up tuntap networking. # See qemu man page for details. # Default: /etc/qemu-ifup #netscript=setup-tun # Option "graphic" # If set to off, the VGA emulation will be disabled. There will be no SDL # window. All text output will be shown on stdout. # Default: on #graphic=off --x+6KMIRAuhnl3hBn--