summaryrefslogtreecommitdiffstats
path: root/remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_vm_hypervisor.inc
blob: 33fd363b839e7107c7a8f19cfff163bfe3a0b60d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
##########################################################################
# Include: Setup virtual machine hypervisor via vm-specific include file #
##########################################################################

# Get all virtual machine specific stuff from the respective include file
if [ ! -e "$VMCHOOSER_DIR/$xmlvirt/run-virt.include" ] ; then
	slxlog "virt-plugin-missing" "Could not find run-virt.include for $xmlvirt ($VMCHOOSER_DIR/$xmlvirt/run-virt.include)"
	writelog "Failed because of missing ${xmlvirt} plugin."
	error_user "Konnte den Virtualisierer '$xmlvirt' nicht finden. Starten der Virtuellen Maschine fehlgeschlagen.
	Starten Sie den Computer neu und wenden Sie sich an den Support, wenn das Problem weiterhin besteht."
	cleanexit 1
fi

	self="${xmlvirt}"

# Now including the hypervisor specific include file:
if ! source "$VMCHOOSER_DIR/$xmlvirt/run-virt.include"; then
	slxlog "virt-plugin-error" "run-virt.include for $xmlvirt could not be sourced (contains syntax errors?)" "$xmlvirt"
	writelog "Erroneous run-virt.include for $xmlvirt"
	error_user "Das Start-Script für den Virtualisierer '$xmlvirt' ist fehlerhaft.
	Starten Sie den Computer neu und wenden Sie sich an den Support, wenn das Problem weiterhin besteht."
fi