diff options
author | Jonathan Bauer | 2018-05-04 16:38:17 +0200 |
---|---|---|
committer | Jonathan Bauer | 2018-05-04 16:38:17 +0200 |
commit | 718a68bf8060c17c602d73085bc5b2ca3a643c26 (patch) | |
tree | a2508dacf4d5e0176bcebb6802452e5f54d268e3 /core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc | |
parent | [vmware*] proper quoting... (diff) | |
download | mltk-718a68bf8060c17c602d73085bc5b2ca3a643c26.tar.gz mltk-718a68bf8060c17c602d73085bc5b2ca3a643c26.tar.xz mltk-718a68bf8060c17c602d73085bc5b2ca3a643c26.zip |
[*virt*] fix vmware VM only having 1 core...
Diffstat (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc')
-rw-r--r-- | core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc index c59a82b0..19e1cb43 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc @@ -13,15 +13,15 @@ # Use: 00:FF:00 for firtual machines ;) ## Functions ## +# Import /run/hwinfo variables +import_hwinfo() { + $(safesource "/run/hwinfo") +} # Sets the VM's hostname to the original hostname prefixed with a fixed string and its ID set_virt_hostname() { declare -rg HOSTNAME="virt${VM_ID}-$(hostname)" writelog "\tVM Hostname:\t\t$HOSTNAME" } -set_virt_cpu() { - # Make sure CPU_CORES is not empty - declare -g CPU_CORES=${CPU_CORES:-"1"} -} # Derives the amount of memory allocated to the VM from the # host's total memory (previously determined by systemd-run_virt_env) set_virt_memory() { @@ -149,7 +149,7 @@ set_serial_ports() { ## MAIN ## call_post_source \ - set_virt_cpu \ + import_hwinfo \ set_virt_memory \ set_virt_mac \ set_virt_hostname \ |