[SOLVED] Restoring VBox with vdi & snapshot

Discussions related to using VirtualBox on Linux hosts.
Post Reply
MagnusE
Posts: 2
Joined: 8. Oct 2013, 18:51

[SOLVED] Restoring VBox with vdi & snapshot

Post by MagnusE »

Hi all!

I have one hard disk (named serious.vdi) and, one snapshot folder with the files:
  • Snapshot/2013-07-20T11-47-31-053175000Z.sav
  • Snapshot/{a3e871b0-e682-41b3-8014-d0c869015f7b}.vdi


of a previously working virtual machine.

Because of many file movements and many virtual machines I cannot work any more on these.

Is it possible to setup a working virtual machine like the previous one with the given files? How?

When I add the vdi, while I am setting up the machine I get:

Code: Select all

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Medium
Interface: IMedium {29989373-b111-4654-8493-2e1176cba890}
Callee: IVirtualBox {3b2f08eb-b810-4715-bee0-bb06b9880ad2}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)


PS: I am attaching to you the contents of the previous *.vbox file that I *think* was corresponding to the above virtual machine:

Code: Select all

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="innotek.de/VirtualBox-settings" version="1.13-linux">
  <Machine uuid="{c24416cf-69ca-4468-9e81-1a61405ab51c}" name="crunchbang_serious" OSType="Debian" currentSnapshot="{99f86e0e-3597-4b38-8898-131fd3e28a77}" snapshotFolder="Snapshots" lastStateChange="2013-09-26T18:32:53Z">
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{d2d0ba78-344e-4a4d-98ec-b2506a221bf7}" location="/media/f032f498-893d-45b3-b196-f37ace1299ca/crunchbang_serious.vdi" format="VDI" type="Normal">
          <HardDisk uuid="{a3e871b0-e682-41b3-8014-d0c869015f7b}" location="/media/serious/a5021610-8fde-4dfc-a498-04f8d79dbd88/Testing serious VDIs/{a3e871b0-e682-41b3-8014-d0c869015f7b}.vdi" format="VDI"/>
        </HardDisk>
      </HardDisks>
      <DVDImages>
        <Image uuid="{eae5d61e-ac92-455d-8701-d2b0d3bbc8f2}" location="/usr/share/virtualbox/VBoxGuestAdditions.iso"/>
      </DVDImages>
      <FloppyImages/>
    </MediaRegistry>
    <ExtraData>
      <ExtraDataItem name="GUI/AutoresizeGuest" value="off"/>
      <ExtraDataItem name="GUI/InfoDlgState" value="400,450,normal"/>
      <ExtraDataItem name="GUI/LastCloseAction" value="PowerOff"/>
      <ExtraDataItem name="GUI/LastGuestSizeHint" value="800,600"/>
      <ExtraDataItem name="GUI/LastGuestSizeHintWasFullscreen" value="true"/>
      <ExtraDataItem name="GUI/LastNormalWindowPosition" value="1192,473,720,442,max"/>
      <ExtraDataItem name="GUI/LastScaleWindowPosition" value="653,239,640,480"/>
    </ExtraData>
    <Snapshot uuid="{99f86e0e-3597-4b38-8898-131fd3e28a77}" name="working :)" timeStamp="2013-07-20T11:47:31Z" stateFile="Snapshots/2013-07-20T11-47-31-053175000Z.sav">
      <Hardware version="2">
        <CPU count="2" hotplug="false">
          <HardwareVirtEx enabled="true" exclusive="true"/>
          <HardwareVirtExNestedPaging enabled="true"/>
          <HardwareVirtExVPID enabled="true"/>
          <PAE enabled="false"/>
          <HardwareVirtExLargePages enabled="false"/>
          <HardwareVirtForce enabled="false"/>
        </CPU>
        <Memory RAMSize="1024" PageFusion="false"/>
        <HID Pointing="USBTablet" Keyboard="PS2Keyboard"/>
        <HPET enabled="false"/>
        <Chipset type="PIIX3"/>
        <Boot>
          <Order position="1" device="Floppy"/>
          <Order position="2" device="DVD"/>
          <Order position="3" device="HardDisk"/>
          <Order position="4" device="None"/>
        </Boot>
        <Display VRAMSize="128" monitorCount="1" accelerate3D="false" accelerate2DVideo="false"/>
        <VideoRecording enabled="false" file="Test.webm" horzRes="640" vertRes="480"/>
        <RemoteDisplay enabled="false" authType="Null" authTimeout="5000">
          <VRDEProperties>
            <Property name="TCP/Ports" value="3389"/>
          </VRDEProperties>
        </RemoteDisplay>
        <BIOS>
          <ACPI enabled="true"/>
          <IOAPIC enabled="true"/>
          <Logo fadeIn="true" fadeOut="true" displayTime="0"/>
          <BootMenu mode="MessageAndMenu"/>
          <TimeOffset value="0"/>
          <PXEDebug enabled="false"/>
        </BIOS>
        <USBController enabled="true" enabledEhci="false"/>
        <Network>
          <Adapter slot="0" enabled="true" MACAddress="08002741322C" cable="true" speed="0" type="82540EM">
            <DisabledModes>
              <InternalNetwork name="intnet"/>
            </DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </Adapter>
          <Adapter slot="1" enabled="false" MACAddress="080027A6E2C6" cable="true" speed="0" type="82540EM">
            <DisabledModes>
              <NAT>
                <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
                <Alias logging="false" proxy-only="false" use-same-ports="false"/>
              </NAT>
            </DisabledModes>
          </Adapter>
          <Adapter slot="2" enabled="false" MACAddress="08002737D481" cable="true" speed="0" type="82540EM">
            <DisabledModes>
              <NAT>
                <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
                <Alias logging="false" proxy-only="false" use-same-ports="false"/>
              </NAT>
            </DisabledModes>
          </Adapter>
          <Adapter slot="3" enabled="false" MACAddress="080027889B74" cable="true" speed="0" type="82540EM">
            <DisabledModes>
              <NAT>
                <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
                <Alias logging="false" proxy-only="false" use-same-ports="false"/>
              </NAT>
            </DisabledModes>
          </Adapter>
          <Adapter slot="4" enabled="false" MACAddress="0800270FC180" cable="true" speed="0" type="82540EM">
            <DisabledModes>
              <NAT>
                <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
                <Alias logging="false" proxy-only="false" use-same-ports="false"/>
              </NAT>
            </DisabledModes>
          </Adapter>
          <Adapter slot="5" enabled="false" MACAddress="080027134A23" cable="true" speed="0" type="82540EM">
            <DisabledModes>
              <NAT>
                <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
                <Alias logging="false" proxy-only="false" use-same-ports="false"/>
              </NAT>
            </DisabledModes>
          </Adapter>
          <Adapter slot="6" enabled="false" MACAddress="0800270A32D9" cable="true" speed="0" type="82540EM">
            <DisabledModes>
              <NAT>
                <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
                <Alias logging="false" proxy-only="false" use-same-ports="false"/>
              </NAT>
            </DisabledModes>
          </Adapter>
          <Adapter slot="7" enabled="false" MACAddress="0800275B77B8" cable="true" speed="0" type="82540EM">
            <DisabledModes>
              <NAT>
                <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
                <Alias logging="false" proxy-only="false" use-same-ports="false"/>
              </NAT>
            </DisabledModes>
          </Adapter>
        </Network>
        <UART>
          <Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
          <Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/>
        </UART>
        <LPT>
          <Port slot="0" enabled="false" IOBase="0x378" IRQ="7"/>
          <Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
        </LPT>
        <AudioAdapter controller="AC97" driver="Pulse" enabled="true"/>
        <RTC localOrUTC="UTC"/>
        <SharedFolders>
          <SharedFolder name="serious" hostPath="/home/serious" writable="false" autoMount="true"/>
        </SharedFolders>
        <Clipboard mode="Bidirectional"/>
        <DragAndDrop mode="Disabled"/>
        <IO>
          <IoCache enabled="true" size="5"/>
          <BandwidthGroups/>
        </IO>
        <HostPci>
          <Devices/>
        </HostPci>
        <EmulatedUSB>
          <CardReader enabled="false"/>
          <Webcam enabled="false"/>
        </EmulatedUSB>
        <Guest memoryBalloonSize="0"/>
        <GuestProperties/>
      </Hardware>
      <StorageControllers>
        <StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
          <AttachedDevice passthrough="false" type="DVD" port="1" device="0">
            <Image uuid="{eae5d61e-ac92-455d-8701-d2b0d3bbc8f2}"/>
          </AttachedDevice>
        </StorageController>
        <StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
          <AttachedDevice type="HardDisk" port="0" device="0">
            <Image uuid="{d2d0ba78-344e-4a4d-98ec-b2506a221bf7}"/>
          </AttachedDevice>
        </StorageController>
      </StorageControllers>
    </Snapshot>
    <Hardware version="2">
      <CPU count="2" executionCap="90" hotplug="false">
        <HardwareVirtEx enabled="true" exclusive="true"/>
        <HardwareVirtExNestedPaging enabled="true"/>
        <HardwareVirtExVPID enabled="true"/>
        <PAE enabled="false"/>
        <HardwareVirtExLargePages enabled="false"/>
        <HardwareVirtForce enabled="false"/>
      </CPU>
      <Memory RAMSize="1024" PageFusion="false"/>
      <HID Pointing="USBTablet" Keyboard="PS2Keyboard"/>
      <HPET enabled="false"/>
      <Chipset type="PIIX3"/>
      <Boot>
        <Order position="1" device="Floppy"/>
        <Order position="2" device="DVD"/>
        <Order position="3" device="HardDisk"/>
        <Order position="4" device="None"/>
      </Boot>
      <Display VRAMSize="128" monitorCount="1" accelerate3D="false" accelerate2DVideo="false"/>
      <VideoRecording enabled="false" file="Test.webm" horzRes="640" vertRes="480"/>
      <RemoteDisplay enabled="false" authType="Null" authTimeout="5000">
        <VRDEProperties>
          <Property name="TCP/Ports" value="3389"/>
        </VRDEProperties>
      </RemoteDisplay>
      <BIOS>
        <ACPI enabled="true"/>
        <IOAPIC enabled="true"/>
        <Logo fadeIn="true" fadeOut="true" displayTime="0"/>
        <BootMenu mode="MessageAndMenu"/>
        <TimeOffset value="0"/>
        <PXEDebug enabled="false"/>
      </BIOS>
      <USBController enabled="true" enabledEhci="false"/>
      <Network>
        <Adapter slot="0" enabled="true" MACAddress="08002741322C" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <InternalNetwork name="intnet"/>
          </DisabledModes>
          <NAT>
            <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
            <Alias logging="false" proxy-only="false" use-same-ports="false"/>
          </NAT>
        </Adapter>
        <Adapter slot="1" enabled="false" MACAddress="080027A6E2C6" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="2" enabled="false" MACAddress="08002737D481" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="3" enabled="false" MACAddress="080027889B74" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="4" enabled="false" MACAddress="0800270FC180" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="5" enabled="false" MACAddress="080027134A23" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="6" enabled="false" MACAddress="0800270A32D9" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="7" enabled="false" MACAddress="0800275B77B8" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
      </Network>
      <UART>
        <Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
        <Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/>
      </UART>
      <LPT>
        <Port slot="0" enabled="false" IOBase="0x378" IRQ="7"/>
        <Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
      </LPT>
      <AudioAdapter controller="AC97" driver="Pulse" enabled="false"/>
      <RTC localOrUTC="UTC"/>
      <SharedFolders>
        <SharedFolder name="serious" hostPath="/home/serious" writable="false" autoMount="true"/>
      </SharedFolders>
      <Clipboard mode="Bidirectional"/>
      <DragAndDrop mode="Disabled"/>
      <IO>
        <IoCache enabled="true" size="5"/>
        <BandwidthGroups/>
      </IO>
      <HostPci>
        <Devices/>
      </HostPci>
      <EmulatedUSB>
        <CardReader enabled="false"/>
        <Webcam enabled="false"/>
      </EmulatedUSB>
      <Guest memoryBalloonSize="0"/>
      <GuestProperties>
        <GuestProperty name="/VirtualBox/GuestAdd/HostVerLastChecked" value="4.2.18" timestamp="1380220310617293000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestAdd/Revision" value="84980" timestamp="1380220276647247000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestAdd/Vbgl/Video/SavedMode" value="800x600x32" timestamp="1380220282640992000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestAdd/Version" value="4.2.12" timestamp="1380220276646546000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestAdd/VersionExt" value="4.2.12" timestamp="1380220276646911000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/Net/0/MAC" value="08002741322C" timestamp="1380220282625057000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/Net/0/Status" value="Up" timestamp="1380220282625411000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/Net/0/V4/Broadcast" value="10.0.2.255" timestamp="1380220282624364000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/Net/0/V4/IP" value="10.0.2.15" timestamp="1380220282623978000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/Net/0/V4/Netmask" value="255.255.255.0" timestamp="1380220282624726000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/Net/Count" value="1" timestamp="1380220367707324000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/OS/Product" value="Linux" timestamp="1380220276644716000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/OS/Release" value="3.2.0-4-686-pae" timestamp="1380220276645280000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/OS/Version" value="#1 SMP Debian 3.2.46-1" timestamp="1380220276645704000" flags=""/>
        <GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1380220298944416000" flags=""/>
      </GuestProperties>
    </Hardware>
    <StorageControllers>
      <StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
        <AttachedDevice passthrough="false" type="DVD" port="1" device="0">
          <Image uuid="{eae5d61e-ac92-455d-8701-d2b0d3bbc8f2}"/>
        </AttachedDevice>
      </StorageController>
      <StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
        <AttachedDevice type="HardDisk" port="0" device="0">
          <Image uuid="{a3e871b0-e682-41b3-8014-d0c869015f7b}"/>
        </AttachedDevice>
      </StorageController>
    </StorageControllers>
    <Groups>
      <Group name="/New group"/>
    </Groups>
  </Machine>
</VirtualBox>
Last edited by MagnusE on 9. Oct 2013, 16:31, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Restoring VBox with vdi & snapshot

Post by mpack »

The .vbox file is referring to media outside of the VM folder, which is quite dangerous and may have led to your current problem.

The simplest solution is probably to put both VDI files into one folder then clone the snapshot (not the base VDI) using CloneVDI. Then build a new VM around the resulting clone VDI. Make sure to give the clone VDI a meaningful name, and try to arrange for it to be located inside the VM folder.

As a Win32 app, you'll need to install Wine if you want to run CloneVDI on a Linux host.
MagnusE
Posts: 2
Joined: 8. Oct 2013, 18:51

Re: Restoring VBox with vdi & snapshot

Post by MagnusE »

mpack,

CloneVDI worked!!!! Problem solved.

Thanks!
Post Reply