Virtual machine inaccessible

Discussions related to using VirtualBox on Mac OS X hosts.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Minette wrote:Can I email you the info and maybe you can take a look?
I will try tinkering with the xml in the mean time, but I am no specialist. ... Do you work for the Sun/VirtualBox team? ...
No, I am a community member, I do this pro bono.

Can you do a ls -lR /Users/paulp/Library/VirtualBox and a tar -cjf VboxXMLs.tar.bz2 $(find /Users/paulp/Library/VirtualBox -name \*xml) and send them to me at my email address. I'll have a look and post the fixes here.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Minette
Posts: 10
Joined: 26. Jul 2008, 09:18

Post by Minette »

TerryE wrote:Can you do a ls -lR /Users/paulp/Library/VirtualBox and a tar -cjf VboxXMLs.tar.bz2 $(find /Users/paulp/Library/VirtualBox -name \*xml) and send them to me at my email address. I'll have a look and post the fixes here.
Sorry, Terry, I can't find your email address anywhere, neither on your web page nor on your profile here, I can only pm you.
ubundom
Posts: 2
Joined: 28. Nov 2008, 01:08

Post by ubundom »

@Minette: That's precisely my thoughts too ... I was "tidying up" the unwanted first snapshot, thinking that I only needed to keep the latest stable (lol) version on WinXPSP3 etc.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

You can (or should be able to) delete intermediate snapshots. You can also repair most problems with the XML files manually as long as you understand their structure.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Minette, Thanks for the email and sorry for my tardy response. I've exracted the relevant tags out of the two registry files that you provided. You will see that according to the VBox registry you have one machine and two VDIs registered. Each VDI has a 3 snapshot chain. I've added the file sizes and update timestamps to the various files for info.

Code: Select all

MachineRegistry
HardDisks
  {54ae8655-0421-461a-fea6-b431777323bb}   (4.5 Gb Sep 27 20:59) VDI/XP.vdi
    {7c19758e-f7ac-4caf-b441-2fcfc8544e08} (0.9 Gb Sep 27 23:24) Machines/Win XP/Snapshots/{7c19758e-f7ac-4caf-b441-2fcfc8544e08}.vdi
    {b1f08877-79c3-4034-bed3-7ed2bbcfaca0} (0.1 Gb Sep 28 00:31) Machines/Win XP/Snapshots/{b1f08877-79c3-4034-bed3-7ed2bbcfaca0}.vdi
    {ffb7db3c-0a36-4a14-9ee0-6ade7ba88dd8} (0.2 Gb Oct 23 16:16) Machines/Win XP/Snapshots/{ffb7db3c-0a36-4a14-9ee0-6ade7ba88dd8}.vdi
  {f59fe204-ed7c-40fd-9e94-cb79ee5be4c8}  (13.4 Gb Nov 27 00:27) VDI/Win XP.vdi (13.4 Gb)
    {a8f9abe3-57e1-4bf9-99ab-961963927fd2} (3.5 Gb Nov 27 00:14) Machines/Win XP/Snapshots/{a8f9abe3-57e1-4bf9-99ab-961963927fd2}.vdi
    {04b44f8f-479d-4ca3-b81d-423e603c4f5a} (1.6 Gb Sep 28 00:31) Machines/Win XP/Snapshots/{04b44f8f-479d-4ca3-b81d-423e603c4f5a}.vdi
    {a166f6b1-b69f-4f34-b974-9e6fee5b8b37} (6.3 Gb Oct 23 16:16) Machines/Win XP/Snapshots/{a166f6b1-b69f-4f34-b974-9e6fee5b8b37}.vdi
Also of interest is that you have one snapshot file in the Win XP Snapshots directory (7.3 Gb Nov 27 00:03) {47cd17fc-5cc2-425a-8fcb-1076f953fa1e}.vdi which is not referred to in any registery. What I also don't understand is why the timestamps are so out of sync.

Now when I compare this to the Win XP Machine Registry, then you will see that there is a missing entry for the root XP.vdi disk hence the error.

Code: Select all

