We boot the virtual machine from the USB flash drive with the Virtual Machine USB Boot program. Bootable flash drive in VirtualBox How to boot from a flash drive in a virtual machine

All popular hypervisors for Windows - Hyper-V , virtual box , VMware- provide for the launch of virtual machines (VM) from boot ISO-images and flash drives. launch VM from the latter, in every case it will not be a process without problems: without dancing with a tambourine from flash drives UEFI only run VM on the base ON EFI in programs virtual box And VMware. How to simplify the launch of a VM from flash drives in other cases?

To do this, you can create a so-called virtual flash drive- all contents of the real USB-carrier transfer to virtual HDD and, accordingly, run VM from him. But the content must be transferred along with the structure of the physical flash drive - so that the virtual disk inherits all partitions, if there are several (for example, in the case of Mac OS or Chrome OS) , as well as boot device attributes (unless it's a UEFI media) . This can be done in at least two ways, described below.

All actions in our case will be carried out with . In other programs for virtualization, it is necessary to proceed by analogy.

1. R-Drive Image program

The first way to create a virtual flash drive is to transfer the structure and contents of a real USB-carrier to virtual disk using the program- backer. Opening the parameters of an existing VM and we click.

Adding another disk

Leave the controller type as default.

Let's create a new disk. We indicate its size: let it be approximately the same as the size of a flash drive, but still let it differ a little. This is necessary so as not to confuse devices when cloning. Save as one file.

Specify the placement path. We press.

We launch VM, connect a real flash drive to it. In the guest OS, install trial- program version . In its window, select "Copy Disk to Disk".

In the graph "A source" choose a real flash drive. In the graph "Receiver"- the newly created virtual disk.

AND - "Begin".

After cloning is completed, exit the program.

Now in the guest explorer OS we have two identical devices.

We can disconnect the real flash drive from VM. As well as we can disconnect the virtual disk from the current VM and use it to launch others VM.

2. Rufus program

The second way to create a virtual flash drive is to use the program's capabilities Rufus 3.1. In updated version 3.x this program, in addition to the existing functions for creating bootable USB-devices, learned how to clone real flash drives into files vhd. BUT vhd compatible with Hyper-V, and with virtual box, And VMware. We launch Rufus 3.1 on the host system. Choose the right USB-carrier, if several of them are connected, in the column "Device". Next, press the button in the form of a diskette.

Specify the file storage path vhd .

We are waiting for the completion of the operation and close Rufus.

3. Connecting a virtual flash drive and starting from it

So, the virtual flash drive has been created, how to connect it to the VM and, accordingly, launch it?

In parameters VM click HDD.

Select an existing one.

In the explorer window, specify the path to the file storage folder vhd. In the file display column, put . And we click our virtual vhd- flash drive.

On the EFI-cars enter BIOS- either use the button on the hypervisor toolbar, or at startup VM press F2.

In the bootloader window select hard drive with the number under which it is listed in the general list of connected virtual disks, but calculated from zero. In our case, the virtual flash drive is the second drive. VM, so in EFI-firmware it is listed as Hard Drive 1.0.

On regular VM created on the basis of emulation BIOS Legacy to boot from a virtual flash drive, you need to VM specify it as the first hard drive. You need to delete all existing disks of the machine and add them again, specifying the virtual flash drive first.

Hello friends! Huge number of users personal computer use . The fact is that it is very convenient, you can install any operating system (guest) on a virtual machine and use it like a real one, install all your favorite programs on it and use it like a normal system if you infect it with viruses or for some reason. or for some reason it will stop loading for you, then you can very simply restore it from a backup or install it again, all this will happen without damage to your main operating system (host) installed on your computer.

In the process of working with a virtual machine, you may have (and more than once) the need to boot it from a bootable USB flash drive, for example, to check whether the flash drive is bootable or not. The generally accepted manual way to create a USB.vmdk file linking a flash drive and a virtual machine is not the easiest, so I suggest you use the very simple Virtual Machine USB Boot 1.5 program, I'm sure that after reading the article you will be surprised how easy it works. But in the work of the program, especially with the last operating system Windows 10 has nuances, so read the article more carefully.

So, we go to the official website of the utility and download the installer you need.

http://reboot.pro/files/download/339-virtual-machine-usb-boot/

You can download the portable version of the program, or you can download the installer.

I will download a portable version, you can run it directly from a USB flash drive (just in case, I post it on my cloud storage).

After downloading, run the Virtual Machine USB Boot 1.5 program.

In the main window of the program, click Add(Add).

In step VM name click on the arrow

and select the name of the virtual machine that we want to boot from the flash drive from the drop-down list. There are two virtual machines on my laptop: Windows 10 and Windows 7,

i want to download from flash drive Windows 10, so I select it from the list.

In step Drive to add and boot choose bootable flash drive.

OK .

Important: now, if you have VirtualBox running, you need to close it, since the virtual machine will be launched by the Virtual Machine USB Boot 1.5 program.

We press START.

The virtual machine starts and the following error occurs: FATAL: No bootable medium found! System halted.

Friends, the fact is that the program Virtual Machine USB Boot 1.5 works slightly incorrectly with latest version virtual machine virtualbox- 5.0.14 . and does not automatically create an IDE controller for the vmdk file.

Note: To boot VirtualBox from a USB flash drive, the Virtual Machine USB Boot 1.5 program specifically creates a vmdk file, it is this file that connects the virtual machine to the USB flash drive. This file vmdk is created in the program's personal folder: C:\Users\Username\VirtualBox VMs\Windows 10 (virtual machine name).

To avoid the error “FATAL: No bootable medium found! System halted" when booting a virtual machine from a flash drive, we ourselves need to create IDE controller for vmdk.

Click on the button carriers.

Click on the button in the shape of a rhombus and select AddIDE controller.

IDE controller added.

W let's run the programVirtual Machine USB Boot 1.5 Revisited

Pursuing system administration I often have to use virtual machines type Oracle WM VirtualBox And WMWare Workstation. I use VirtualBox \"I use it more often because it is simpler and easier for single launches. There was a need to boot the virtual machine from a real USB flash drive, in this case, to check a freshly assembled bootable flash drive. But there is one nuisance - through the main interface of the VirtualBox program you cannot boot a virtual machine from a physical USB drive, however, there is a way to solve this problem.This method will be discussed in the article.

To download virtual VirtualBox machine from external USB disk, you need to create USB disk clone as *.vmdk file, through which the VirtualBox host will communicate with a physical external USB drive. Such a file will take several kilobytes, because. contains only data for communication with the USB drive.

1. Create a file that serves as a bridge between VirtualBox and a USB drive.

To create a *.vmdk file, there is the vboxmanage.exe utility, which is included in the standard VirtualBox package, so you do not need to download it separately.

So, to create such a file, you need to run the following command in a command prompt window, replacing the path to the VirtualBox directory with your own:

"C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe" internalcommands createrawvmdk -filename c:\\temp\\usb.vmdk -rawdisk \\\\.\\PhysicalDrive2 -register

Here you should pay attention to two parameters:

To find out the number of the external USB drive to which the file should be associated (usually an external USB HDD with the number 1 , if only one hard drive is installed), you can peep it in "Control Panel → Administrative Tools → Computer Management → Disk Management".

Now all that's left is to configure the VirtualBox host to boot from the newly created virtual disk.

2. Installation in VirtualBox *.vmdk file as a boot disk.

First you need to add the created usb.vmdk to the list hard drives in the VirtualBox virtual media manager.

Next, go to the "Properties" of the virtual machine (which must be booted from a USB external drive) and in the "Media" section, install the added virtual hard disk usb.vmdk in Slot"Primary IDE Master" as in the screenshot.

Done, now you can boot the virtual machine from an external USB drive.

I have a computer with which I constantly work and have fun, Windows 7 is running on it as an operating system. I also have a portable USB hard drive, on which I faked Ubuntu Linux as a boot OS. I use it as a "rescue" operating system, like Live CD, and sometimes I work in it. In general, I thought that it would not be bad to be able to load this OS in VirtualBox. After scraping various instructions from manuals and the Internet, I made my own recipe for how to do this.

And so, we run Ubuntu Linux installed on a USB HDD in VirtualBox, like a normal virtual machine. By the way, this recipe is also suitable for flash drives.

###Given: * Computer with Windows 7 x64 * Bootable USB HDD with Ubuntu 12.04TLS

###A task:

Run Ubuntu installed on a USB Hard Disk Drive inside VirtualBox and use the two systems in parallel.

###Solution:

To get started you need run command line(console, cmd.exe) on behalf of the administrator (!!! MANDATORY !!!) if you are using Windows 7 or Vista.

And execute the following three commands in it. C: cd "%PROGRAMFILES%\..\Program Files\Oracle\VirtualBox\" VBoxManage internalcommands createrawvmdk -filename "%USERPROFILE%\USB-HDD-connector.vmdk" -rawdisk \\.\PhysicalDrive1

###Now let's take a closer look at these commands:

You will need the first line if the current path in the console starts with a partition different from the one in which your VirtualBox is installed.

The second line defines the directory in which the following commands will be executed. In my case, this is C:\Program Files\Oracle\VirtualBox\ ”, since my virtualization program is installed in the folder that its developers offer for installation.

The third command creates a file USB-HDD-connector.vmdk, which will link our external HDD to the operating system and VirtualBox. It is this file that will need to be added as a primary disk to boot your virtual machine. BUT! Before executing this command, you need to clarify the number by which your external hard drive is known to the system.

###How to find out the disk number from which you want to boot?

And very simple! To do this, open the "Computer Management" panel, "Disk Management" section. The panel can be called in two ways:

Right-click on the shortcut "my computer" and select the line "manage" in the menu; - Run the command `%windir%\system32\compmgmt.msc /s`. To do this, click Win+R, type this command and press enter.

Personally, I prefer the second option, although for this you need to remember this command. Fortunately, I once added a button to the toolbar of my TotalCommander that opens the “computer management” window. What, then I digress ...

In the "disk management" section, look for your disk. Disk 0, Disk 1, Disk 2… The numbers are the disk numbers.

In my case it was Disc 1. So, in the above command there is such a substring \\.\PhysicalDrive1 . The last digit here should match the disk number that you found out in the computer control panel.

Another point that I would like to describe is the place where the file we need will be created. In my version - %USERPROFILE%\USB-HDD-connector.vmdk - this means that in the %USERPROFILE% folder (this is a Windows system variable that will be replaced by the command line interpreter with the path to the folder of the user under which you are authorized in the system) a USB-HDD-connector.vmdk file will be created. Of course, you can use any file name and path you like here, but if there are spaces in this line, then it must be enclosed in quotes. Otherwise, the interpreter will interpret this gap as a jump to the next instruction.

###As a result, your console should look something like this:

If the command is successful and the link file is created, you will see the response: RAW host disk access VMDK file %userpofile%\USB-HDD-connector.vmdk created successfully ”. Vooot. The only thing left is to create a virtual machine and choose as hard drive the file we just created. Oh yeah… And include it as “primary master”.

I would like to warn you right away that VirtualBox may swear that such a disk does not exist and the virtual machine will not start. This is due to the fact that the user under which you are authorized in the system does not have enough rights. To get around this problem, run your VirtualBox as an administrator.

Usually, the installation of the operating system in VirtualBox occurs via an ISO file or a CD / DVD disc. But did you know that you can also boot from a USB drive in VirtualBox? Many people don't know this, simply because this feature is hidden and not available through the graphical user interface. In fact, you will have to open a terminal (or command line) and use the VBoxManage command to access this feature. In this guide, we will look at the ability to download (or install the OS) from USB devices in Virtualbox.
Note: This guide is carried out on a Windows machine. The steps may be different for Linux/Mac.
Note 2: This guide assumes that you already have a bootable USB drive with some operating system (probably a Linux distribution) installed on it.

Booting from a USB stick in VirtualBox

Before doing anything, run Windows system, and plug in a bootable USB drive. Now we need the number of this bootable USB disk.
Note: Don't confuse the drive number with the drive letter. They are not the same.
We can get the disk number from Disk Management or any other third party disk management software. We will currently be using Windows utility. Press the key combination "Win + R", and use the command " diskmgmt.msc”, then press the “OK” button. About others useful commands dialog box "Run" read the article.

Look at the USB drive and remember its number. In my case, the USB drive shows up as "Drive 7", so the drive number is "7".

After you know the disk number, run " command line» with administrator rights. In Windows 8, this can be done by pressing the keyboard shortcut “Win ​​+ X” and selecting the desired menu item.

Navigate to the VirtualBox installation folder using the following command. If you installed VirtualBox in some other directory or drive, then change the command accordingly.

cd %programfiles%\Oracle\VirtualBox

Enter the following command, replacing the “#” character with the actual drive number. This command will create a VMDK file in drive C which points to a physical USB drive.

VBoxManage internalcommands createrawvmdk -filename C:\extdisk.vmdk -rawdisk \\.\PhysicalDrive#

After you run the command, you will receive a confirmation message and you will also see a new file named “extdisk.vmdk” in the root of drive “C”.

Now open VirtualBox with administrator rights. If you don't do this, VirtualBox will not boot from the USB drive.
After opening VirtualBox, create a new virtual machine as usual. At the stage when VirtualBox prompts you to add a hard disk, set the switch to "Use an existing virtual hard disk". Click on that little folder icon and select the file we just created. Click on the Create button to complete the process.

You will see the new virtual machine listed on the left side of the VirtualBox window. Just select it and click on the "Run" button located in top menu to boot from the USB drive. As you can see in the picture below, I have successfully booted into my Ubuntu live disk.

That's all there is to it, and it's really, really simple. I hope that my article was of interest to you. Write in the comments your chips of working with VirtualBox, subscribe to our news and stay with us.