Showing posts with label virtualbox. Show all posts
Showing posts with label virtualbox. Show all posts

Tuesday, April 01, 2014

how to bring VirtualBox out of 'Guru meditation'

I have been using Oracle Virtualbox for work for quite a few years now. This time around I have a few relatively big virtual machines running. A Netapp simulator and a UCS platform Emulator. I keep switching between the two, by pausing one to free up memory to work on the other.

Yesterday, the UCS one suddenly can not be started again from the Virtualbox Manager GUI. All possible actions for the vm are grayed out, except that I could review logs. 

Under the vm icon, it says 'Guru meditation'. The mouse-over hint said 'session locked'.  

The actual directory looks pretty clean. The Logs/VBox.log indeed has an entry confirming this unfortunate 'guru meditation' state.
41:15:26.089214 UIMediumEnumerator: Machine (or snapshot) event processed, ID = d2b17907-9bef-4e1d-b755-d6be33e5570a
41:15:26.089683 UIMediumEnumerator: Machine (or snapshot) event received, ID = d2b17907-9bef-4e1d-b755-d6be33e5570a
41:15:26.089856 UIMediumEnumerator:  Old usage: 0210f54c-ea12-4a15-bc4d-f8fa690759a8, 658b6fcb-ee59-4065-abd4-c3aeb1eab3a8, 6d3ed09f-42cd-4b36-8652-b4a75e8181bd, 7b83e1e3-ffc2-445d-a9fc-9d6586833b4e, 8589d5fd-4ff3-4c80-b915-7cee87a2e974, e6964c46-790b-4aff-82fb-b22a83792882, f623a9aa-4b0c-44a0-b34c-34d9a3f09dd6, fea35c17-bc46-4d31-84b0-08f4620e7cc4
41:15:26.101502 UIMediumEnumerator:  New usage: 658b6fcb-ee59-4065-abd4-c3aeb1eab3a8, e6964c46-790b-4aff-82fb-b22a83792882, f623a9aa-4b0c-44a0-b34c-34d9a3f09dd6, 8589d5fd-4ff3-4c80-b915-7cee87a2e974
41:15:26.101557 UIMediumEnumerator:  Items excluded from usage: 7b83e1e3-ffc2-445d-a9fc-9d6586833b4e, fea35c17-bc46-4d31-84b0-08f4620e7cc4, 0210f54c-ea12-4a15-bc4d-f8fa690759a8, 6d3ed09f-42cd-4b36-8652-b4a75e8181bd
41:15:26.113783 UIMediumEnumerator: Machine (or snapshot) event processed, ID = d2b17907-9bef-4e1d-b755-d6be33e5570a
41:15:26.135516 UIMediumEnumerator: Medium-enumeration finished!
41:21:23.219316 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={8ab7c520-2442-4b66-8d74-4ff1e195d2b6} aComponent={Console} aText={Invalid machine state: GuruMeditation}, preserve=false

I made a copy of the virtual machine directory, embracing for the worst.
Then it dawned on me that I may be able to bring it out of 'session locked' state via CLI, namely, VBoxManage. 

Viola!
Mac:/Users/jack/VirtualBoxVMs$ VBoxManage controlvm ucspe resume
VBoxManage: error: Cannot resume the machine as it is not paused (machine state: GuruMeditation)
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
VBoxManage: error: Context: "Resume()" at line 118 of file VBoxManageControlVM.cpp
Mac:/Users/jack/VirtualBoxVMs$ VBoxManage controlvm ucspe poweroff
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
As soon as VBoxManage finished executing, all the grayed-out actions became available again on the GUI for this vm. I started it. 

The virtual machine came up just fine. What a relief :-)

In case more specifics help somebody, I am running Virtualbox v3.4.8 on Mac OS X 10.9.2 (Maverick). The two VMs in question are Linux 2.6 and FreeBSD.

Wednesday, August 17, 2011

migrate to VirtualBox from VMWare Server : sadly & happy to

I have been a loyal VMWare server 1.0 user since it became free in 2005. It is used to build various sandbox virtual machines on my Windows XP laptop at work. The guest OS include RHEL, CentOS, Fedora, Solaris 10, Windows server 2008,  Windows server 2003,  Windows XP & Windows Enterprise 7. 

One feature I like a lot is its capability, with an easy-to-use GUI, to modify network settings to choose subnets, DHCP lease, and port forwarding, etc.

After upgrading my home desktop to long-awaited CentOS 6 early this month, I could no longer compile & run VMWare server. Since my home PC runs a mini lab of 3~4 nodes to play with cobbler & puppet, I need to find a solution that can play the same vmware machine (VMDK storage). Virtualbox from Oracle (Sun/Virtualbox.org) seems to be a good choice, given its popularity in LinuxJounal's 2010 poll. 
  • The one RPM installation is great.
  • It uses DKMS to compile and it compiles successfully in one shot.
  • Guess OS support is up to date, with WIndows 7 and Server 2008. It does not differentiate versions of RHEL, RHL, Fedora though.
  • PXE capability comes from the extension pack. you'll need to download & load. The extension pack license is free only for evaluation or personal use.
  • Nowhere to find UI to modify network settings, other than choosing types of networking (NAT, bridged, etc.).
    • add NAT adapter, only when you need this VM go talk with the world linked to the host
    • add 'intnet' adapter and provides a meaningful name. This name apparently is used by Virtualbox to wire the other guest os into the same network, if they share the same name for their intnet adapter.
  • Virtualbox won't import vmware guest images as is, since it imports only Open Virtualization format. On the other hand, it does support VMDK format, such that you can create a new virtualbox and choose to use an existing virtual disk (the vmware guest image you intend to import or run from virtualbox).
  • Too bad the proxy preference do not extends to guests (behind the NAT). Instead, I had to configure http proxy at various places (profile.d, yum.conf, gnome) inside my CentOS 5 or CentOS 6 guests.
The other thing noteworthy is what type of controller Virtualbox associates your existing vmware disk (vmdk) to. It needs to match. Otherwise the working vmware image may fail to boot properly. It happened to me, when Virtualbox associated an IDE-based disk to SATA controller. Once I powered off the guest, then redid the association, I were able to boot up the image w/o a glitch from there on.

The installation & look & feel are pretty smooth & consitent & faster(?),on both a Windows 7 Enterprise x64 host (HP Elitebook laptop. 4G RAM) and a CentOS 6.0 i386 host (a Compaq PC, 2G RAM).  For now, I think I'll continue the path of migrating to VirtualBox. VMWare server will stay on for a bit, just in case I decide to roll-back.  I am definitely looking forward for taking advantage of the capability to take multiple snapshots, with notes!  It bothered me when I could keep only one snapshot and couldn't annotate what is this snapshot, with VMWare Server 1.x & 2.x