{c167b33c-3e16-4214-a6e4-0c3f9509e513} name="Win XP"
  currentSnapshot {aee3e964-251b-41d8-a3e3-292391ea436d}
  IDE:0:0 {f59fe204-ed7c-40fd-9e94-cb79ee5be4c8}"
    Snapshot "XP SP3" {510c66ee-dd18-4431-92a3-f01c91068b63}"
      IDE:0:0 {f59fe204-ed7c-40fd-9e94-cb79ee5be4c8}
      IDE:0:1 {54ae8655-0421-461a-fea6-b431777323bb}
      Snapshot "XP SP3 and Applications" {cf558fce-d278-4b8a-8dfb-5a18442f18e5}
        IDE:0:0 {a8f9abe3-57e1-4bf9-99ab-961963927fd2}
        IDE:0:1 {7c19758e-f7ac-4caf-b441-2fcfc8544e08}
        Snapshot "XP SP3, Applications & Documents" {47e5701f-e01c-4292-8f74-6ec8a00a9b4f}
          IDE:0:0 {04b44f8f-479d-4ca3-b81d-423e603c4f5a}"
          IDE:0:1 {b1f08877-79c3-4034-bed3-7ed2bbcfaca0}"
          Snapshot "2008-10-24" {aee3e964-251b-41d8-a3e3-292391ea436d}"
            IDE:0:0 {a166f6b1-b69f-4f34-b974-9e6fee5b8b37}"
            IDE:0:1 {ffb7db3c-0a36-4a14-9ee0-6ade7ba88dd8}"
The error that VirtualBox reports is due to {f59fe204-ed7c-40fd-9e94-cb79ee5be4c8} being listed twice in the snapshot chain. Once for the current disk and once for snapshot "2008-10-24". This chain is wrong. Normally I would just fix this by manually roll back to the snapshot "2008-10-24". This involves moving the IDE:0:1 line from ""2008-10-24" into current:

Code: Select all

<HardDiskAttachment hardDisk="{54ae8655-0421-461a-fea6-b431777323bb}" bus="IDE" channel="0" device="1"/>
and deleting the "2008-10-24" snapshot to promote "XP SP3, Applications & Documents" to the top level. This would roll the state of your disks back to Oct-24 but at least you still have some system. However, this may also fail until you fix up the This may UUIDs inside the two latest snapshots.

However, because the two snapshot chains have such different time stamps there is something else going on here. The disks are updated pretty synchronously so the pairs for each snapshot should have the same time stamps. Can you give me any possible reason for what is going on here? Have you tried restoring backups? Is your VM supposed to have two disks?
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Minette
Posts: 10
Joined: 26. Jul 2008, 09:18

Post by Minette »

Let me try to answer as best as I can.
TerryE wrote:Minette, Thanks for the email and sorry for my tardy response. I've exracted the relevant tags out of the two registry files that you provided. You will see that according to the VBox registry you have one machine and two VDIs registered. Each VDI has a 3 snapshot chain.
This should not be the case. I only did snapshots in the Win XP VDI. If I had understood what snapshots were earlier, maybe I would not have had to reinstall a new VM (Win XP) when my first VM (XP) crashed :)

I had no snapshots with the initial XP VM, and about 6 snapshots for the Win XP VM.

The story is that after the XP VM crashed, in order to recover my files, I attached the first VM VDI (XP) to the new VM (Win XP) as a second disk.

Then recently I needed to save disk space on my Mac, so I decided to remove the attached XP. vdi disk. Vbox would not let me do it!! I would think it should. So I removed it manually.
I also decided to remove snapshots. I started with the first snapshot. I restarted the VM, and it did restart once. But it did it on my first snapshot, not on the last one. I found that strange. So I logged out, restarted again, and that's when I starting getting the error message.
TerryE wrote:Now when I compare this to the Win XP Machine Registry, then you will see that there is a missing entry for the root XP.vdi disk hence the error.
Maybe because I removed it manually and it could no longer find it. My bad!
TerryE wrote:The error that VirtualBox reports is due to {f59fe204-ed7c-40fd-9e94-cb79ee5be4c8} being listed twice in the snapshot chain. Once for the current disk and once for snapshot "2008-10-24".
Maybe this happened when the system restarted with the 1st (instead of the last) snapshot, duplicating the {f59fe204-ed7c-40fd-9e94-cb79ee5be4c8}.
TerryE wrote:However, because the two snapshot chains have such different time stamps there is something else going on here. The disks are updated pretty synchronously so the pairs for each snapshot should have the same time stamps. Can you give me any possible reason for what is going on here? Have you tried restoring backups? Is your VM supposed to have two disks?
Well, I probably messed up things, but only because Vbox would not do the things it was supposed to do. I was in a bind.

