Creating a vagrant box using `vagrant package` on windows - windows

So, I'm trying to run vagrant package on my current Vagrant VM, and it seems to be working fine(no errors reported); however, it is not saving the file to the location that it reports to be saving it. I cannot locate the file anywhere else on the system either, so I'm not sure if it's actually being created or if the command is silently failing.
I am running Vagrant 1.6.1 on Windows 8.1 and using virtualbox as my hypervisor. Are there logs that I can be looking at which might help diagnose the problem?

I figured out what the issue was. This is specifically related to using vagrant on windows with mingw. A DLL dependency is screwed up for bsdtar, so if you follow the steps in http://sourceforge.net/p/mingw/bugs/2150/, you should be fine.

Related

Can't import a Vagrant Box on Hyper-V

I have created a Windows 10 vagrant box by exporting an existing VM from Hyper-V, adding a metadata.json file, deleting the snapshot folder, then creating a tar archive and gzipping the tar. I then add it to the box catalog by running
vagrant add ...
No problem so far.
If I try to up a new instance of the box, it fails with:
Script: import_vm.ps1
Error:
Failed to import a virtual machine.
Error Code: 32784
Cause: VM version is unsupported
To test the contents of the VM, I tried to manually import the VM from the export folder. Import works fine, so it's not that the disk files etc are corrupt.
Considering that I am importing on the same machine that I exported from, how is it possible that the version is not supported?
There seems to have previously been a bug in vagrant with these symptoms but it was fixed 2.5 years ago: https://github.com/hashicorp/vagrant/issues/7706.
I am running Windows 10 (1607 - OS Build 14393.2759), Hyper-V 10.0.14393.0 and Vagrant 2.2.4.
Any assistance greatly appreciated.
Apologies for the late reply. As a first step, check the validity of your image. To do this see what happens if you import the VM directly through the Hyper-V Manager. This will rule out any issues with the version of vagrant you are using. I suspect Hyper-v manager will not be able to import the image either. The next thing I'd try is to upgrade your hyper-v version.

"bsdtar.EXE: Error opening archive: Unrecognized archive format" while running vagrant up

I am taking a course on Udacity that requires me to set up a virtual machine on my system. I have already downloaded and installed Virtual Box and Vagrant. When I try to run the command vagrant up, I get this error:
Could anyone please explain what might be going wrong?
I am working on my office laptop so I cannot change the firewall settings. They are controlled by McAfee. Also, the firewall has been turned off by McAfee to the best of my knowledge. I tried searching a lot but couldn't come up with a solution to this.
Well, I researched more about this and was finally able to find something. This issue comes up when vagrant doesn't have folder permission. Sometimes Cygwin shell in Windows doesn't get permission to write or create a new folder.
I followed their github issue. This is what made it work for me:
Rename C:\HashiCorp\Vagrant\embedded\gnuwin32\bin\bsdtar.exe to
something like bsdtar_backup.exe (or temporarily move it)
In that same directory, create bsdtar.bat with this content:
#ECHO OFF
"%~dp0....\mingw\bin\bsdtar.exe" %*
This will result in Vagrant using the mingw binary, without you having to dive into some code. After these two steps, try adding a box.

Suddenly getting "Failed to load VMMR0.r0 (VERR_LDR_MISMATCH_NATIVE)"

