Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM resource management #202

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ environment variable. For example, you can set a download speed limit:

curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env CURL_OPTS="--limit-rate 50k" bash

Passing additional VM parameters
--------------------------------

Additional VM parameters can be passed using the `VM_OPTS` variable:

curl -s .../ievms.sh | env VM_OPTS="[--vram]=64 [--cpus]=2 [--memory]=1024" bash


Disk requirements
-----------------
Expand Down
10 changes: 10 additions & 0 deletions ievms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ guest_user="IEUser"
# The VM user password to use for guest control.
guest_pass="Passw0rd!"

# Specify addititional vm opts: VM_OPTS="[--vram]=64 [--cpus]=2"
declare -A vm_opts
eval "vm_opts=(${VM_OPTS:-""})"

# ## Utilities

# Print a message to the console.
Expand Down Expand Up @@ -357,6 +361,12 @@ build_ievm() {
local disk_path="${ievms_home}/${vm}-disk1.vmdk"
log "Creating ${vm} VM (disk: ${disk_path})"
VBoxManage import "${ova}" --vsys 0 --vmname "${vm}" --unit "${unit}" --disk "${disk_path}"

for opt in "${!vm_opts[@]}"
do
log "Modifying ${vm} with: ${opt} ${vm_opts[$opt]}"
VBoxManage modifyvm "${vm}" "${opt}" "${vm_opts[$opt]}"
done

log "Building ${vm} VM"
declare -F "build_ievm_ie${1}" && "build_ievm_ie${1}"
Expand Down