Nathan Shearer

Introduction

The QEmu Init Script is designed to make managing QEmu virtual machines on a Gentoo hypervisor easy. Each virtual machine runs as a system service which can be configured and controlled individually.

Features
  • The obvious functions like starting, stopping and restarting the service which starts, stops, and restarts the virtual machine.
  • You can kill the QEmu process. This is useful if the guest operating system has frozen or if you do not want to wait for it to shut down.
  • Reset the virtual machine. This is useful if your guest operating system is frozen and you don't want to restart the entire service (and terminate any VNC connections).
  • The script is very configurable (see the example config file below or the one included in the tarball).
Dependencies
  • QEmu
  • net-misc/socat
Example Config File

# What is the name of this virtual machine? The default is the same name as the
# init script
#NAME="Windows XP"

# A raw hard disk image for IDE hard disk 0. Some targets do not need a disk
# image.
#IMAGE="/virtual/windows-xp/image.bin"

# The virtual machine is still on after 15 minutes then the process is killed
#POWEROFF_DELAY="900"

# Do not write any changes to the image file
#SNAPSHOT=true

# What kind of CPU(s) should the virtual machine have? How many cores, threads
# per core, and populated sockets are there?
#CPU=host
#CORES=1
#THREADS=1
#SOCKETS=1

# Enable KVM full virtualization support
#KVM=false

# How much RAM in MB is assigned to this virtual machine
#MEMORY="128"

# Sets the -rtc argument to qemu
#RTC="base=localtime"

# Select the type of VGA card to emulate
#VGA=cirrus
#VGA=std
#VGA=vmware
#VGA=none

# Use a USB tablet style mouse. Helps if you are going to use VNC.
#TABLET=false

# Enable the VNC server and listen on TCP 5900+$DISPLAY for connections
#VNC=false
#DISPLAY=0
#PASSWORD=""

# Maybe you need to do some special networking or something else. Put your
# special QEmu arguments here.
#QEMUARGS="-net nic -net user,hostfwd=tcp::3389-:3389"

Download

The latest version of QEmu Init Script is available here.

% Powered by Modulus %
© 2017 Nathan Shearer