Transferring a disk image to a virtual machine. Import and Export of a virtual machine in VirtualBox

VirtualBox is a useful application from Oracle for creating virtual machines. In simple words, you can run multiple operating systems on your computer at the same time, such as Windows, Android, or . This is a shell that emulates the operation of a real computer with certain characteristics (processor, RAM, video memory). But if you are reading this article, then you probably know why VirtualBox is used. We will answer a question that Oracle VM users often ask – “ How to transfer files to a VirtualBox virtual machine

For example, I use Windows 10 and installed good old Windows XP on a virtual machine. How to exchange files between the real and additional OS? Very simple.

Method 1 – Shared Folders

First of all, you need to install the VirtualBox Guest Additions. Without them, you won't be able to work with shared folders. Start the virtual machine, select “Devices”, “Mount Guest OS Additions disk image” from the menu.

The installation will begin, after which you will need to reboot the machine. Installed? We can continue.

Launch VirtualBox, select the desired virtual machine and click “Configure”.

Go to the “Shared Folders” tab. Click on the add a new folder icon, specify its name and location. Also, do not forget to check the box next to “Auto-connect” so that the guest OS will automatically connect this folder.

Launch the virtual OS. A network drive has appeared in Windows XP Explorer, which is a shared folder that can be used with both the guest OS and the real one. Now you can calmly transfer the necessary files to the VirtualBox virtual machine.

Method 2 – Drag’n’Drop function

Oracle VM has a very useful feature called Drag'n'Drop. It allows you to transfer files using the mouse, dragging them to the desired location. In the virtual settings. machine, go to “General”, “Advanced” and activate this function. The mode is bidirectional.

There are several ways to convert an installed Windows OS into a virtual machine image. The created image can be used, for example, for testing, to check the stability of the system after installing an update, or to record the state of an old machine before making changes.

Most virtualization programs support the function of converting installed Windows OS into virtual machine images. Some solutions already come with built-in functionality, but in some cases you may need to use third-party products for the same purpose.

This guide provides instructions for converting Windows installations to Microsoft Hyper-V, VirtualBox, and VMware virtual images.

Migrating Windows OS to a Microsoft Hyper-V virtual machine is easy with Disk2vhd from Sysinternals.

The program is portable, it can be launched from any location on the disk after unpacking the archive. The application requires administrator rights to operate. The program can be used to create a virtual machine from one or more volumes on a computer.

Note: The program can be run in command line mode using the format:

The main application window displays the destination path and file name, and just below it displays the available volumes. Please note that you need to select a target location with sufficient free storage space, otherwise the image creation process will be interrupted.

The user must select the target path and file name (vhdx extension), as well as the volumes to include in the virtual image.

You can select just the Windows partition or even convert non-system partitions to VHD images without selecting the Windows partition.

Disk2VHD comes with two additional options that are specified at startup. The first one sets the output format to VHDX. You can disable this option to use VHD.

VHDX has several advantages such as support for larger virtual disks (64 TB vs 2 TB), better protection against corruption, remote online resizing, etc. VHD is needed mainly for compatibility purposes, such as when the product does not support VHDX, and also when you want to convert the image to Virtualbox.

The second option allows you to use a shadow copy of the volume.

Disk2VHD processes the selected volumes and turns them into virtual disk images that are saved in the selected location.

Once you have the VHD image, you can use the vboxmanage command line tool that comes with VirtualBox to clone the media and save it in a different format.

  1. Press the Windows key, enter cmd.exe, hold Ctrl + Shift and press Enter to launch Command Prompt with administrator rights.
  2. Go to the VirtualBox folder on the system, for example, C:\Program Files\Oracle\VirtualBox using the cd command.
  3. Use the vboxmanage clonemedium disk command to convert a VHD disk image to VDI format. For example: vboxmanage clonemedium disk o:\source.vhd o:\output.vdi

The conversion may take some time depending on the size of the image and your computer's available resources.

You can create virtual Windows machine images for VMware using VMware vCenter Converter. You can download the program from the official VMware website, but it requires an account. On our website the utility is available for download without registration.

Note: The program creates a virtual image of the full machine. There is no option in the GUI to exclude hard drives or partitions.

The installer size is approximately 170 megabytes. During installation, you will be asked to join the Customer Experience Improvement Program.

To convert a running Windows system into a virtual image for VMware, select the “Convert Machine” option in the main interface of the program to get started.

After loading the wizard, make sure that the source type is set to “enabled” and “this local computer” is selected. You can also create virtual images of remote computers, but this requires you to provide the device name or IP address, as well as credentials.

Select the VMware virtual machine in the Target Type section on the next page and select the target folder to save the image.

Creating the image may take some time, depending on the number of volumes, their sizes, and device resources.

Found a typo? Highlight and press Ctrl + Enter

Transfer a configured virtual machine.

The "export configurations" function of the VirtualBox program is designed to create an image of a virtual machine, which can then be imported using another "import configurations" function, for example, after reinstalling the system, transfer it to another computer and, after importing, launch an already configured virtual machine, as well as upload created image to some cloud service.

A virtual machine image is a file with the extension .ova; it is a universal format that can be used in other virtualization programs, such as VMware Workstation or Hyper-V.

Export

Open the alt menu, “File”, “Export configurations”, or press the key combination CTRL + E. In the dialog that opens, the first element will be a list with an expanded selection; if several virtual machines have been created, select the one you need and click the “Next” button, or, if you changed the language in the VirtualBox settings to Russian, “Forward.

