这是一个非常具体的错误,很明显发生了什么,我只是不知道如何纠正它。没有看到关于此问题的具体答案。
注意:为了保护新手,本片中的名字均已更改。
jsmith@JSMITH010451 ~/Documents/Projects/vbox90 % vagrant up 16:44:17
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'inflectionpoint/throwaway1'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'inflectionpoint/throwaway1' version '0.0.1' is up to date...
==> default: Setting the name of the VM: vbox90_default_1612046694580_50678
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "670fc20e-25e1-404f-b241-c8ae5d816a72", "--type", "headless"]
Stderr: VBoxManage: error: RawFile#0 failed to create the raw output file /Users/johnsmith/Desktop/Inflection Point Development/vbox1/ipd-developnode/inflectionpoint-saas.com/ubuntu-xenial-16.04-cloudimg-console.log (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
因此,这是在另一台计算机上进行的,它显然暴露了日志写入除了盒子之外的其他地方的事实(/Users/johnsmith/Desktop/Inflection Point Development/vbox1/ipd-developnode/inflectionpoint-saas.com/ubuntu-xenial-16.04-cloudimg-console.log
)。由于我johnsmith
在创建计算机和jsmith
想要安装盒子的计算机上,我甚至无法创建该路径 - 我如何更改原始包的位置以将该日志文件写入创建的盒子本身?谢谢!
答案1
答案2
我发现以下适用于 Win10 设置的解决方法,它也适用于 MacOS 和 Linux。
Vagrant文件:
config.vm.provider "virtualbox" do |vb|
# Workaround for Ubuntu cloud image: relocate UART console file into .vagrant folder
vb.customize ["modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, ".vagrant/uart1.log").sub("/", File::ALT_SEPARATOR)]
end
答案3
我在日志文件 (VERR_PATH_NOT_FOUND) 中遇到了同样的问题。不过,在 Vagrantfile 中添加以下几行后,这个问题得到了解决。
config.vm.provider "virtualbox" do |vb|
vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ]
end