0

I have created a bootable usb and created a virtual box raw disk with the following command-

sudo VBoxManage internalcommands createrawvmdk -filename popliveusb.vmdk -rawdisk /dev/sdd1

But when I was adding raw disk to my virtual machine's storage, I was getting VERR_ACCESS_DENIED error. Then I followed this solution. I changed the owner using this command sudo chown eh54n:eh54n popliveusb.vmdk. Then added my user to disk group using this command sudo usermod -a -G disk $USER.

But now I am getting VERR_FILE_NOT_FOUND error. This is the full error-

Failed to open the disk image file /home/eh54n/popliveusb.vmdk.

Could not find file for the medium '/home/eh54n/popliveusb.vmdk' (VERR_FILE_NOT_FOUND).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: MediumWrap
Interface: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}
Callee: IVirtualBox {d0a0163f-e254-4e5b-a1f2-011cf991c38d}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)

When I run the VirtualBox using sudo, I don't have my VMs. How can I add the vmdk raw disk to my VM?

1 Answers1

0

I found the problem. It was a rookie mistake. After creating the vmdk file I removed the usb stick. That's why the VM did not find the files. It was also mentioned in the VirtualBox Manual.

On a Linux host, to create an image that represents an entire physical hard disk which will not contain any actual data, as this will all be stored on the physical disk