常见错误

启动虚拟机报错,错误下

  1. [root@vagrant ubuntu]# vagrant up
  2. Bringing machine 'default' up with 'virtualbox' provider...
  3. An action 'up' was attempted on the machine 'default',
  4. but another process is already executing an action on the machine.
  5. Vagrant locks each machine for access by only one process at a time.
  6. Please wait until the other Vagrant process finishes modifying this
  7. machine, then try again.
  8. If you believe this message is in error, please check the process
  9. listing for any "ruby" or "vagrant" processes and kill them. Then
  10. try again.

介绍:这是由于执行vagrant up 启动虚拟机的时候,以外中断导致的,我们必须通过kill杀掉响应的进程(这里一定要看清楚,别kill错咯)

  1. [root@vagrant ubuntu]# ps -ef|grep vagrant
  2. avahi 19833 1 0 10:30 ? 00:00:00 avahi-daemon: running [vagrant.local]
  3. root 66336 5220 0 15:23 pts/1 00:00:00 bash /usr/bin/vagrant up
  4. root 66337 66336 0 15:23 pts/1 00:00:00 /opt/vagrant/bin/vagrant up
  5. root 66342 66337 0 15:23 pts/1 00:00:01 ruby /opt/vagrant/embedded/gems/gems/vagrant-1.9.2/bin/vagrant up
  6. root 67956 5220 0 15:39 pts/1 00:00:00 grep --color=auto vagrant
  7. [root@vagrant ubuntu]# kill -9 66342