Failed to load VMMR0.r0 (VERR_LDR_MISMATCH_NATIVE)
My VMs on Virtualbox 4.2 (on Windows 7 32-bit) were running absolutely fine until I started installing a new VM, which would not go beyond the Linux boot screen.
I deleted the VM and created new one, but it still didn't run.
So I installed the new version of VirtualBox (version 4.3.6.r91406) and rebooted the machine; but when I started any of my previously working VMs, I got the following error
Failed to open a session for the virtual machine m14
Failed to load VMMR0.r0
(VERR_LDR_MISMATCH_NATIVE
with the following details:
Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole
{8ab7c520-2442-4b66-8d74-4ff1e195d2b6}
On checking the forums, I saw few posts asking to check the .vbox files. In the directory of the VM, there are two, m14.vbox and m14.vbox-prev.
I removed the prev file and restarted the VM, again got same error, and the m14.vbox-prev file came again. So I then removed the original m14.vbox file and renamed the prev file to original and then started the VM: it still didn't work.
Any clues fixing this?
Hi I had the same problem in version 4.3
I disabled the floppy and the CD into the system configuration of the virtual machine and then the machine has started properly without realizing the error.
Add or update the extension pack.
If that doesn't solves the problem, then uninstall the Virtual Box, delete the following folder:
C:\USERS\<username>\AppData\Local\VirtualStore\Program Files\Oracle
then install Virtual Box again and run it as administrator. (In some cases running it as simple user may work too.)
Run as Administrator
I had the same problem after updating from 4.1 or 4.2, to 4.3.18.
I didn't reboot and the "Right click Virtualbox icon - Run as Administrator" technique worked for me (in Windows).
pls run the vbox-ssl-cacertificate.crt file. That may resolve above problem. This solution works for me.
FINALLY.
A while back I turned on ASLR for everything using EMET. Running EMET again and changing it back to the default of "Application OptIn" + reboot fixed it.
Like akshah123 I had driver verifier (verifier.exe) running because I was diagnosing random BSODs on my laptop. Running:
verifier.exe /reset
and then rebooting fixed this issue for me.
Launching VirtualBox as administrator got my VM running as normal.
Didn't need to try any other approach.

Node.js - tutorials on getting it to work with Cygwin on a Vista machine

All,
Am trying to get Node.js to work on Vista machine.
I installed Cygwin (as per the Github instructions) which appears to have been installed correctly. However, none of the commands are executing.
Are there any tutorials for the stages after the Cygwin installation?
PROBLEM: When any command is executed, I get 'Bash: command not found' error.
Not even command like 'c:\cygwin\bin' is executing.
When I type 'user' in cygwin command prompt, I get 'ntvdm has encountered an system error. Parameter incorrect'.
I thought the above error may be due to the firewall, disabling the firewall did not have any effect, running the program with admin rights also did not change the results...
Am confused and would love to get some guidance on what steps to go with next on getting Node.js up and running on a Windows Vista machine.
Many thanks,
UPDATE1:
We managed to make a bit more progress. It appears that we had not installed all the relevant files related to Cygwin. Upon re-download and reinstalled, it ran well, however, we have driven into another error. Error we get:
How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).
We followed the instructions as per the above thread (3rd post from top for Windows machines), however, we are still stuck at the same error.
Any guidance please?
Have you tried just using the Windows self contained binaries? http://node-js.prcn.co.cc/ This way you actually don't need to bother with Cygwin.
At first, i tried it your way too, using Cygwin. After smashing my head for the 10th time against a wall i just stopped trying and found a much cleaner solution.
I'm using VirtualBox running a Debain guest system to locally develop on my Windows 7 machine. Using VirtualBox, you can easily set up shared folders or port forwarding for node apps between your Windows machine and your Debian guest system.
Since you are using a plain Linux-system, all the compiling-pain is blown away.
If you plan to run node.js in production on a windows system: don't. I hardly believe node.js will be ever stable enough on windows-based systems using MINGW/Cygwin...
People seem to run into problems with Cygwin because they think that they are using a Windows machine.
If you install Cygwin, and open a bash shell prompt using the Cygwin icon, you are now in a UNIX environment and everything works the same as it would on UNIX. That includes building node.js.
I think you added some info to the question and I can see your problem. Yes, normally on Cygwin it has been possible to build node.js just as you would on any UNIX system, but that is no longer possible on Windows 7. Before running ./configure you have to:
Close all cygwin apps.
Double-click on C:\Cygwin\bin\ash.exe
Run ./rebaseall and when it completes, run ./perlrebase.
exit from the ash shell window.
At this point Cygwin will be back to normal and you can ./configure and make install.

After upgrading Fedora, why can I no longer change permissions of a file mounted via SMB

I had been running Fedora 9 for the last year --- I have a Windows box (actually a VM) that mounts a folder on the Fedora box using my own name/password. I do this so that I can run my version control program (Vault) on Windows. It has worked flawlessly for the last 6 months.
Yesterday, I upgraded Fedora from version 9 to version 11. Since doing so, I am no longer able to change file permissions from my Windows box. Nothing has changed, there's no firewall on the machine, SELinux is disabled (SELINUX=disabled in /etc/sysconfig/selinux), etc
I can still read the files. Any idea what has happened and how I might fix this?
Thanks,
David
P.S. The error I get is
An error occurred applying attributes to the file:
....my filename...
Access is denied.
P.P.S. I AM able to create a NEW file in the mounted folder. After doing so, I can change its properties to make it be read-only. BUT I then can NOT change its properties again to be writable. Hope this helps.
Turns out this would appear to be a bug in the latest version of Samba that you get when you install Fedora 11.
I manually built SAMBA 3.4.1 from source, installed it and my Windows machines work just fine with it.
(Just in case anyone else searches this site)

Resources