V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
syqhcc
V2EX  ›  Vagrant

vagrant up 报错,不得已来此请教。

  •  
  •   syqhcc · 2015-01-20 19:27:44 +08:00 · 8310 次点击
    这是一个创建于 3589 天前的主题,其中的信息可能已经有所发展或是发生改变。
    OverlordsMac:centos7 a$ vagrant up
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Importing base box 'centos7'...
    ==> default: Matching MAC address for NAT networking...
    ==> default: Setting the name of the VM: centos7_default_1413296838672_81673
    ==> default: Fixed port collision for 22 => 2222. Now on port 2200.
    ==> default: Clearing any previously set network interfaces...
    ==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    ==> default: Forwarding ports...
    default: 22 => 2200 (adapter 1)
    ==> default: Booting VM...
    ==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2200
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...

    ==============================================
    此问题折腾一个下午,精疲力尽吐血三升。
    一直启动不了,该怎么办?
    8 条回复    2015-02-20 01:34:29 +08:00
    CoX
        1
    CoX  
       2015-01-20 19:31:31 +08:00 via iPhone
    用VBox直接启动一下看看是不是停在启动界面了
    jiyee
        2
    jiyee  
       2015-01-20 20:11:40 +08:00 via iPhone
    ==> default: Fixed port collision for 22 => 2222. Now on port 2200.

    会不会因为这个,Vagrantfile指定一下试试
    bengol
        3
    bengol  
       2015-01-20 21:17:53 +08:00 via iPad
    跟我一样。后来我把它们都删除了
    phpcxy
        4
    phpcxy  
       2015-01-20 21:23:29 +08:00 via iPad
    GUI,看看有没有报具体错误信息
    emric
        5
    emric  
       2015-01-20 21:29:11 +08:00
    先确定在 VirtualBox GUI 能不能开机.
    如果出现错误, 将 VirtualBox 退回到 4.3.12 版本.
    因为 4.3.13 及以上版本启用了硬件加速, 部分 Windows 机器并不兼容.
    syqhcc
        6
    syqhcc  
    OP
       2015-01-20 21:55:39 +08:00
    @emric Thx~。我看过一个帖子,说需要CPU虚拟化。硬件加速是指「CPU虚拟化」吗?
    HowardMei
        7
    HowardMei  
       2015-01-21 00:34:53 +08:00
    先试试:
    config.vm.boot_timeout = 360
    不行再加上:
    INTNET_NAME = [*('A'..'Z')].sample(8).join
    config.vm.provider "virtualbox" do |virt|
    ## Don't boot with headless mode so we can observe the start up process
    virt.gui = true
    ## Give the virtual machine a name
    #virt.name = config.vm.hostname
    #virt.customize ["modifyvm", :id, "--name", config.vm.hostname]
    ## Use VBoxManage to customize the VM:
    ## Give the internal network/cluster its own namespace to avoid conflicts
    virt.customize ["modifyvm", :id, "--nic2", "intnet", "--intnet2", "#{INTNET_NAME}"]
    ## Fix for slow external network connections
    virt.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
    virt.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
    ## Adjust total ram MB
    virt.customize ["modifyvm", :id, "--memory", 1024]
    ## Adjust video ram MB
    virt.customize ["modifyvm", :id, "--vram", 128]
    ## Adjust number of cpus cores
    virt.customize ["modifyvm", :id, "--cpus", 2]
    ## Adjust CPU utilization cap (percentage)
    virt.customize ["modifyvm", :id, "--cpuexecutioncap", 80]
    end
    elegzg
        8
    elegzg  
       2015-02-20 01:34:29 +08:00
    @bengol 那不是丢失虚拟机了么?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   943 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 19:30 · PVG 03:30 · LAX 11:30 · JFK 14:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.