Problems converting image to VDI

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Rongard
Posts: 3
Joined: 18. Jun 2017, 13:18

Problems converting image to VDI

Post by Rongard »

Hello

I'm trying to convert a image file which I downloaded fromt net to a VDI format using VBoxManage, but keep getting an error which I cannot solve. I'm trying to convert the file using the following command:

Code: Select all

VBoxmanage convertfromraw --format VDI C:\Users\Ron\Documents\Virtualbox_images\lede-17.01.1-x86-64-combined-ext4 C:\Users\Ron\Documents\Virtualbox_images\openwrt.vdi
The output for this command is following:

Code: Select all

Converting from raw image file="C:\Users\Ron\Documents\Virtualbox_images\lede-17.01.1-x86-64-combined-ext4" to file="C:\Users\Ron\Documents\Virtualbox_images\openwrt.vdi"...
VBoxManage.exe: error: Cannot open file "C:\Users\Ron\Documents\Virtualbox_images\lede-17.01.1-x86-64-combined-ext4": VERR_FILE_NOT_FOUND
To me it seems that for some reason VboxManage cannot understand the file path, because the file in the location is definetely there. But for why it cannot understand the path doesn't occur to me cause I've triple checked and the path is correct. I have googled for an answer but haven't found a solution so far so maybe somebody here can help me out?
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Problems converting image to VDI

Post by Martin »

How did you find out the filename? It looks like you are missing the file extension.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems converting image to VDI

Post by mpack »

Where did the source file come from? The filename looks like an official distribution name, but distributing a disk image in raw format would be perverse. My bet is that it's an ISO (which the OP considers synonymous with raw), so the whole conversion question is suspect: official distro's have to be installed, not converted to another container format.

All that "convertfromraw" does it wrap a VDI header around the raw file. If you wrap a VDI header around an ISO then you get a very small - and blank - hard drive, since no OS expects to find an ISO-9660 filesystem on a hard disk.


p.s. In Windows, go to folder options and turn off the "Hide extensions for known file types" feature. Then you'll no longer be confused as to the correct name of a file.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Problems converting image to VDI

Post by socratis »

mpack wrote:Where did the source file come from? The filename looks like an official distribution name
Rongard wrote:lede-17.01.1-x86-64-combined-ext4
It looks like it's part of the LEDE project (https://downloads.lede-project.org/rele ... ts/x86/64/), which describes itself as:
The LEDE Project (“Linux Embedded Development Environment”) is a Linux operating system based on OpenWrt. It is a complete replacement for the vendor-supplied firmware of a wide range of wireless routers and non-network devices. See the Table of Hardware for supported devices.
I don't believe that this is not something that you could use with VirtualBox, no matter how much you "massage" it. It's not supposed to run on this type of hardware.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems converting image to VDI

Post by mpack »

Ah, I see. So not a PC OS. In fact almost certainly a flash image, not a disk image, so copying it to the sectors of a disk image will do nothing useful at all.

Thinking about it, I'm wondering what the OP expected to get out of this? If it's an embedded flash image then it clearly doesn't have a user interface of any kind - so even if you somehow got it to boot, you'd have a black screen and no means of input.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Problems converting image to VDI

Post by Martin »

Looks like they also have x86-pentium4 evaluation builds for QEMU and VMware, but the x86-64 build doesn't list any known devices.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems converting image to VDI

Post by mpack »

By coincidence I've also been working on a means of loading a flash image. If you have such an image then you don't need a VM, you need a flash programmer. Below is one that I knocked up yesterday (I worked it out on a breadboard, then converted it to perfboard).
ATTiny HV Programmer Pinout.jpg
ATTiny HV Programmer Pinout.jpg (157.8 KiB) Viewed 3498 times
The socket is for a ATTiny AVR microcontroller. You pop an MCU in there and then transmit the flash image via a USB-TTL converter. The board provides the connections for the serial protocol and the strange voltages the MCU needs during programming.

@OP: if you don't have something like this, or a development environment designed to download to a specific board, then the flash image is useless to you.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems converting image to VDI

Post by mpack »

Martin wrote:Looks like they also have x86-pentium4 evaluation builds for QEMU and VMware
? Why would they provide a QEMU etc version? What use is a hardware driver in a VM? Even if your goal was to do debugging you'd still need a full simulation of the target hardware, not a virtual PC. I can't believe that many people make WiFi routers based on x86 PC motherboards. They're going to use STM32 (ARM), Blackfin, NXP, AVR etc - i.e. the same low power I/O management CPUs that every other embedded mfr uses. A PC would be really crappy at embedded.

I appreciate that you aren't the source of this info Martin, but I just want to express my surprise though I frankly don't have time to check out the source myself. Too busy with my own embedded projects!
Rongard
Posts: 3
Joined: 18. Jun 2017, 13:18

Re: Problems converting image to VDI

Post by Rongard »

Hello

First of all, sorry for not replying this long. I was on a vaccation and had to keep my hands away from computer.

The source for this project comes from openWRT:
https://wiki.openwrt.org/doc/howto/virtualbox

It's a linux distro and is meant to run on embedded systems (such as Ventana SBCs), but should work in virtualbox as well. My goal is to use it on a SBC for communicating with WiFi module, but I would like to start by getting familiar with openWRT. As the file not being a image, it's clearly stated in the intructions that it is so I had no reason to suspect otherwise.

Thanks for the help so far!
Rongard
Posts: 3
Joined: 18. Jun 2017, 13:18

Re: Problems converting image to VDI

Post by Rongard »

Martin wrote:How did you find out the filename? It looks like you are missing the file extension.

I tried it with file extensions as well, forgot to mention that. Still no luck.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems converting image to VDI

Post by mpack »

Rongard wrote: It's a linux distro and is meant to run on embedded systems (such as Ventana SBCs).
I do this as my day job, so believe me when I say that an embedded flash - even if intended for an Intel based SBC (***) - is unlikely to run in a VM. A PC Operating System has a huge installer, much of which consists of drivers for the vast array of hardware that the installer might find in a target PC. An embedded OS image has none of that. The image will typically only contain drivers for the exact chipsets found on the SBC. So, unless you can create a VM which exactly duplicates those chipsets, then the image cannot run.

Secondly, embedded devices don't have installers. The image will typically be a flash image as I've already mentioned. A flash image is more akin to a RAM memory dump than a disk drive (embedded devices rarely have disk drives of any kind). A memory dump contains no filesystem and no installer. Copying that memory image onto a virtual hard disk will be entirely useless.

I suggest that you browse the forums of the OpenWrt project and see what you're supposed to do with the file you downloaded. Is anyone else on that forum talking about running it on VirtualBox? (and I still don't understand what the point of that would be - embedded devices are physical by nature, not virtual).


(***) And I just checked this. The Ventana SBC that I found with a quick search (possibly there is more than one model) is based on a dual core ARM, it is not any kind of PC. So add that to the list of dead ends: an Intel based WinPC VM cannot possibly run an ARM based flash image.
Post Reply