Error when trying yo use the command line on any of my VMs

Discussions related to using VirtualBox on Windows hosts.
Lishron
Posts: 2
Joined: 25. Sep 2015, 16:36

Error when trying yo use the command line on any of my VMs

Post by Lishron »

I have 6 virtual machines.
I am running Windows 8.1
My guests are all 2012 r2 except one windows 8.1
I am running VirtualBox 5.0.4 r102546

If i run
"C:\Program Files\Oracle\VirtualBox\VBoxManage" controlvm "WS1DEV.10.200.200.18" pause
or
"C:\Program Files\Oracle\VirtualBox\VBoxManage" controlvm "WS1DEV.10.200.200.18" savestate
or
any command like the above to on any of my machines i get the below error. I have tried it from a command prompt both regular and elevated command prompt using run as administrator.
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Shared)" at line 101 of file VBoxManageControlVM.cpp
Thanks
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Error when trying yo use the command line on any of my V

Post by mpack »

Was it previously working? Try rebooting your host if so.
Lishron
Posts: 2
Joined: 25. Sep 2015, 16:36

Re: Error when trying yo use the command line on any of my V

Post by Lishron »

I don't know this is the first time I am trying to script anything with it.
I did have all my disk as VHD's I am as I type changing them to VDI's in hopes they may be the issue.
I will let you know.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Error when trying yo use the command line on any of my V

Post by mpack »

No, the container format of your virtual disks is unlikely to be relevant to this question - not if the problem survives a host reboot.
rerat
Posts: 1
Joined: 4. Oct 2015, 00:38

Re: Error when trying yo use the command line on any of my V

Post by rerat »

I am having the same issue. Anybody know of a fix? I can pause and resume from the GUI, but get the above error from command line. Rebooting made no difference.
bwestrich
Posts: 1
Joined: 31. Oct 2015, 00:55

Re: Error when trying yo use the command line on any of my V

Post by bwestrich »

I was also getting this error (when calling "vboxmanage controlvm MYVM acpipowerbutton"). The script causing the error was a bash (sh) script that I was calling from a Windows batch file by invoking cygwin/bin/sh.exe. When I invoked the command directly from the batch file, the error was no longer present.

My guess is when I invoked the command from "sh", I was perhaps using a different user and/or environment? I wish I could have continued using bash for this, as I much prefer it over .bat files, but the script I needed to write wasn't very complicated so I went with .bat files. ....
TimThein
Posts: 10
Joined: 30. Sep 2015, 23:15

Re: Error when trying yo use the command line on any of my V

Post by TimThein »

I'm experiencing the same issue as described in the OP. I've never used the VBoxManage command before, so I cannot say if this command worked at all on my machine.
I'm also using the latest release. This issue seems to have first appeared in Sep. of last year and there doesn't seem to be any bug reports mentioning the error message.
I'll see if I can add a bug report.
a_goodwin
Posts: 5
Joined: 10. Oct 2018, 08:46

Re: Error when trying yo use the command line on any of my VMs

Post by a_goodwin »

The half of 2018 is over, but i have the same issue!

I have an Win 10 host with VirtualBox 5.2.18 r 124319.
My VM is Ubuntu 16.04 with gui.

I tried to gracefully shutdown my VM, but have the same trouble:

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe controlvm VM_name acpipowerbutton
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Shared)" at line 388 of file VBoxManageControlVM.cpp
I tried this from user and administrator console, but result is the same.

controlvm VM_name poweroff command gives the same result.

How can I solve this one?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Error when trying yo use the command line on any of my VMs

Post by socratis »

a_goodwin wrote:I have an Win 10 host with VirtualBox 5.2.18 r 124319. My VM is Ubuntu 16.04 with gui.
OSX 10.11.6 host here, but same VM. Works (almost) right out of the box. When using either the "Machine" » "ACPI Shutdown" menu, or the HostKey+U, or the "VBoxManage controlvm "Ubuntu" acpipowerbutton", I am presented with a dialog box asking me to choose what I want to do:
Goodbye, socratis. Would you like to...
Lock | Suspend | Restart | Shut Down
If I install the "Gnome Tweak Tool" and go into the Power Settings, and change the "Power Button Action" from "Interactive" to "Shutdown", the VM simply turns off gracefully, with all 3 options; menu, host-key, CLI command.