By default, VirtualBox saves the image file to the path:

C":\Users\account name\Documents

in Windows 7 and higher, and in XP:

C:\Documents and Settings\*****\MyDocuments

In the next dialog, you can select another folder, for this we will not write anything in the editor, press Tab, get to the button that screen readers call “button”, click. In the “Save As” dialog that opens, write the file name, do not change the file type, select the folder to save, and click the “Save” button, and then, in the export dialog, “Forward”, and in the next dialog, the “Export” button. The export process will begin, its duration will depend on the size of the selected virtual machine.

Import

To call the import dialog, open the alt menu, “File”, “Import configurations”, or press CTRL+I. In the dialog that opens, the focus goes to the editor, in which you need to specify the path to the .ova file, skip this editor, use the button, in the overview that opens, indicate the saved virtual machine image file, press Enter, then, in the import dialog, “Forward”.

In the next dialog, we won’t be able to change anything in the parameter tree; the “Generate new Mac addresses for all network adapters” checkbox can be left unchecked; click the “Import” button. The import process will begin. After it is completed, the virtual machine can be started.

A problem was identified - the designer bought a new computer and needed to transfer all its programs from the old one (XP) to the new one. A particular difficulty was caused by the transfer of programs from “Estimate Wizard” with all the settings, databases and a bunch of other incomprehensible things. Technical support asked for a substantial amount for the transfer, and they honestly said that even they wouldn’t be able to do it “on the fly.” Then a bunch of other such specific programs “surfaced” (some even for DOS) that I really became sad...

The process of torment itself...

I started digging into virtualization and decided to bring in help Virtual PC 2007, which has helped me out more than once in similar situations. I will not describe the entire transfer process, an ambush was waiting where no one expected it, Virtual PC 2007, in principle, does not work with USB ports of the host machine, i.e. The USB dongle for the software did not work, which lost the whole point of transferring. Virtualbox and Vmware technologies did not suit me in principle; I wanted something simpler and more efficient.

Hello friends! Today, Vladimir has prepared some amazing material for fans of virtual machines!

Hello admin, please tell me how to transfer the VirtualBox virtual machine to a regular computer?

A few months ago Windows 10 came out and I was afraid to install it directly on my computer, but installed it on a virtual machine, then installed all the programs I needed into the operating system: browsers, free OpenOffice, Skype and so on, after a while I began to notice that the tenth I liked Windows and even had the idea of ​​transferring it to a regular computer! Is this possible? I couldn't find such information on the Internet.

How to transfer a VirtualBox virtual machine to a regular computer. Or how to transfer Windows 10 from a virtual machine to a desktop PC using the Vhd2disk program

Hello friends! It is possible to transfer the VirtualBox virtual machine to a regular computer, and this need often arises among system administrators, developers of various software and other computer specialists; it may also be necessary for an ordinary PC user.

  • Note: There is a website created specifically for virtual machine lovers.

To transfer, you can use a still little-known program Vhd2disk- designed specifically for transferring virtual operating systems to physical hardware, or in other words - to create an exact copy of a virtual VHD disk on a regular hard drive.

So, we have a VirtualBox virtual machine with Windows 10 installed on it.

Disk management

Disk 0, this is a virtual disk with installed Windows 10.

When creating the virtual disk, I specified the size as 250 GB. The operating system is installed on the drive (C:), and various files are located on the drive (E:).

First of all, we convert the virtual disk of the VDI format belonging to the virtual machine into the VHD format.

File -->Virtual Media Manager.

Select with the left mouse the VDI virtual disk belonging to the operating system that we want to transfer to a regular computer and click on the button Copy.

Mark the item VHD (Virtual Hard Disk).

Next.

Mark the item Dynamic virtual hard disk.

Next.

Left-click on the Explorer button.

We select the location to save the future copy of the virtual hard disk, I will select the drive ( G:), since there is a lot of free space.

Copy.

There is a short process of converting the VDI virtual hard disk to the VHD format.

At the end of the process, click on the button Close.

A copy of it appeared on the disk (G:) next to the VDI virtual hard disk, only in VHD format.

Disk management

You need to deploy a copy of the virtual disk onto a completely blank physical hard disk without partitions.

Open the Disk Management snap-in.

I will choose Disc 1.

I delete all partitions on it.

Vhd2disk

It's time for the Vhd2disk program.

Let's launch the program.

In the main Vhd2disk window, left-click on the Explorer button.

In the explorer that opens, find a copy of our VHD virtual disk, select it with the left mouse button and click Open VHD.

In field Target drive we must indicate the serial number of the hard drive to which we will deploy a copy of the virtual disk. Click on the arrow.

Select from the drop-down list PhysicalDrive1, since we will expand the contents of the VHD virtual disk on Disc 1.

Click on the button Vhd to disk.

The process of copying the contents of the VHD virtual hard disk to a regular hard disk begins.

The process has completed successfully.

Status: VHD dumped on drive successfully!(VHD successfully copied to hard drive!).

Go to Disk Management, click Action-->Update.

As you can see, the hard disk (Disk 1) is an exact copy of the VHD virtual hard disk from the virtual machine and Windows 10 installed.

Trying to boot into Windows 10.

We restart the computer and enter the boot menu, select our hard drive (a copy of the VHD virtual disk with Windows 10).

Preparing devices

Windows 10 is loaded!

Disk management.

There are several devices in the task manager without drivers, but this is not a problem for us; we install the drivers using .



Loading...
Top