VM inaccessible after copying vdi file - virtualbox

I followed this (http://dirkstrauss.com/moving-virtualbox-vm/) description to relocate my .vdi files.
I removed the .vdi file from the Settings/Storage menue.
I removed the hard drive from the Virtual Media Manager menue.
I copied the .vdi file to the new location.
I reconfigured Settings/Storage with the new location.
I could then boot my VM, but when I deleted the original .vdi file from the old location, the Virtual Machine turned "inaccessible". For some strange reason, Virtualbox continues to search for the VM at the old location, though I reconfigured everything with the new location.

The problem was related to "default VM folder" in the general settings. The following steps solved the issue.
Setting the default VM folder correctly.
Double clicking (under Windows) the Virtual Machine Definition file in the new folder location.
Selecting the .vdi file in the Settings/Storage menue of the respective Virtual Machine.

Related

Shared folders with VirtualBox and ReactOS

I want to have shared folders between my computer on Arch Linux and a virtual machine with ReactOS, but I don't know where the folder appears in ReactOS.
Where does it appear?
Do it as you would do on Windows:
Install VirtualBox Guest Additions in your ReactOS VM
Define your shares in your virtual machine configuration (through VirtualBox interface)
Reboot your ReactOS VM
If you checked automount in the VirtualBox GUI, they'll be already available, mapped as a drive letter in the explorer. If you didn't, then either go to 'Network Places' to find them, or directly type the UNC path in the explorer address bar, or use the 'net use' command line tool

How to locate a virtual machine files in my local disk VMware

I have a virtual machine running on VMware (VMware Workstation 12 player). I accidentally removed it from my inventory instead of deleting from disk. Now, where can I find the files on my local disk so that I can release the disk space..
Any help would be appreciated. Thank you.
The default location for virtual machine files is the folder My Virtual Machines in the My Documents folder of the home directory of the user who created the virtual machines. If you are logged in as this user, you can:
Select Start>Run. The Run dialog appears.
Type %userprofile%
Click OK to see the home directory.
If you are still unable to locate the virtual machine files, you must search the host hard drive for virtual machine configuration files.
To search the host hard drive:
Open a command prompt.
Enter this command:
C:>dir *.vmx /s/p
Every virtual machine has a directory with multiple files in it, including vm* files (vmdk, vmx, vmem etc.). The default path is under the user's "Documents" directory, in a directory named "Virtual Machines". For removal just delete the relevant machine's directory.

Can't open imported VMDK file

I downloaded a VM instance from the web and launched / modified it using it using VMware Workstation 12 Player
I would now like to transfer this image onto an ESXi host running VMware ESXi Version 5.5.0.
I have tried copying the working directory "C:\Users\xxxx\Downloads\Kali-Linux-2.0.0-vm-amd64\Kali-Linux-2.0.0-vm-amd64" to the ESXi datastore and have tried to import it using a couple of methods:
I tried browsing to the Datastore, right clicking the "Kali-Linux-2.0.0-vm-amd64.vmx" file and selecting "add to inventory"
I tried creating a virtual machine, selecting the option to use and existing disk and pointed it at the VMDK file.
Both methods allow me to create the machine, but fail with the following error when I try to power it up.
Failed to start the virtual machine.
Module DiskEarly power on failed.
Cannot open the disk '/vmfs/volumes/4dc219c6-2eb825c6-0119-d8d3855f4a40/Kali-Linux-2.0.0-vm-amd64/Kali-Linux-2.0.0-vm-amd64.vmdk' or one of the snapshot disks it depends on.
The system cannot find the file specified
VMware ESX cannot find the virtual disk "/vmfs/volumes/4dc219c6-2eb825c6-0119-d8d3855f4a40/Kali-Linux-2.0.0-vm-amd64/Kali-Linux-2.0.0-vm-amd64.vmdk". Verify the path is valid and try again.
I have checked and I can see the VMDK file on the Datastore.
I don't know if it of any significance, but the files on my desktop are broken down into multiple VMDK files and when I copied it to the Datastore, it turned them into one large VMDK file.
It might be best to use vmware converter to import the vm into your esxi host and/or even try an export to OVF from workstation and then an import (deploy OVF) to ESXi host.
From the error generated it looks like the original VM may still have some snapshots. Try and remove any snapshots, then take note of the disk controller and disk type of the workstation vm and check that it is supported for ESXi vm (for example IDE etc.), ESXi likes SCSI.

mkdir: cannot create directory : Protocol error : Virtualbox Shared folder

I am trying to create folders and file in Virtualbox shared folder from Host to guest.
But i get this error mkdir: cannot create directory : Protocol error.
Below are steps i performed to share folder
1:My host OS is Ubuntu and my guest is Ubuntu.
2:I attached a share folder to virtualBox VM
Folder Path:/DR/vault/config
Folder:config selected automount and make permanent.
3:In Guest OS i installed virtualbox guest additions
4:I am trying to mount folder on /mount/config path
I added entry in guest's /etc/fstab as
/config /mount/config vboxsf rw,uid=1000,gid=1000 0 0
Path gets successfully mounted after Guest reboot also i can see the files created in /DR/vault/config(Guest) to /mount/config(Guest) but i cant create folder or file in /mount/config (Guest)
Please suggest if anything is missing or if there is any other way.
In my case, I had the drive full, clearing some space on the drive solved the issue.
I have found this is a problem with filename lengths on DOS hosts.
I have been using VirtualBox VMs as a form of containerised environment for deploying to a JBoss server, having experienced far too many problems with Windows environments for said technology.
I was using a shared-directory with my host machine as I was trying to keep the virtual machine lightweight (i.e. keeping IDEs in the host machine), then checking code into the shared directory for deployment with Maven. However, maven was giving some odd errors when the directory length grew to over 255 characters. Try looking at your file absolute path (type "pwd") and seeing if it's longer than 255.
I've resolved this problem with the following:
On the guest machine, add your user to vboxsf group: sudo adduser username vboxsf
Restart the host machine.
My host OS is Windows, my guest OS Ubuntu.
This might be an indication that the folder does not have the correct permissions on the Virtualbox host.
E.g. my headless Virtualbox server is running as "vbox" user, so I had to give that user write permissions on the host folder.
I had a similar issue, turns out that for me it was the number of folders or length of path name involved in mkdir.
typically I had :
mkdir -p /projects/bot/node_modules/webpack/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/node_modules/yargs/node_modules/cliui/node_modules/center-align/node_modules/align-text/node_modules/kind-of/node_modules/is-buffer
Manually I could create up to the last part of the path but not the 'is-buffer' folder
I am working in vagrant and my projects folder is a shared VM folder, maybe/probably windows' max path length is the reason.

Permanently mount shared folder in Mint Linux running on Virtual Box

I have installed mint Linux 8.0 on Virtual box.
I have created a shared folder in virtual box and i have mounted on linux using mount command.
The problem here is as soon as i shut down and restart linux the mounted folder will not available and (i need to re mount it again).
So how i can mount the shared folder permenently on linux so that i can access any time?
You can mount the shared folder on startup by adding it to fstab.
I am currently using:
Linux Mint 17.3
VirtualBox Version 5.0.16 with Guest Additions installed
The way that I auto mount the drives upon loading is by modifying the
rc.local file located in the /etc folder.
Instructions:
Create a folder on the host machine and create a folder on on the virtual machine
Note: I don't recall if the names need to be named same (including case). Also, I put all of my shared folders in my Documents folder.
Add the folder to the virtual machine's list of shared folders
Click on the virtual machine in VirtualBox
Click on Settings
Click on Shared Folders
Click on the add folder button (located on the right side of the window
Give the folder path, folder name, and click on the "Make Permanent" checkbox
Click the okay buttons
vim into rc.local by typing sudo vim /etc/rc.local in the virtual machine
Note: You will need super user privileges to modify the file which is why sudo is there.
Append the mount command.
Example:
mount -t vboxsf <Folder_Name> /home/< My_Name >/Documents/< Folder_Name >
Note: Be sure to check your syntax in the terminal before appending the command. You won't need a sudo here because it is implied. You will want to double check yourself here because a bad line will prevent further lines from being executed and it won't tell you that there was an error.
Save and exit. (I use wq)
The folder should be mounted when you restart your computer next time.