Tôi gặp sự cố lạ với Vagrant. Thay đổi RAM mặc định của máy ảo sẽ phải dễ dàng nhưng tôi không biết tại sao tôi không thể thực hiện nó.Khiếu nại về âm đạo về "tùy chỉnh"
Mã của tôi rất đơn giản:
# -*- 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|
config.vm.define "mimeticStack" do |v|
v.vm.box = "precise64"
v.vm.box_url = "http://files.vagrantup.com/precise64.box"
v.vm.network "private_network", ip: "192.168.33.10"
v.vm.network "forwarded_port", guest: 80, host: 8080
v.vm.hostname = "dev.mimetic.local"
v.vm.customize ["modifyvm", :id, "--memory", "512"]
end
end
Sau đó, nếu tôi chạy "lang thang lên", Vagrant trả:
vm:
* The following settings shouldn't exist: customize
Nếu bạn chỉ thay đổi bộ nhớ hoặc cài đặt CPU, hãy sử dụng cú pháp phải đơn giản hơn 'vb.memory = 1024' hoặc' vb.cpus = 2'. Xem https://docs.vagrantup.com/v2/virtualbox/configuration.html –