Path: blob/master/tools/testing/ktest/examples/vmware.conf
26296 views
#1# This config is an example usage of ktest.pl with a vmware guest2#3# VMware Setup:4# -------------5# - Edit the Virtual Machine ("Edit virtual machine settings")6# - Add a Serial Port7# - You almost certainly want it set "Connect at power on"8# - Select "Use socket (named pipe)"9# - Select a name that you'll recognize, like 'ktestserialpipe'10# - From: Server11# - To: A Virtual Machine12# - Save13# - Make sure you note the name, it will be in the base directory of the14# virtual machine (where the "disks" are stored. The default15# is /var/lib/vmware/<virtual machine name>/<the name you entered above>16#17# - Make note of the path to the VM18# </End VMware setup>19#20# The guest is called 'Guest' and this would be something that21# could be run on the host to test a virtual machine target.2223MACHINE = Guest2425# Name of the serial pipe you set in the VMware settings26VMWARE_SERIAL_NAME = <the name you entered above>2728# Define a variable of the name of the VM29# Noting this needs to be the name of the kmx file, and usually, the30# name of the directory that it's in. If the directory and name31# differ change the VMWARE_VM_DIR accordingly.32# Please ommit the .kmx extension33VMWARE_VM_NAME = <virtual machine name>3435# VM dir name. This is usually the same as the virtual machine's name,36# but not always the case. Change if they differ37VMWARE_VM_DIR = ${VMWARE_VM_NAME}3839# Base directory that the Virtual machine is contained in40# /var/lib/vmware is the default on Linux41VMWARE_VM_BASE_DIR = /var/lib/vmware/${VMWARE_VM_DIR}4243# Use ncat to read the unix pipe. Anything that can read the Unix Pipe44# and output it's contents to stdout will work45CONSOLE = /usr/bin/ncat -U ${VMWARE_VM_BASE_DIR}/${VMWARE_SERIAL_NAME}4647# Define what version of Workstation you are using48# This is used by vmrun to use the appropriate appripriate pieces to49# test this. In all likelihood you want 'ws' or 'player'50# Valid options:51# ws - Workstation (Windows or Linux host)52# fusion - Fusion (Mac host)53# player - Using VMware Player (Windows or Linux host)54# Note: vmrun has to run directly on the host machine55VMWARE_HOST_TYPE = ws5657# VMware provides `vmrun` to allow you to do certain things to the virtual machine58# This should hard reset the VM and force a boot59VMWARE_POWER_CYCLE = /usr/bin/vmrun -T ${VMWARE_HOST_TYPE} reset ${VMWARE_VM_BASE_DIR}/${VMWARE_VM_NAME}.kmx nogui6061#*************************************#62# This part is the same as test.conf #63#*************************************#6465# The include files will set up the type of test to run. Just set TEST to66# which test you want to run.67#68# TESTS = patchcheck, randconfig, boot, test, config-bisect, bisect, min-config69#70# See the include/*.conf files that define these tests71#72TEST := patchcheck7374# Some tests may have more than one test to run. Define MULTI := 1 to run75# the extra tests.76MULTI := 07778# In case you want to differentiate which type of system you are testing79BITS := 648081# REBOOT = none, error, fail, empty82# See include/defaults.conf83REBOOT := empty848586# The defaults file will set up various settings that can be used by all87# machine configs.88INCLUDE include/defaults.conf899091#*************************************#92# Now we are different from test.conf #93#*************************************#949596# The example here assumes that Guest is running a Fedora release97# that uses dracut for its initfs. The POST_INSTALL will be executed98# after the install of the kernel and modules are complete.99#100POST_INSTALL = ${SSH} /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION101102# Guests sometimes get stuck on reboot. We wait 3 seconds after running103# the reboot command and then do a full power-cycle of the guest.104# This forces the guest to restart.105#106POWERCYCLE_AFTER_REBOOT = 3107108# We do the same after the halt command, but this time we wait 20 seconds.109POWEROFF_AFTER_HALT = 20110111112# As the defaults.conf file has a POWER_CYCLE option already defined,113# and options can not be defined in the same section more than once114# (all DEFAULTS sections are considered the same). We use the115# DEFAULTS OVERRIDE to tell ktest.pl to ignore the previous defined116# options, for the options set in the OVERRIDE section.117#118DEFAULTS OVERRIDE119120# Instead of using the default POWER_CYCLE option defined in121# defaults.conf, we use virsh to cycle it. To do so, we destroy122# the guest, wait 5 seconds, and then start it up again.123# Crude, but effective.124#125POWER_CYCLE = ${VMWARE_POWER_CYCLE}126127128DEFAULTS129130# The following files each handle a different test case.131# Having them included allows you to set up more than one machine and share132# the same tests.133INCLUDE include/patchcheck.conf134INCLUDE include/tests.conf135INCLUDE include/bisect.conf136INCLUDE include/min-config.conf137138139