流浪者虚拟机未创建."尝试从现有 VM 创建框时 [英] Vagrant " VM not created." when trying to create box from existing VM

查看:29
本文介绍了流浪者虚拟机未创建."尝试从现有 VM 创建框时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我导入了 precision32 框,然后在 VM 上安装了一些包和其他数据.我的计划是将其重新打包成一个盒子,以节省共享时的复杂配置.

I imported the precise32 box, then installed some packages and other data on the VM. My plan is to then repackage it into a box, to save on complicated provisioning when sharing.

不过.

vagrant package --base dev-vm --output /box/vm.box

总是返回

[dev-vm] VM not created . Moving on

我的目录结构是:

-dev-vm
    --.vagrant
    --Logs
    --box.ovf
    --box-disk1.vmdk
    --dev-vm_13345342.vbpx
    --metadata.json
    --Vagrantfile

我已经

 set VAGRANT_LOG=debug

其中没有显示有关正在发生的事情的额外信息.

Which shows no extra info on whats going on.

Windows 7 使用 Cygwin

Windows 7 using Cygwin

更新:

 export VAGRANT_LOG=debug

用于 Cygwin 设置调试日志.

for Cygwin to set debug log.

然后我得到

 DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
 DEBUG subprocess: Exit status: 0
 INFO warden: Calling action: #<Vagrant::Action::Builtin::Call:0x2abb800>
 INFO runner: Running action: #<Vagrant::Action::Builder:0x2695920>
 INFO warden: Calling action: #<VagrantPlugins::ProviderVirtualBox::Action::Created:0x267c078>
 INFO runner: Running action: #<Vagrant::Action::Warden:0x2ac6c48>
 INFO warden: Calling action: #<VagrantPlugins::ProviderVirtualBox::Action::MessageNotCreated:0x2ac6c00>
 INFO interface: info: VM not created. Moving on...

推荐答案

当你打包一个盒子时,盒子名称必须是你可以从 VirtualBox 获得的特定机器名称(例如 lucid_1372711888).只需在cmd中执行以下命令:

When you package a box, the box name has to be the specific machine name that you can get from VirtualBox (e.g. lucid_1372711888). Just execute following command in cmd:

vboxmanage list vms

请注意,vboxmanage"应事先添加到 PATH 变量中.请参阅此处如何做到这一点.

Notice that "vboxmanage" should prior be added to PATH variable. See here how to do that.

还要注意虚拟机器名称不能包含空格.否则它不会被vagrant package"命令识别.例如:

Also notice that virtual maschine name must not contain spaces. Otherwise it won't be recognized by "vagrant package" command. For instance:

vagrant package --base win7_vbox_base --output win7_base.box #CORRECT
------------------------------------------------------------------------
vagrant package --base win7 vbox base --output win7_base.box #INCORRECT

这篇关于流浪者虚拟机未创建."尝试从现有 VM 创建框时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