我使用Vagrant和Ansible创建了一个VM,当我在启动后尝试使用它时,我注意到它非常慢.我也在云中使用远程数据库,但似乎不是导致响应缓慢的原因.通过慢响应,我的意思是大多数时间加载页面大约5秒.
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Set the box name and URL
config.vm.box = "trusty-server"
config.vm.box = "skeleton"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
# Hostmanager plugin config
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
# Fix TTY problem
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
# Basic box configuration
config.vm.network "private_network", ip: …Run Code Online (Sandbox Code Playgroud)