Home Other Backing up VirtualBox virtual machines. Back up your system using virtualization Import a virtual machine

Backing up VirtualBox virtual machines. Back up your system using virtualization Import a virtual machine

Just as a person only in his illusions can rebuff a formidable boss, be rude to a grumpy mother-in-law or even indulge in passion with an inaccessible passion, without being able to do this in reality, computer users cannot carry out all kinds of experiments with the operating system and software. After all, you can lose valuable data, and reinstalling the system, installing and configuring programs will take a lot of time. Fortunately, for avid experimenters whose curious mind does not allow them to live in peace, just let them “use” the operating system and delve into the settings of various programs, there are programs for creating virtual computers. - one of these, or rather, the most popular due to its free distribution and friendly user interface.

1. Travel along time lines and events of virtual operating systems

VirtualBox can create virtual computers and install virtual operating systems on them, with which you can do everything that cannot be done with the main ones installed on a physical computer. Having installed a virtual operating system, you can do whatever you want with it - experiment with its settings, test various software from unverified Internet resources, you can even launch viruses to study them. If your experiments end in failure, you can simply remove the virtual operating system. And all you risk is the time you spend installing a new system on the VirtualBox virtual machine. But in return you will receive invaluable experience.

But even the time spent on installing a new virtual operating system can be avoided if you get used to working with snapshots of its state. A snapshot of the system state, also known as a snapshot, is a recording of certain settings of the virtual machine itself, the operating system, and installed programs at a certain moment. Having recorded the state of the virtual operating system once, you can return to it in the future when problems arise with the system. In fact, this is an analogue of the procedure for rolling back the operating system or restoring it from a backup copy, only in the VirtualBox virtual environment everything happens much simpler and a little faster.

It is not always possible to neutralize a failed experiment with the settings of a virtual operating system and third-party software without saving the changes when shutting down. For example, when installing system patches, drivers, some antiviruses and other programs that require a reboot immediately after installation, changes to the VirtualBox virtual machine will be applied during its restart. In such cases, it is better to take a snapshot of the system state. In addition, VirtualBox allows you to take many snapshots, and you can return to any of the states of the virtual machine at any time - a kind of journey along its time lines and events, now into the past, now into the future, now into the present.

2. How to create a snapshot of a virtual machine in VirtualBox

To create a snapshot of the system, run it in a virtual machine. From the VirtualBox menu, select " Car", then - " To take a photo».

A window will appear to give the photo a name and description.

You can leave the default name and not enter any description, but if there are many such system snapshots in the future, you will get confused. Therefore, it is better to introduce at least some clarifications for yourself.

It doesn’t take long to create a snapshot, especially if the virtual system is not yet stuffed with settings and programs.

Now you can begin the most risky experiments - installing system patches, dubious programs, enabling and disabling various system services, and carrying out any other actions that you would never dare to do if it were the main operating system of your computer. From now on, there is more than enough protection from unsuccessful experiments - not only is it a virtual operating system, but you can also roll back actions at any time.

How to restore a virtual operating system from a snapshot?

In the main menu of VirtualBox, select the desired virtual operating system, if you have several of them, and switch the right side of the program window from the default active button to Details" to the " button Pictures».

A window will open displaying all the snapshots taken of the system state. Select a snapshot of the system state to which you want to return it, call up the context menu on it with the right mouse button and click “ Restore snapshot».

VirtualBox will prompt you to additionally create a snapshot of the current system state, so that if you suddenly regret reverting to an earlier state, you can switch back to the current state. A snapshot of the current state will not be superfluous, so check the box to agree to its creation and click “ Restore».

Give the snapshot of the current system state a name and description, then click " OK».

After this, VirtualBox will immediately begin restoring the system from the previously created snapshot.

That’s it – you can start working with the virtual system in the state in which you once saved it.

3. How to delete an unnecessary snapshot of a virtual machine

If you periodically take snapshots of the state of a virtual system, over time you will accumulate quite a few of them. To avoid cluttering up your hard drive space, you can delete unnecessary pictures. How to delete a photo? Select the system snapshot you want to delete, open the context menu on it and select " Delete photo».

Then confirm the deletion.

4. Virtual machine snapshot details

If you have accumulated many system snapshots, when choosing a restore point or deleting unnecessary snapshots, you can view detailed information about them to select exactly what you need. To do this, call the context menu on a particular image and select “ Show details».

Detailed information about the snapshot will open, where you will see a description if you specified one when creating it, the date when the snapshot of the system state was taken, and other parameters.

Did this article help you?

Copyright © Acronis International GmbH, 2002-2013

To be able to update a virtual machine, the program stores several

intermediate snapshots with names Backup copy… And Replica…; their

needs to be stored. Unneeded snapshots are deleted automatically.

Last snapshot Replica… corresponds to the result of the latter

transformations. You can go to this snapshot to return the machine to this

condition, for example, if after working with the machine you need to cancel the changes made.

Other snapshots are for internal use by the program.

6.2.3 Restoring to a “New virtual machine”

Instead of converting the .tib file to a virtual disk file, which requires additional

steps to start working with a virtual disk, Acronis Backup & Recovery 11.5 performs

conversion by restoring a disk backup to a fully configured and

a running new virtual machine. While setting up a restore operation

you can adapt the configuration of the virtual machine to the requirements of the situation.

By using Acronis Backup & Recovery 11.5 Agent for Windows or agent for Linux Can

create a new virtual machine in a local or network folder. You can start the car

using appropriate virtualization software or prepare

machine files for further use. The following table contains information about

available virtual machine formats and steps you can take to

adding a machine to the virtualization server.

VM format

Next steps and tool to use Target platform

virtualization

VMware Workstation

Export using VMware Workstation or
convert to OVF by selecting VMware OVF Tool >

Deploy OVF template (VMware OVF Tool >

Deploy OVF template to vSphere Client

Microsoft Virtual PC*

Add VHD file to Hyper-V machine

Citrix XenServer OVA

Import using Citrix XenCenter

Virtual machines on

kernel-based (sector-by-sector

Move the virtual machine files to

machine running Linux OS and start the virtual machine

using Virtual Machine Manager

Red Hat Enterprise

Virtualization (RHEV)

(sector format)

Import using RHEV Manager

*Microsoft Virtual PC does not support disks larger than 127 GB. With Acronis you can create

a Virtual PC machine with larger disks to attach the disks to the virtual machine

Microsoft Hyper-V.

By using Acronis Backup & Recovery 11.5 Agent for Hyper-V or agent for ESX(i) Can

create a new virtual machine directly on the corresponding virtualization server.

Necessary steps

How to restore to a new virtual machine

1. Connect the console to the management server, to the machine on which the agent is installed, or to

machine booting from bootable media.

2. Press the button Restore to open the page Data recovery(p.

Many businesses, as well as home users, are increasingly using virtual machines to perform various tasks and increase the efficiency of their activities. If previously virtual machines were used mainly by enthusiasts, now the quality of desktop and server virtualization platforms has allowed them to be used by professionals on a large scale. The ability to run multiple virtual systems on one physical computer has many advantages, including savings on hardware, simplified maintenance, and reduced energy costs in large data centers. In addition, an important advantage of virtual machines is their easy portability to another physical platform and a simple procedure for backing them up. But just like regular operating systems, virtual environments require high attention to creating backup copies of critical data. When running virtual machines in an enterprise production environment, many companies plan entire strategies for archiving and recovering virtual infrastructure after failures, which are called Disaster Recovery.

Many commercial virtualization platform providers offer enterprise users built-in virtual machine backup tools, such as VMware Consolidated Backup (VCB) for the ESX Server platform. However, in the SMB (Small and Medium Business) sector, where the number of virtual machines used is small, there are practically no backup tools provided by the platform manufacturer. As a result, small companies have to hire system administrators to write various scripts, as well as use standard operating system utilities to archive and restore files and folders with vital data.

Understanding data backup

Along with the virtual infrastructure planning process, it is also necessary to initiate the process of developing a Disaster Recovery Plan. First of all, it is necessary to highlight the most critical elements of the IT infrastructure that are potentially susceptible to damage from internal and external sources, such as power outages, hard drive failures, virus threats, and others. After this, it is necessary to consider the frequency of backup of virtual machines of various categories depending on the degree of criticality. The company's virtual production servers, which operate in full public availability mode, must be archived quite often and regularly and have the ability to be quickly restored in the event of a failure. An organization's internal servers, which do not require as much attention and rapid recovery, can be backed up less frequently, with longer recovery times. Then you need to determine which storage devices will be used for archiving (IDE or SCSI drives of other servers, SAN devices, etc.).

When choosing the frequency of archiving, it is necessary to take into account that some types of backup have the property of creating quick backups, but slower recovery. Conversely, it is possible to perform longer archiving with shorter recovery times. The following are the main types of data backup that can also be applied to virtual machines:

  • Regular (full) archiving (full backup)
    This type of archiving creates a complete copy of all stored data. The process of creating such a backup copy is quite lengthy, but does not require much recovery time, since it does not require multiple recovery tasks. Full backup resets file and folder archive markers, which are used to determine which files should be backed up. These markers are used to check file states during incremental and differential backups.
  • Incremental backup
    This type of backup involves copying files and folders that have changed since the last backup. Therefore, if you perform two incremental backups in succession and do not change the file between them, it will not be added to the recovery image.
  • Differential backup
    This backup includes all changes that have occurred in files and folders since the last full backup. Accordingly, with two consecutive differential archiving, a file that has not changed between them, but has changed since the last full archiving, will be archived both times.

In order to explain how these types of archiving differ, we will give an example of combining types of backup. When using full and incremental archiving, backup time is significantly reduced, but recovery time is increased. For example, if we did a full backup on Monday and rolled out additional backups every day, and on Friday the system was damaged, we will need to restore the full backup copy of Monday and sequentially all additional copies until Friday, which will take a very long time. Combining full and differential activation, on the contrary, requires more time for archiving, but less time for recovery, since you only need to restore the full archive copy of Monday’s data and roll Friday’s differential archive onto it.

These, of course, are not all types of archiving that can be used when backing up data, but the types listed are some of the most frequently used. Obviously, for servers with high recovery time criticality, it is more advisable to use differential archiving in combination with full archiving rather than incremental archiving. The first is suitable for external servers of the organization, the second - for internal ones, which can tolerate more downtime.

Since, basically, a virtual machine is a folder with files, you can use the built-in backup tools of the host operating system if you are using a virtualization platform on top of the host system, such as, for example, Microsoft Virtual Server or VMware Server. In Microsoft Windows, you can use the utility for these purposes ntbackup. When using bare-metal platforms such as ESX Server or Virtual Iron, you must use the virtualization system vendor's tools or third-party products.

Additionally, virtual machines can be backed up by creating guest images using software such as Acronis True Image. It is also worth noting that there are situations when it is necessary to archive not the entire virtual machine, but some data in the guest system. In this case, when writing batch archiving scripts, you can use utilities to mount virtual disks on the host system. For VMware platforms, this utility is the VMware Disk Mount application.

Backup and recovery of virtual machines on the VMware ESX Server platform

VMware's pilot product, the ESX Server platform, is a key element of virtual infrastructure in an enterprise production environment. Virtual infrastructure VI3 (Virtual Infrastructure 3) is a set of products and tools that allow a fleet of virtual machines to effectively perform their tasks and function smoothly under various conditions, including force majeure factors such as sudden load surges, power outages and equipment damage. One of the most important tools for implementing a Disaster Recovery strategy is VMware Consolidated Backup (VCB). VCB can be used to create backup copies of individual ESX servers, as well as in conjunction with the VMware Virtual Center virtual server fleet management tool. VCB provides the following capabilities:

  • creating backup copies of virtual machines with various types of archiving using a special proxy server VCB Proxy Host, which removes the burden of creating backup copies from the company’s production server where the virtual machines are running
  • does not require installation of additional agents on ESX servers
  • provides ample opportunities for integration with third-party backup products; support for various packages is already built into VCB
  • supports file-level archiving for Windows guest systems (you can create backup copies of individual files and folders within the guest system), as well as virtual machine image-level archiving for any guest OS

Backing up virtual machines using VCB takes place by creating snapshots of virtual machines without stopping their operation. VCB also supports SANs. If the virtual machines are located on a SAN storage device, the backup procedure is as follows:

Snapshots of virtual machine states created during operation using an agent located on the VCB proxy server are saved on backup media, from where they can then be restored in the event of a failure of a running guest system or equipment damage. In this case, the backup agent has direct access to the LUNs (Logical Unit Number) in the SAN devices. For SANs, VCB supports the Fiber Channel protocol, as well as tape media for storing backup copies. VCB closely leverages the capabilities of VMware Tools running inside the guest system to create backup copies of guest OS data.

VMware Consolidated Backup currently supports the following packages (the list includes only officially tested software with the ESX Server product):

  • Symantec Backup Exec 10.0
  • Symantec Backup Exec 10d
  • Veritas Netbackup 5.0
  • Veritas Netbackup 5.0 MP4
  • Veritas Netbackup 5.1
  • Veritas Netbackup 5.1 MP2
  • Veritas Netbackup 5.1 MP3
  • Veritas Netbackup 6.0
  • Tivoli Storage Manager v5.2.1
  • Tivoli Storage Manager v5.2.3
  • Tivoli Storage Manager v5.3
  • EMC Networker v 7.0
  • EMC Networker v 7.1.x
  • EMC Networker v 7.2
  • EMC Networker v 7.3
  • CA BrightStor ARCServe r11
  • CA BrightStor ARCServe r11.1
  • CA BrightStor ARCServe r11.5
  • Commvault Galaxy v5.9
  • Commvault Galaxy v6.1

In general, the work of creating archive copies of virtual machines can be represented as follows:

  1. The backup software runs a pre-archive script that performs the following tasks:
    • makes sure that no read-write operations occur within the guest system into saved folders and files (for Windows guest OSes only)
    • switches the virtual machine to snapshot mode, creates a snapshot of the state of the virtual machine and makes it available to the application using the VCB
    • mounts a snapshot of the virtual machine from the SAN to the proxy server
  2. A backup copy of a snapshot of the virtual machine is created at the image level, or at the level of files and folders of the guest system (full, differential or incremental copy).
  3. The backup software calls a post-backup script that completes the backup (unmounts the virtual machine snapshots from the proxy server and takes the virtual machine out of snapshot mode).

During the backup process, VCB tools use the following virtual infrastructure components:

To summarize, VMware Consolidated Backup is a powerful tool for creating backup copies of virtual machines and allows you to use standard backup software used in your organization to create archival copies of your data.

Backup with Vizioncore esxRanger

Vizioncore's esxRanger product, now controlled by Quest Software, is currently one of the most popular solutions for creating backup copies of virtual machines on the ESX Server platform. esxRanger does not require installation of any additional agents on ESX servers and creates backup copies of virtual machines from a single server or group of servers through integration with the Virtual Center product. The process of creating backup copies takes place on a single Windows server, from where archived images of virtual systems can be stored on various storage devices in the organization's production environment.

esxRanger has both a GUI and a command line interface, allowing you to use the regular Windows Task Scheduler to run scheduled backup jobs, eliminating the need to write additional scripts. The main window of the esxRanger product is shown below:

By connecting to VMware Virtual Center, if you have the appropriate permissions, you can select individual virtual machines of data center servers for backup. Copied images are automatically compressed during archiving and decompressed during recovery, saving system administrators time.

esxRanger integrates with VMware Consolidated Backup when used in SANs and allows you to create full or differential copies of virtual machines, as well as individual files and folders in Windows guests. Additionally, during the backup process, esxRanger collects various information about backup metrics (such as time spent on backup and recovery), stores it in a database, and allows you to use it to trend your Disaster Recovery strategy. In addition to this, esxRanger has a policy engine that allows you to build a data archiving strategy based on templates and integrate it with other components of the organization's IT infrastructure, minimizing the workload of system administrators.

The backup procedure using esxRanger looks like this:

  1. A virtual machine savepoint is created and saved to the database.
  2. Using the VMware API, virtual disk files are “unlocked” for reading (they are locked by default) and the creation of .REDO files that will store changes to the virtual disks since the save point.
  3. Virtual disk files are compressed.
  4. The compressed files are backed up and the .REDO files are applied to the VMDK files of the virtual machines.
  5. After the changes are applied, the VMDK files are returned to their original locked state.
  6. The system administrator adds comments to the backup copies of the virtual machines, containing instructions in case the virtual machines fail.

Overall, esxRanger is a convenient, reliable, and easy-to-use virtual machine backup tool for Virtual Infrastructure 3 that integrates with VMware Consolidated Backup for use across SANs for companies of any size.

Creating backup copies of virtual machines on the Microsoft Virtual Server platform

Unfortunately, Microsoft, the owner and developer of the server virtualization product Virtual Server 2005, does not provide users with such a powerful backup and recovery tool as VMware Consolidated Backup. For now, Microsoft is focused primarily on developing hypervisor-based virtualization support built into the next version of the Windows Server platform, codenamed Viridian. However, Microsoft is constantly delaying the final release date of Windows Virtualization, and is also cutting back on its announced features, so it is now difficult to say anything definitive about the backup capabilities of the upcoming virtualization platform. With a fairly high probability we can say that there will be built-in support for “live” archiving, but it is not yet clear in what form. Today, backups of virtual machines in Virtual Server can be created “two and a half ways,” including:

  • using standard tools for backing up operating system images, which can be created by agents running inside guest systems, for example, Symantec Backup Exec.
  • writing specialized scripts that save the state of the virtual machine, copy its data to backup media and start the virtual machine again
  • the use of volume shadow copy services (Volume Shadow Service, VSS), support for which in Virtual Server appeared quite recently and is not yet supported by manufacturers of data backup systems

In order to archive running virtual machines on the Virtual Server platform, you can use its COM interface by writing a script, for example, using Visual Basic Scripting (vbs). When you back up a virtual machine, you must first put it in Saved State, then copy its files to a specified location, and then run it again. Below is an example of a vbs script that does these necessary steps to copy a single virtual machine. It can be run on a schedule using the standard Windows task scheduler. " backupvm.vbs " author: John Savill " usage: backupvm.vbs Option Explicit On Error Resume Next Dim objFSO, objVirtualServer, objVM, objSaveTask, objVHD " Connecting to a file system object set objFSO=CreateObject("Scripting.FileSystemObject") " Connecting to Virtual Server set objVirtualServer = CreateObject("VirtualServer.Application") " Search for a virtual machine set objVM = objVirtualServer.FindVirtualMachine(WScript.Arguments(0)) " Saving virtual machine state set objSaveTask = objVM.Save " Pause to perform a save operation while not objSaveTask.isComplete WScript.Sleep 1000 wend " Copying virtual disks and UNDO disks for each objVHD in objVM.HardDiskConnections If objFSO.FileExists(objVHD.HardDisk.file) Then "Wscript.Echo objVHD.HardDisk.file & " " & WScript.Arguments(1) objFSO.CopyFile objVHD.HardDisk.file, WScript.Arguments (1) End If If objFSO.FileExists(objVHD.undoHardDisk.file) Then "Wscript.Echo objVHD.undoHardDisk.file & " " & WScript.Arguments(1) objFSO.CopyFile objVHD.undoHardDisk.file, WScript.Arguments(1 ) End If Next " Copying vsv and vmc files objFSO.CopyFile objVM.File, WScript.Arguments(1) objFSO.CopyFile objVM.SavedStateFilePath, WScript.Arguments(1) " Starting a virtual machine objVM.Startup

This script must be used as follows:

C: emp>cscript backupvm.vbs

It should be noted that Microsoft does not officially support this backup process, since the integrity of a virtual machine copied in a saved state may be compromised due to the fact that part of its memory is not saved in the vsv and vhd files in this case.

Using the Volume Shadow Service

VSS support was introduced in the recently released Virtual Server 2005 R2 SP1. Using shadow copy services in Virtual Server involves creating backup copies of running virtual machines by creating images, which should significantly simplify and speed up the backup and recovery procedure. However, it is not enough for the backup software to support VSS; it also needs to support the new Virtual Server VSS Writer Service (VS Writer), which currently cannot be found supported by any archiving system. According to Microsoft, backup tools can use VS Writer to back up and restore virtual machines in the following way: they notify Virtual Server that the backup process has begun, Virtual Server responds by creating a snapshot of the virtual machine, and then the copy process begins. At the moment, the NTBackup utility does not support this mechanism either.

Backing up Xen virtual machines

XenSource, which supports the Open-Source Xen project and also distributes the commercial virtualization platform XenEnterprise, does not offer many options for archiving virtual machines on the Xen platform. One of them is shown below using NFS (Network File System) storage devices.

Background information:

  • XenServer host (in the example backup procedure its IP is 192.168.1.10)
  • The computer used as a server for storing archive copies (in the example, its IP is 192.168.1.1)
  • XenVM virtual machine (in the example its IP is 192.168.1.12)

Backup procedure:

  1. Install the NFS server by adding the following line to the /etc/exports file:
    / *(rw,sync,no_root_squash)
  2. On the XenServer host, add the following to the /etc/xen/xmexample1 file:
    kernel /boot/xenkernel
    name = "ExampleDomain"

    Root = /dev/nfs

    Nfs_server = "192.168.1.1"
    nfs_root = "/ip=192.168.1.10:192.168.1.1:192.168.1.1:255.255.255.0:::"

  3. Save a copy of the /etc/fstab file and add the following lines to it:
    192.168.1.1:rootdevice/nfs rw,hard,intr 1 1
    192.168.1.1:swapdevice swap swap defaults 0 0
    192.168.1.1:usrpartition /usr nfs rw,hard,intr 1 1
    192.168.1.1:varpartition /var nfs rw,hard,intr 1 1
    none /dev/pts devpts gid=5,mode=620 0 0
    none /proc proc defaults 0 0
  4. Copy /lib/modules/2.6.16.29-xen from the XenServer host to the backup device
  5. Run the following command on the archive copy server:
    #scp 192.168.1.10:/lib/modules/2.2.16.29-xen /lib/modules/
  6. To activate the console using udev, run the following commands on the backup server:
    mkdir /tmp/dev
    mount --move /dev /tmp/dev
    sbin/MAKEDEV null console zero
    mount --move /tmp/dev /dev
  7. Run the following command to mount the backup device on the Xen host:
    #xm create -c xmexample1
  8. Back up the xenstore-ls file and copy the contents of the file system (excluding the /proc and /sys directories) to another folder:
    #rsync -a -e ssh --exclude="/proc/*" --exclude="/sys/*" 192.168.1.10:/ /backupdir

Conclusion

Drawing up and implementing a backup and disaster recovery plan (Disaster Recover Plan) for the most important servers and workstations of an organization is a necessary component of its activities. Virtual machines, even more than physical ones, require high attention to data archiving, since usually several virtual systems are consolidated on one physical host. Leading virtualization platform vendors are striving to provide powerful and convenient backup capabilities, but so far only VMware has achieved this. The backup strategy can be carried out in two ways: one of the simplest ways is to do this as part of the standard strategy for archiving data in the company’s IT infrastructure, by installing backup agents in guest systems and creating images. Another, more convenient and faster way is to use built-in platform tools such as VMware Consolidated Backup or writing scripts by system administrators. In any case, we must never forget that equipment failure or other force majeure circumstances should not significantly affect the company's critical activities.

Imagine the situation: an accountant’s computer is faulty (otherwise it cannot be otherwise with an accountant’s computer!). It (on this computer) has a bunch of programs installed that can take three days or even more to restore. But an accountant needs to work without interruptions, and it’s better for him not to touch anything for another three years, to wait for a total collapse. What to do? An old system backup will not work - programs are updated and added quarterly, and therefore an old system image made on a freshly installed system will not work.

It would be a good idea to leave everything old and at the same time make everything new. Just in such a situation, you can make a virtual copy of a computer that is still working and check its performance. (for example, on the administrator's computer). Then demolish everything on the accountant’s computer, install a fresh system and run a virtual machine on this fresh system until the work smoothly flows to the host machine. At the same time, you can leave the guest file (this is essentially a working accounting backup!) in the archive - after all, it’s just a file, albeit 20 gigs in size, but who cares about that now.

So the idea is clear. Its implementation is also not difficult. To do this, we will use two free programs: Oracle VirtualBox And Paragon Go Virtual.

Step 1: create a virtual copy of a working computer

To create a virtual copy of your computer, we use the Paragon Go Virtual program. This program is available for download from http://www.paragon-software.com/home/go-virtual/ for free. You only need to provide your name and email - a letter with a serial number will be sent to this email. After installing the program, you will need to restart your computer.

The program interface is extremely simple - only two buttons on the main window. Select "P2V" (physical to virtual). It will be necessary to select the type of future virtual machine - we choose Oracle VirtualBox.

The copying process will take some time, you can drink some tea. At the end, the program will create at least two files: drive C and a settings file with the OVF extension. If you create a copy of your computer with multiple drives, there will be more files. The created disk images will be in VMDK (VMWare) format. But VirtualBox works great with them.

Step 2: import the created copy into Virtual Box

For the purity of the experiment, let’s copy the resulting files to another computer (let’s call it the admin’s computer). If the administrator’s computer does not yet have VirtualBox (!!! ahtung!!!), install it immediately.

In the main window of the VirtualBox program, select the “file” menu - “Import configuration” and select the file with the OVF extension created by Paragon Go Virtual in step 1. VirtualBox itself will understand what to do next.

Note: before performing this operation, look in the VirtualBox settings where it will store the disk and virtual machine settings files - the files will be quite large, and by default, the path will be on the system drive, which is not always convenient.

During the virtual machine creation process, VirtualBox will copy the hard drive files created by Paragon Go Virtual. Once VirtualBox has finished the import process, the files created by Go Virtual can be deleted (check that the virtual machine starts first!).

Step 3: Finish

Most likely, you do all this at work, so be careful when starting a virtual machine - because if the VirtualBox network adapter is in bridge mode, your copy of a real working computer on the network may cause conflicts. I usually do this: before starting the virtual machine, I completely disable the network in the settings of this machine in the console of the main VirtualBox window. From sin. I connect VBoxGuestAdditions.iso as a CD and after loading the virtual machine, I install add-ons (for mouse integration, adjusting the screen size, etc.). Please note that you need to give Windows some time to update the hardware list and install new display drivers, etc. The guest virtual machine will need to be rebooted.

All. You have created a real working copy of the computer and you can do whatever you want on it.

Please note that this method can be considered an advanced option for creating backups. For example, we can consider that we are not creating a backup copy of data, but applications that are already configured and ready for use.

Reducing the disk space of a virtual machine in VMDK format (VMWare)

As a rule, a constantly used computer has more programs installed than is necessary for storage in a virtual machine. Well, really, why do you need Gimp, ICQ, Skype, ImageViewer or a media player as well as “My Documents” and “My Music”? Down with everything unnecessary. The disk of the virtual machine will most likely be at least 10 GB, and then there will be rubbish.

Well, you launched the virtual machine, removed unnecessary programs, but the vdisk.vmdk file (for example) did not reduce its size. It's good if you didn't increase it. You deleted 3 GB of junk, but the size did not become smaller?

The disk file is created in VMware format. VMware, together with the VMware Server and VMware Workstation products, supplies a console utility for working with virtual disks vmware-vdiskmanager. This utility is a powerful virtual disk conversion tool. You can find the vdiskmanager utility in the folder where VMware Server or VMware Workstation products are installed. Those. just install the trial version of WMware Workstation and find the file in its folder vmware-vdiskmanager.

Using this utility in our case is simple: vmware-vdiskmanager.exe -k<путь до вашего файла vdisk.vmdk> .

In my case, this allowed me to reduce the size from 22 GB to 14 GB!

If you don’t want to install VMware, you can try downloading the archive with this utility from here (856 kb, MD5: CF48CF9B69EA712E7B7B8C94EFA7AB49). The archive contains the utility itself and two libraries necessary for its operation. At least with the "-k" switch. I hope that this will be enough and that you will not need to install the full VMware distribution.

Reinstalling the operating system or changing a computer device does not mean the end of working with installed guest OSes in the program. True, an exception may be the case when the virtual machine hard drive files are located on the computer’s system drive, and the system itself cannot be restored after a critical failure. To continue working with existing guest OSes while maintaining their state, but on a reinstalled Windows or on another computer, the VirtualBox program has a tool for exporting the configuration of existing virtual machines for importing it later. Another option to continue working with existing guest OSes is to add new virtual machines based on existing files on their hard drives. We will consider all these processes below.

1. Universal virtual machine export file format

The configuration of an existing VirtualBox virtual machine is exported to the file " .ova" An “.ova” (Open Virtual Appliance) file is a universal virtual machine data storage file that can be used in various programs for virtualizing operating systems. This , . The virtual machine exported to this file can then be imported by either VirtualBox, VMware Workstation or Microsoft Hyper-V within the guest systems supported by these programs.

Let's take a closer look at the process of exporting and importing the configuration of the VirtualBox virtual machine in the main Windows system.

2. Export a virtual machine

In the VirtualBox window, select a specific virtual machine to export, click the menu “ File" and select " Export configurations».

In the next window, click " Next».

Exporting a configuration is only possible when the virtual machine is powered off, and if it is paused, VirtualBox will prompt you to reset the saved state to continue the process.

Next, the export options window will appear. We leave the preset format, but change the export file folder “.ova”, which is located on the system drive by default, to a folder, for example, as in our case, specially created on the non-system drive D.

In the next window, click " Export».

We are waiting for the export process to complete.

The exported virtual machine in the “.ova” file will be located in the specified folder, from where it can be moved to another computer, removable media, or to a cloud service. Or you can leave it, as in our case, in place - on a non-system drive, where this file will be stored during Windows reinstallation.

3. Import a virtual machine

After installing VirtualBox on a new Windows or on another computer, open the program and in the menu “ File» select « Importing configurations».

In the next window, specify the path to the “.ova” file with the exported virtual machine. Click " Next».

At the very end of the window, the path will be indicated where the “.vdi” hard disk file will be placed after import. By default, this is the system drive, and in order not to clutter it and prevent the loss of the “.vdi” file in the event of a system failure, you can change the path by specifying the storage folder on a non-system drive. Click " Import».

We are waiting for the import process to complete.

After which we will see the imported virtual machine in the list of VirtualBox machines. All that remains now is to start the car.

The guest OS will start in exactly the state it was in at the time the virtual machine was exported.

4. Adding a new machine from an existing VirtualBox hard disk file

An alternative to exporting and importing a virtual machine is to add a new machine from an existing VirtualBox hard drive file. .vdi" This method is in no way inferior to the procedure for exporting and importing a virtual machine. Moreover, if the “.vdi” file is located on a non-system drive, when you reinstall Windows on a physical computer, you don’t even have to waste time exporting the configuration. We can simply transfer the “.vdi” file stored on the system disk to a non-system disk. By and large, the process of exporting and importing a virtual machine benefits only by saving the space taken up by the “.ova” file. For example, in our case, we exported a virtual machine with the Windows XP guest OS installed, and the weight of the “.ova” file at the output was 4,11 GB While the size of the hard disk “.vdi” file of the same system is 10 GB.

This space-saving benefit may be relevant if you transfer a virtual machine to another computer using cloud storage or removable media with a limited size. In our case, when we are talking about reinstalling Windows, the method of adding a new machine from an existing VirtualBox hard disk file is quite suitable.

Launch VirtualBox and click " Create».

We set the RAM indicator. Click " Next».

In the hard drive selection window, select the option “ Use an existing hard drive", using the browse button, specify the path to store the ".vdi" file. Click " Create».

The virtual machine will appear in the VirtualBox list, we can launch it.

The guest OS will start exactly in the state in which it was saved the last time you worked with it.

Adding a new virtual machine from an existing “.vdi” file is also a way to move the guest OS hard disk file to a non-system drive of the computer if it was originally created on the system drive, and over time the space it occupied began to reduce system performance. To do this, you need to remove the virtual machine from the list in the main VirtualBox window. On the selected machine, call up the context menu and select “ Delete».

Then in the window that appears, click “ Remove from list».

After this, you can search for the hard disk “.vdi” file on the system drive (usually the default path C:\Users\Username\VirtualBox VMs), move it to a non-system disk and add the virtual machine again.

Did this article help you?

New on the site

>

Most popular