Are you saying the xml cannot be fixed?
What's your take on the chances of recovering my files by installing a new VM and attaching the Win XP VDi as a second disk?

Sorry to say this will be the last time I do it. I have wasted too much time on Vbox. It's too unstable, not finished. Barely Alpha to me. I think VirtualBox is VERY FAR from a sound and stable release. If someone like me - I am no techie but know and understand computers - is having so many problems, then it's not ready for prime-time. I don't understand why it was released to the public, but then there are many things I no longer understand with Sun's decisions nowadays. Sigh!

Terry, thank you for your help. If you feel a reinstall as an attached 2nd drive will recover my files, I'll do it. Don't spend any more time on this issue for me, others need your time.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Maybe because I removed it manually and it could no longer find it. My bad!
Ah! MS provide all sorts of health warnings about the risks of editing the registry and that it can result in your system not being able to boot. Well the same risks apply with VirtualBox, the registries assume an integrity model and if this is lost then the software can get confused.
Sorry to say this will be the last time I do it. I have wasted too much time on Vbox. It's too unstable, not finished. Barely Alpha to me. I think VirtualBox is VERY FAR from a sound and stable release.
If I can repeat my MS analogy, then by the same argument you could say the same about all MS OSs up to and including Vista. I've lost MS OS installs due to corruption 3 times in the last 20 years. If you follow the rules, VBox is pretty secure and does not corrupt.

Where I do think that the functionality needs to be enhanced is in its repair tools and its ability to manage snapshot chains, etc. The fact is that systems can crash, and that is why filesystems such as NTFS and Ext3 journal metadata, so that if a crash does occur then in the vast majority of cases, the system can recover the integrity of the file system. At the moment VirtualBox lacks these tools, but then again AFAIK so does VMware.

The reason that I drilled down in this case was to understand the mechanism of this crash so that I can lobby the development team to add such utilities.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Minette
Posts: 10
Joined: 26. Jul 2008, 09:18

Post by Minette »

TerryE wrote:If I can repeat my MS analogy, then by the same argument you could say the same about all MS OSs up to and including Vista. I've lost MS OS installs due to corruption 3 times in the last 20 years. If you follow the rules, VBox is pretty secure and does not corrupt.
I personally never had to reinstall XP or Vista or MacOS in my lifetime.

Like I said, I am an average user. The issue with VBox is that you always have to break the rules because it does not do what it's supposed to or does not do it right, so you always have to circumvent the system.

Obvious things I'd like to see in VBox:
  • plug-and-play USB devices. Why you have to add/define devices in a separate panel is the antinomy of user-friendliness. If I plug a flash drive, I want to see it appear (even if not accessible until I release it in the host OS but then a user-friendly message on the screen should allow me to do so).
  • support for embedded stuff that everybody has... like the Webcam on the Mac. Why can't such a simple device be supported?
  • When you delete a snapshot, it should do it right, and do it fast. Or at least, warn you that it may take more than 30mn.
  • If you want to remove an attached disk, it should do it. Quick.
  • Fix user-interface issues and add top priority usability features.
    • Having automatic snapshots is one of the most obvious.
    • Snapshots should not be embedded in the previous snapshot in the snapshot list because it implies that if you remove the first one, all others will disappear. And maybe they should not be called snapshots. How about "Virtual Machine Backup". People understand the concept of backups.
    • Remove ambiguities like when creating the size of the virtual disk. The current wording implies the disk size will expand ad lib. Not so! The space used on the host will expand UP TO the limit you set. So one should be careful when setting up this limit to something large enough. I got stuck with a disk too small. It probably should prompt you for a disk size at mn. half the space available on the host disk, and any size above (since it will not use the full space anyway).
If you want to pass the word to the development team, please do so. Maybe they will listen to you. Thank you.
kogrover
Posts: 1
Joined: 27. Dec 2008, 02:10

Any updates on how to fix this?

Post by kogrover »

I have a WinXP Guest (in VB 2.0.6 running under Ubuntu 8.10) that has this same issue: it's inaccessible.

The problem occurred after deleting and creating some snapshots. I wanted to 'update' my backup snapshot - the installed software. I did. After creating the new snapshot and deleting the old ones (all from the GUI), I re-loaded the VM. It failed. It's marked as 'inaccessible' - it took a while to figure this out: I have a shortcut icon that starts that VM without loading the normal GUI. I finally loaded the GUI and saw the error message. I can post the details, but aside from the UUID's, it's very similar to the previous one.

NOTE: I did all actions through the GUI and never even loaded the XML files, much less changed them, manually. The VDI was NEVER associated with another VM, something strange happened with deleting and creating snapshots.

This is the second time I've lost things through snapshots. I'm not going to use them in the future --- I'll just keep an rsync of the virtualbox directory.

Does anyone actually use the snapshots? For what and how? When I read the manual, they sound great, but in practice, I've had nothing but trouble. I have a second VDI with (most of) my data and work files (all except Email and things that live in the profile --- I have not taken the time to figure out how to reliably relocate them).

I've set the data VDI to write through - I did this a long time ago using the command line tools (because you can't do it with the GUI). According to the manual, this prevents it from being 'snapshot'ed. However, in practice, I can not snapshot the VM without first detaching that VDI, so I'm not really sure why anyone would want to use the writethrough mode VDI - I could just detach a normal VDI first, but of course, I would not get the reminder error message if I forgot.
roxxanne_big@
Posts: 1
Joined: 14. Feb 2009, 14:27

vm inaccessible error

Post by roxxanne_big@ »

I have the following problem:
"The selected virtual machine is inaccessible. Please inspect the error message shown below and press the Refresh button if you want to repeat the accessibility check:

Code: Select all

Hard disk '/Users/roxanabig/Library/VirtualBox/VDI/calculator cu windows.vdi' 
with UUID {af9f4cf8-cad5-41a4-9c76-a8bdc618955c} is already attached to a machine 
with UUID {dd15c9d7-d979-4abb-b75b-062a9a40fe1c} (see '/Users/roxanabig/Library/VirtualBox/Machines/windows/windows.xml'). 
Result Code: NS_ERROR_FAILURE (0x80004005) Component: Machine Interface: IMachine {1e509de4-d96c-4f44-8b94-860194f710ac}"
Can someone please help me?
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Roxanne, can you send me a copy of your VirtualBox.xml (in Users/roxanabig/Library/VirtualBox) and your /Users/roxanabig/Library/VirtualBox/Machines/windows/windows.xml and I will post back what the issues are and changes that you need to make.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

The files that you send me were VirtualBox.xml:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!-- Sun xVM VirtualBox Global Configuration -->
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.3-macosx">
  <Global>
    <ExtraData> ... </ExtraData>
    <MachineRegistry>
      <MachineEntry uuid="{dd15c9d7-d979-4abb-b75b-062a9a40fe1c}" src="Machines/windows/windows.xml"/>
    </MachineRegistry>
    <DiskRegistry>
      <HardDisks>
        <HardDisk uuid="{af9f4cf8-cad5-41a4-9c76-a8bdc618955c}" type="normal">
          <VirtualDiskImage filePath="VDI/calculator cu windows.vdi"/>
        </HardDisk>
      </HardDisks>
      <DVDImages>
        <Image uuid="{6383791f-8f34-4586-93e3-333fbe02a02a}" src="/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso"/>
      </DVDImages>
      <FloppyImages/>
    </DiskRegistry>
    <USBDeviceFilters/>
    <SystemProperties defaultVDIFolder="VDI" defaultMachineFolder="Machines" remoteDisplayAuthLibrary="VRDPAuth" webServiceAuthLibrary="VRDPAuth" HWVirtExEnabled="false" LogHistoryCount="3"/>
  </Global>
