I am trying to run vagrant but it is causing error - terminal

I am trying to run vagrant up but this error is showing in my console:
Besides this, I also run vagrant destroy but it was not working.
error while creating domain: Error saving the server: Call to virDomainDefineXML failed: End of file while reading data: Input/output error

Related

Trying to run a couple of VMs using Vagrant. On running vagrant up command I get Call to virDomainCreateWithFlags failed: internal error

Trying to run a CentOS 7 VM on Virtual Box using vagrant on my Fedora 35 machine.
On running the run the vagrant up & vagrant up --debug commands I get the following message as output.
There was an error talking to Libvirt. The error message is shown
below:
Call to virDomainCreateWithFlags failed: internal error: /usr/libexec/qemu-bridge-helper --use-vnet --br=virbr0 --fd=27: failed to communicate with bridge helper: Transport endpoint is not connected
stderr=failed to get mtu of bridge `virbr0': No such device
So I was making a rookie mistake of not properly defining the VM provider in vagrant up command. Running vagrant up --provider virtualbox fixed this issue.

Failed to create the VirtualBox object

I was trying to login into the already existing vm using vagrant in bash. But it says failed to start or it's not running.
This is a already existing vm in the local.
I tried
$vagrant global-status -> to get the vm id.
then,
$vagrant up <id> ->to start the vm.
Got the following error,
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["showvminfo", "cd2ec772-3e94-476f-a0d9-59c3d2768fb5"]
Stderr: VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code REGDB_E_CLASSNOTREG (0x80040154) - Class not registered (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.

"Error trying to start business network. Error: No valid responses from any peers." in hyperledger-composer

Afer using hyperledger-composer for several months, now suddenly the following problem is happening:
Whenever I want to start a business network, using the command:
composer network start --networkName mynetwork --networkVersion 0.0.1 --card PeerAdmin#hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw
... I get (after waiting for an eternity) the following error message:
Error: Error trying to start business network. Error: No valid
responses from any peers. Response from attempted peer comms was an
error: Error: REQUEST_TIMEOUT Command failed
I uninstalled the whole hyperledger-composer development environment and then reinstalled everything. I still get the same error message.
Does anybody know what the hell is going on here?
P.S.: here's the result of running "composer archive list -a mynetwork#0.0.1.bna":
Listing Business Network Archive from mynetwork#0.0.1.bna
Identifier:mynetwork#0.0.1
Name:mynetwork
Version:0.0.1
Ok, I re-installed the developer environment again AND restarted my computer. Now it works again.

VAGRANT UP not working when executed via BAMBOO

I am trying to work with Vagrant and Bamboo together. I created custom box which I put on a web server from which it is getting downloaded when doing vagrant up. When I do it manually on the computer everything goes as expected.
When I try this via Bamboo however, the folder for local box in c:\Windows\System32\config\systemprofile\.vagrant.d\boxes is not created and subsequently fails as vagrant is not able to do import.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'http://127.0.0.1:8000/k.box'...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["import", "-n", "C:/Windows/System32/config/systemprofile/.vagrant.d/boxes/http-VAGRANTCOLON--VAGRANTSLASH--VAGRANTSLASH-127.0.0.1-VAGRANTCOLON-8000-VAGRANTSLASH-k.box/0/virtualbox/box.ovf"]
Stderr: 0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage.exe: error: Appliance read failed
VBoxManage.exe: error: Could not read OVF file 'box.ovf' (VERR_PATH_NOT_FOUND)
VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component ApplianceWrap, interface IAppliance
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleImportAppliance(struct HandlerArg *)" at line 307 of file VBoxManageAppliance.cpp
Did any of you encountered similar problem?
Thank you.
After some investigation I found the reason for this. The problem is that by default .vagrant.d folder is created in C:\Windows\SysWOW64\config\systemprofile when the vagrant is run via Bamboo. This is the folder where the boxes are stored after download.
The PROFILEUSER environment variable is set to C:\Windows\System32\config\systemprofilefor SYSTEM user. Subsequently after downloading the box it went to look for it into .vagrant.d folder inside PROFILEUSER folder instead of the one that really stored the box.
This problem was solved by setting VAGRANT_HOME environment variable to C:\Windows\SysWOW64\config\systemprofile\.vagrant.d. After this, vagrant looks into correct folder for stored boxes.

launching vagrant always connection timeout

I am having problem everytime I issue this command "vagrant up"
I have this error see image below.

Resources