Skip to content

Instantly share code, notes, and snippets.

@PoplarYang
Last active March 28, 2019 06:07
Show Gist options
  • Select an option

  • Save PoplarYang/ab7b633f696602b73a15a0eb5e50409b to your computer and use it in GitHub Desktop.

Select an option

Save PoplarYang/ab7b633f696602b73a15a0eb5e50409b to your computer and use it in GitHub Desktop.
config.vm.provider "virtualbox" do |vb|
vb.customize ["createhd", "--filename", "G:/VirtualBox/centos7/vd1.vdi", "--size", "20480"]
vb.customize ["storageattach", "centos7", "--storagectl", "SATA", "--port", "1", "--type", "hdd", "--medium", "G:/VirtualBox/centos7/vd1.vdi"]
end
# 查看CPU 和 内存占用
ps aux | grep "[V]BoxHeadless" | grep $(cat .vagrant/machines/node3/virtualbox/id) | awk '{ printf("CPU: %.02f%%, Memory: %.02f%%", $3, $4) }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment