Can't delete VM after partly failed import

This is for discussing general topics about how to use VirtualBox.

Can't delete VM after partly failed import

Postby itnomad » 1. Dec 2011, 18:31

Hi,

I tried to import a ovf-image (BIG-IP 11 virtual loadbalancer image by F5). During import using the GUI (on OSX) the import eventually "stalled"; Virtualbox became unresponsive and I killed it. After restart the VM was just borked:
  • the start-button is greyed out
  • if you make any changes to the VM's configuration, saving the config fails with the errormessage "Die Einstellungen der virtuellen Maschine konnten nicht nach abgespeichert werden." => "The settings of the virtual machine could not be save to " <- note the blank
  • if you go to the virtual media manager and try to release the medium, the same error message appears
OK, now the same using VBoxManager:
Code: Select all   Expand viewCollapse view
$ VBoxManage list vms
"vm" {8fbe6fba-ff53-4be4-9cfb-8c063e506ac5}
"vm_1" {07c07d59-93a8-4e65-878b-5187df6f841d}

(both instances are borked)
Code: Select all   Expand viewCollapse view
$ VBoxManage modifyvm 07c07d59-93a8-4e65-878b-5187df6f841d --name "blabla"
VBoxManage: error: The machine 'vm_1' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
Context: "LockMachine(a->session, LockType_Write)" at line 367 of file VBoxManageModifyVM.cpp

Code: Select all   Expand viewCollapse view
$ VBoxManage unregistervm 07c07d59-93a8-4e65-878b-5187df6f841d --delete
VBoxManage: error: Cannot unregister the machine 'vm_1' while it is locked
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
Context: "Unregister(fDelete ? (CleanupMode_T)CleanupMode_DetachAllReturnHardDisksOnly : (CleanupMode_T)CleanupMode_DetachAllReturnNone, ComSafeArrayAsOutParam(aMedia))" at line 160 of file VBoxManageMisc.cpp


Now, for the fun of it, I try to import the image using VBoxManage:
Code: Select all   Expand viewCollapse view
$ VBoxManage import /Users/ajanssen/11-images/BIGIP-11.0.0.8037.0-scsi.ova --vsys 0 --eula accept
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /Users/ajanssen/11-images/BIGIP-11.0.0.8037.0-scsi.ova...
VBoxManage: warning: The virtual system "vm" claims support for 4096 MB RAM size, but VirtualBox has support for min 4 & max 3584 MB RAM size only..
OK.
Disks:  vmdisk1   100   1645477888   http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized   BIGIP-11.0.0.8037.0-disk1.vmdk   603278848   -1     vmdisk2   50   -1   http://www.vmware.com/interfaces/specifications/vmdk.html#sparse      603278848   -1   

Virtual system 0:
 0: Suggested OS type: "Other"
    (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
 1: Suggested VM name "vm_2"
    (change with "--vsys 0 --vmname <name>")
 2: Product (ignored): BIG-IP VE 11.0.0.8037.0
 3: Vendor (ignored): F5 Networks
 4: Version (ignored): 11.0.0
 5: VendorUrl (ignored): http://www.f5.com
 6: Description "BIG-IP Local Traffic Manager Virtual Edition
Copyright 2009-2011 F5 Networks (http://www.f5.com)

For support please visit http://support.f5.com
      "
    (change with "--vsys 0 --description <desc>")
 7: End-user license agreement (accepted)
 8: Number of CPUs: 4
    (change with "--vsys 0 --cpus <n>")
 9: Guest memory: 3584 MB
    (change with "--vsys 0 --memory <MB>")
10: Network adapter: orig Management, config 2, extra type=Bridged
11: Network adapter: orig Internal, config 2, extra type=Internal
12: Network adapter: orig External, config 2, extra type=Bridged
13: Network adapter: orig HA, config 2, extra type=Bridged
14: SCSI controller, type LsiLogic
    (change with "--vsys 0 --unit 14 --scsitype {BusLogic|LsiLogic}";
    disable with "--vsys 0 --unit 14 --ignore")
15: Hard disk image: source image=BIGIP-11.0.0.8037.0-disk1.vmdk, target path=/Users/ajanssen/VirtualBox VMs/vm_2/BIGIP-11.0.0.8037.0-disk1.vmdk, controller=14;channel=0
    (change target path with "--vsys 0 --unit 15 --disk path";
    disable with "--vsys 0 --unit 15 --ignore")
16: Hard disk image: source image=, target path=/Users/ajanssen/VirtualBox VMs/vm_2/, controller=14;channel=1
    (change target path with "--vsys 0 --unit 16 --disk path";
    disable with "--vsys 0 --unit 16 --ignore")
0%...10%...20%...30%...40%...50%...

The import hangs now.

Any idea how I release this "lock" which is mentioned? What kind of lock is that anyway? And why does the import stall?

The jadda-jadda:
VirtualBox 4.1.6 r74713 running on OSX Snow Leopard.
F5 BIG-IP image is here: https://downloads.f5.com/esd/product.js ... al+Edition


Cheers, Alex.
itnomad
 
Posts: 1
Joined: 1. Dec 2011, 17:49
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux,Windows,BSD...

Re: Can't delete VM after partly failed import

Postby mpack » 2. Dec 2011, 13:16

Personally I would just make sure VirtualBox is fully shut down, then make a backup of the VirtualBox.xml file, then manually edit VirtualBox.xml to delete the <MachineEntry> line for that VM. That deletes it from the GUI after which you can also delete the VM folder with all its files.
mpack
Site Moderator
 
Posts: 34727
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 11 guests