We need to see a complete VBox.log, from a complete VM run:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe error / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
a_goodwin
Posts: 5
Joined: 10. Oct 2018, 08:46

Re: Error when trying yo use the command line on any of my VMs

Post by a_goodwin »

Thank you, socratis

I found workaround for me.
If i starting VM from Virtualbox gui, the trouble is here, but if i starting VM from console with

Code: Select all

vboxmanage.exe startvm VM_Name
it successfully stopped with

Code: Select all

VBoxManage.exe controlvm VM_name acpipowerbutton
Tuning of power button behaviour in Ubuntu is already done.

a bit later will try to get logs!
a_goodwin
Posts: 5
Joined: 10. Oct 2018, 08:46

Re: Error when trying yo use the command line on any of my VMs

Post by a_goodwin »

Today i tried to get logs, as you adviced.

1. I turned the VM on from VirtualBox gui
2. Have tried to do controlvm VM acpipowerbutton from console
3. gets an error
4. Waits for some seconds
5. Shuts down machine from inside VM.
Here is the log:
Buben-2018-10-11-08-33-39.zip
(26.56 KiB) Downloaded 12 times
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Error when trying yo use the command line on any of my VMs

Post by socratis »

00:00:01.653682 Guest OS type: 'Ubuntu_64'
...
00:00:01.698858 [/Devices/hpet/0/Config/] (level 4)
00:00:01.698859 ICH9 <integer> = 0x0000000000000001 (1)
Please do not deviate from the defaults. The ICH9 chipset is experimental and only for OSX guests!
00:00:01.657171 File system of 'Z:\VBox\Buben.vdi' is unknown
What is "Z:\"? Internal? External? Network? And what filesystem is it?
00:00:01.591951 VRDP: TCP server listening on port 3389 (IPv4 and IPv6).
Do you need to have the RDP server enabled?
00:00:01.698976 VRamSize <integer> = 0x0000000001000000 (16 777 216, 16 MB)
You should max out the VRAM in the VM Settings, Display.
00:00:11.620641 VMMDev: Guest Additions information report: Version 5.2.8 r120774 '5.2.8_KernelUbuntu'
Not only are these older GAs, but they're not the official ones. Uninstall them and install the ones that came with VirtualBox. With the VM having the focus, go to the menu "Devices" » "Insert GAs CD image..." and follow the installation prompts. If you want to "control" the VM from the host, you'd better make sure they're on the same page...
VirtualBox VM 5.2.18 r124319 win.amd64 (Aug 14 2018 12:39:01) release log
00:00:11.620641 VMMDev: Guest Additions information report: Version 5.2.8 r120774 '5.2.8_KernelUbuntu'
00:00:18.598469 VMMDev: Guest Log: VBoxService 5.2.12 r122591 (verbosity: 0) linux.amd64 (May  9 2018 12:07:53) release log
You know why I used three different colors? Because you've created a multi-version setup! Different main program, different service, different GAs (and forked ones actually). You got to clean it up, mainly by removing anything VirtualBox-related in the guest, and installing the GAs as their maker intended. See the previous point...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
a_goodwin
Posts: 5
Joined: 10. Oct 2018, 08:46

Re: Error when trying yo use the command line on any of my VMs

Post by a_goodwin »

ОК, I will try all of these and will write a report.
a_goodwin
Posts: 5
Joined: 10. Oct 2018, 08:46

Re: Error when trying yo use the command line on any of my VMs

Post by a_goodwin »

Another one try with the same result.

Changed ICH9 to PIIX;
Moved vdi from drive я to regular hard disk G:
RDP is very useful for my purposes, but... forget, sorry... (upd!) without RDP the same result;
Maximized VRAM;
reinstall Virtualbox and GA

1. Turn machine on from VirtualBox GUI;
2. wait for a little
3. try to do controlvm with the same result:

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe controlvm Buben acpipowerbutton
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Shared)" at line 388 of file VBoxManageControlVM.cpp
4. turn off guest from inside;
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Error when trying yo use the command line on any of my VMs

Post by socratis »

I can't verify it on my Win host, it's currently out of order. As I said, it works fine on my OSX host.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Locked