After fresh install of newer OS to fresh disk, copied the Virtual Box directories from old sys disk. All seemed to work; but after some snapshot consolidation, re-entry to the GUI yields inaccessible system. The major question is simply:
- (q1) Any advice?
Context:
- New disk. Installed Oracle Linux 7.2 yesterday. Added some packages. Did yum update to 7.3
- After reboot, uname -r shows 3.10.0-514.el7.x86_64
- Then, did yum install VirtualBox-5.1
- Create empty new account with same name and same uid as it was on previous system disk (Oracle Linux 6.something)
- Connect old sys disk via usb. cd to old home dir.
rsync -aSHAXv VirtualBox\ VMs ~/
- Start Virtual box: nothing shows up. Oh, right. Exit, and
mkdir ~/.Trash; mv ~/.config/VirtualBox/ ~/.Trash
- back at the old home dir,
cd .config; rsync -aSHAXv VirtualBox ~/.config/
- Start: everything looks normal. Start my Windows machine. All seems well. Do many updates.
- shut down machine. Snapshot.
- Delete the two or three oldest snapshots (via the virtual box GUI). Exit. Restart and:
Code: Select all
The selected virtual machine is inaccessible. Please inspect the error message shown below and press Refresh button if you want to repeat the accessibility check.
Error in /home/jhenning/VirtualBox VMs/Win7/Win7.vbox (line 9) -- Snapshots present but required Machine/@currentSnapshot attribute is missing.
/home/vbox/vbox-5.1.10/src/VBox/Main/src-server/MachineImpl.cpp[745] (nsresult Machine::i_registeredInit()).
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}
While the Virtual Box GUI was doing its work to merge and apply differences for deleted snapshots, I had a terminal window logged in. Notice that I had started with a 'du' command, and did a couple more after each delete completed.
Code: Select all
Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Thu Nov 3 17:15:05 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cd
$ cd VirtualBox\ VMs/
$ df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/luks-f8663eec-1543-4532-8bc9-562953ecd029 401G 110G 271G 29% /
$ ls
C:\nppdf32Log\debuglog.txt JustToLiveCD.zip ls-dash-lR.txt OEL6.5Test OEL6.5test2 OEL6.5test3 Win7
$ cd Win7/
$ find -type f -exec ls -lh {} \;
-rw-------. 1 jhenning jhenning 34G Mar 7 2016 ./Snapshots/{90f8c70b-08ce-4f41-af6f-de9d51f0977a}.vdi
-rw-------. 1 jhenning jhenning 19G Dec 4 12:51 ./Snapshots/{7f3783d1-8677-4051-8bcd-f584a1485bf1}.vdi
-rw-------. 1 jhenning jhenning 2.3G Mar 7 2016 ./Snapshots/{1f3d3727-7b57-45f7-ac86-17519a5294b8}.vdi
-rw-------. 1 jhenning jhenning 37K Dec 4 12:51 ./Win7.vbox-prev
-rw-------. 1 jhenning jhenning 27G Jul 11 2014 ./Win7.vdi
-rw-------. 1 jhenning jhenning 115K Dec 3 21:57 ./Logs/VBox.log.1
-rw-------. 1 jhenning jhenning 104K Sep 7 13:42 ./Logs/VBox.log.2
-rw-------. 1 jhenning jhenning 165K Dec 4 12:51 ./Logs/VBox.log
-rw-------. 1 jhenning jhenning 102K Jul 22 13:30 ./Logs/VBox.log.3
-rw-------. 1 jhenning jhenning 35K Dec 4 12:51 ./Win7.vbox
$ pwd
/home/jhenning/VirtualBox VMs/Win7
$ du -hs .
81G .
$ du -hs .
65G .
$ du -hs .
62G .
$ find -type f -exec ls -lh {} \;
-rw-------. 1 jhenning jhenning 2.0M Dec 4 12:53 ./Snapshots/{c8c5b893-9bc0-4b94-b25b-3b4ae5a7326b}.vdi
-rw-------. 1 jhenning jhenning 19G Dec 4 13:01 ./Snapshots/{7f3783d1-8677-4051-8bcd-f584a1485bf1}.vdi
-rw-------. 1 jhenning jhenning 13K Dec 4 13:13 ./Win7.vbox-prev
-rw-------. 1 jhenning jhenning 44G Dec 4 13:01 ./Win7.vdi
-rw-------. 1 jhenning jhenning 115K Dec 3 21:57 ./Logs/VBox.log.1
-rw-------. 1 jhenning jhenning 104K Sep 7 13:42 ./Logs/VBox.log.2
-rw-------. 1 jhenning jhenning 165K Dec 4 12:51 ./Logs/VBox.log
-rw-------. 1 jhenning jhenning 102K Jul 22 13:30 ./Logs/VBox.log.3
-rw-------. 1 jhenning jhenning 13K Dec 4 13:13 ./Win7.vbox
-rw-------. 1 jhenning jhenning 27K Dec 4 13:07 ./Win7-1.14-linux.vbox
$
Up to this point in this note, have tried to stick with stuff I am sure of. Now, though, we get to an attempt to reconstruct via human memory, which is of course not as reliable.
- As much as possible, I have attempted to do the work as non-priv'd user 'jhenning', including the above-mentioned rsync commands. Of course, the 'useradd' command was priv'd; and I entered a command verbatim from the manual to add jhenning to the virtual box users group. I do not recall other relevant command line activity.
- The Windows machine was started and stopped by the GUI. (When I say "GUI", I mean: use mouse to select Applications / System Tools / Oracle VM Virtual Box; when that comes up, if I click Help / About Virtualbox..., it brings up a window with a logo and the text VirtualBox Graphical User Interface Version 5.1.10 r112026 (Qt5.6.1))
- During the session where Windows seemed to be operating normally, it went through a bunch of boots. However, it is possible that it was all one continuous virtual box session, with several hours of active work, including an overnight and a period of a couple hours when I closed the lid of the laptop; it appeared not to mind at all, and resumed in a normal-seeming manner.
- Among the very first things that I did after starting the VM was to press 'insert guest additions'. It was slow to respond, so I thought I had not clicked in the correct place; ended up with it inserted twice. Much, much later saw complaints about invalid state due to same media on two drives.
- While windows was doing its various updates, it was using a bridged network adapter through my wireless connection. Since I am doing lots of downloads today, I wanted to switch to had wired.
- Shut Windows down, do a snapshot, go to settings, add another bridged adapter for the hard wire.
- Saw a little warning about invalid state, because of the 2x insertions of guest additions. Went to that settings screen and deleted one of them.
- Did the above-mentioned weeding of old snapshots.
- Exit entirely from the GUI.
- Started the GUI and a little box appeared with some sort of message. Before I could record its contents, it disappeared, and was replaced by what you see at the top.
Code: Select all
$
$ pwd
/home/jhenning/VirtualBox VMs/Win7
$ ls -l
total 45849864
drwx------. 2 jhenning jhenning 4096 Dec 3 21:58 Logs
drwx------. 2 jhenning jhenning 4096 Dec 4 13:01 Snapshots
-rw-------. 1 jhenning jhenning 27582 Dec 4 13:07 Win7-1.14-linux.vbox
-rw-------. 1 jhenning jhenning 12391 Dec 4 13:13 Win7.vbox
-rw-------. 1 jhenning jhenning 12555 Dec 4 13:13 Win7.vbox-prev
-rw-------. 1 jhenning jhenning 47062188032 Dec 4 13:01 Win7.vdi
$ ls -l Logs
total 492
-rw-------. 1 jhenning jhenning 168178 Dec 4 12:51 VBox.log
-rw-------. 1 jhenning jhenning 117718 Dec 3 21:57 VBox.log.1
-rw-------. 1 jhenning jhenning 105505 Sep 7 13:42 VBox.log.2
-rw-------. 1 jhenning jhenning 104079 Jul 22 13:30 VBox.log.3
$ ls -l Snapshots/
total 19113772
-rw-------. 1 jhenning jhenning 19573768192 Dec 4 13:01 {7f3783d1-8677-4051-8bcd-f584a1485bf1}.vdi
-rw-------. 1 jhenning jhenning 2097152 Dec 4 12:53 {c8c5b893-9bc0-4b94-b25b-3b4ae5a7326b}.vdi
The error message complains about line 9.
- (q2) Is it possible that I could make it happy just by editing it?
- (q3) If so, how?
- (q4) Do you need to see the whole thing?
Code: Select all
$ cat -n Win7.vbox | head
1 <?xml version="1.0"?>
2 <!--
3 ** DO NOT EDIT THIS FILE.
4 ** If you make changes to this file while any VirtualBox related application
5 ** is running, your changes will be overwritten later, without taking effect.
6 ** Use VBoxManage or the VirtualBox Manager GUI to make changes.
7 -->
8 <VirtualBox xmlns="http://www.virtualbox.org/" version="1.15-linux">
9 <Machine uuid="{d8bea4c5-195a-4630-9051-2137995c52ea}" name="Win7" OSType="Windows7_64" snapshotFolder="Snapshots" lastStateChange="2016-12-04T18:01:27Z">
10 <MediaRegistry>
$