</VirtualBox>
and the machine.xml:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!-- Sun xVM VirtualBox Machine Configuration -->
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.3-macosx">
  <Machine uuid="{dd15c9d7-d979-4abb-b75b-062a9a40fe1c}" name="windows" OSType="winxp" lastStateChange="2009-02-13T23:43:57Z" snapshotFolder="Snapshots" currentStateModified="false">
    <ExtraData> ...  </ExtraData>
    <Snapshot uuid="{283dd3e1-5b6e-4ff1-8267-6cd30db57343}" name="Snapshot 1" timeStamp="2009-02-13T22:37:19Z" stateFile="Snapshots/{283dd3e1-5b6e-4ff1-8267-6cd30db57343}.sav">
      <Description/>
      <Hardware>
        <CPU> ... </CPU>
        <Memory RAMSize="512"/>
        <Boot> ... </Boot>
        <Display VRAMSize="8" MonitorCount="1"/>
        <RemoteDisplay enabled="false" port="3389" authType="Null" authTimeout="5000"/>
        <BIOS> ... </BIOS>
        <DVDDrive passthrough="false">
          <HostDrive src="MATSHITA CD-RW  CW-8221"/>
        </DVDDrive>
        <FloppyDrive enabled="true"/>
        <USBController enabled="true" enabledEhci="true"> ... </USBController>
        <SATAController enabled="false" PortCount="1" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3"/>
        <Network> ... </Network>
        <UART> ... </UART>
        <LPT> ... </LPT>
        <AudioAdapter controller="AC97" driver="Null" enabled="false"/>
        <SharedFolders/>
        <Clipboard mode="Bidirectional"/>
        <Guest memoryBalloonSize="0" statisticsUpdateInterval="0"/>
        <GuestProperties> ... </GuestProperties>
      </Hardware>
      <HardDiskAttachments>
        <HardDiskAttachment hardDisk="{af9f4cf8-cad5-41a4-9c76-a8bdc618955c}" bus="IDE" channel="0" device="0"/>
      </HardDiskAttachments>
    </Snapshot>
    <Hardware>
      <CPU> ... </CPU>
      <Memory RAMSize="512"/>
      <Boot> ... </Boot>
      <Display VRAMSize="8" MonitorCount="1"/>
      <RemoteDisplay enabled="false" port="3389" authType="Null" authTimeout="5000"/>
      <BIOS> ... </BIOS>
      <DVDDrive passthrough="false">
        <HostDrive src="MATSHITA CD-RW  CW-8221"/>
      </DVDDrive>
      <FloppyDrive enabled="true"/>
      <USBController enabled="true" enabledEhci="true"> ... </USBController>
      <SATAController enabled="false" ... />
      <Network> ... </Network>
      <UART> ... </UART>
      <LPT> ... </LPT>
      <AudioAdapter controller="AC97" driver="Null" enabled="false"/>
      <SharedFolders/>
      <Clipboard mode="Bidirectional"/>
      <Guest memoryBalloonSize="0" statisticsUpdateInterval="0"/>
      <GuestProperties> ... </GuestProperties>
    </Hardware>
    <HardDiskAttachments>
      <HardDiskAttachment hardDisk="{af9f4cf8-cad5-41a4-9c76-a8bdc618955c}" bus="IDE" channel="0" device="0"/>
    </HardDiskAttachments>
  </Machine>
</VirtualBox>
I've folded some of the nodes down to ellipsis ( ... ) to save space. The design of the VBox data models is such that these two files contain duplicated data that must be consistent, and if its not then the VM fails to load. In your case there is an inconsistency are: the VM has a snapshot which is not registered in the registry. To fix this you need to edit the VirtualBox.xml file and fix the section that is <HardDisk uuid="{af9f ... </HardDisk>. I can't tell you exactly what the change is because my schemas are 1.6-windows and 1.6-linux and yours is 1.3-macosx, but nested in this tag is the reference to the snapshot version and this must be consistent with the VM's definition.

To work out the format, create another VM with a small blank disk. Then snapshot it. You don't need to start it. By comparing how the new HD and its snapshot are registered you can work out the edits to make to reregister your snapshot in the Virtualbox.xml file. Make sure that the names and UUIDs match up.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Post Reply