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

[kvm]: add debug cmd for build_kvm_image.sh #6472

Merged
merged 1 commit into from
Jan 17, 2021
Merged
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: 4 additions & 3 deletions scripts/build_kvm_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on_exit()

on_error()
{
netstat -antp
echo "============= kvm_log =============="
cat $kvm_log
}
Expand Down Expand Up @@ -51,12 +52,12 @@ create_disk
prepare_installer_disk

echo "Prepare memory for KVM build: $vs_build_prepare_mem"
sudo mount proc /proc -t proc || true
mount proc /proc -t proc || true
free -m
if [[ "$vs_build_prepare_mem" == "yes" ]]; then
# Force o.s. to drop cache and compact memory so that KVM can get 2G memory
sudo bash -c 'echo 1 > /proc/sys/vm/drop_caches'
sudo bash -c 'echo 1 > /proc/sys/vm/compact_memory'
bash -c 'echo 1 > /proc/sys/vm/drop_caches'
bash -c 'echo 1 > /proc/sys/vm/compact_memory'
free -m
fi

Expand Down