I can't make my VirtualBox VM manually restart after a blackout (it was running before the power went off).
This is the error I get:
vbox#chebasti:~/VirtualBox VMs/DockerRegistry$ VBoxHeadless --startvm "DockerRegistry" -e "TCP/Ports=4444"
Oracle VM VirtualBox Headless Interface 4.0.4
(C) 2008-2011 Oracle Corporation
All rights reserved.
Error: failed to start machine. Error message: UUID {20afee16-bf06-43c4-ab02-770106ce3498} of the medium '/home/vbox/VirtualBox VMs/DockerRegistry/ubuntu-14.04-server-amd64-disk1.vdi' does not match the value {4c6a8bcb-3766-4581-9f45-0de031c65c95} stored in the media registry ('/home/vbox/.VirtualBox/VirtualBox.xml')
I already tried to search the error online and tried to follow different instructions but none worked.
You can find the output of VBoxManage showvminfo DockerRegistry --details here (I did not pasted it here because it is very long).
The output of VBoxManage showhdinfo ubuntu-14.04-server-amd64-disk1.vdi is:
vbox#chebasti:~/VirtualBox VMs/DockerRegistry$ VBoxManage showhdinfo ubuntu-14.04-server-amd64-disk1.vdi
UUID: 4c6a8bcb-3766-4581-9f45-0de031c65c95
Accessible: no
Access Error: UUID {20afee16-bf06-43c4-ab02-770106ce3498} of the medium '/home/vbox/VirtualBox VMs/DockerRegistry/ubuntu-14.04-server-amd64-disk1.vdi' does not match the value {4c6a8bcb-3766-4581-9f45-0de031c65c95} stored in the media registry ('/home/vbox/.VirtualBox/VirtualBox.xml')
Logical size: 0 MBytes
Current size on disk: 0 MBytes
Type: normal (base)
Storage format: VDI
Format variant: dynamic default
In use by VMs: DockerRegistry (UUID: 952200e9-db58-420a-8fe1-ef49523def3d)
Location: /home/vbox/VirtualBox VMs/DockerRegistry/ubuntu-14.04-server-amd64-disk1.vdi
UPDATE
I don't know if it is of any use but here you are the output of VBoxManage showhdinfo \{4d495022-b596-47c0-8f38-f16c6c5d7f63\}.vdi:
vbox#chebasti:~/VirtualBox VMs/DockerRegistry/Snapshots$ VBoxManage showhdinfo \{4d495022-b596-47c0-8f38-f16c6c5d7f63\}.vdi
UUID: 4d495022-b596-47c0-8f38-f16c6c5d7f63
Accessible: yes
Logical size: 0 MBytes
Current size on disk: 564 MBytes
Type: normal (differencing)
Storage format: VDI
Format variant: differencing default
In use by VMs: DockerRegistry (UUID: 952200e9-db58-420a-8fe1-ef49523def3d)
Location: /home/vbox/VirtualBox VMs/DockerRegistry/Snapshots/{4d495022-b596-47c0-8f38-f16c6c5d7f63}.vdi
Auto-Reset: off
I just had this problem with my boot2docker VM after running low on power on my macbook.
$ boot2docker start -v
Using virtualbox driver
2014/09/04 18:00:42 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/09/04 18:00:42 executing: VBoxManage startvm boot2docker-vm --type headless
Waiting for VM "boot2docker-vm" to power on...
VBoxManage: error: UUID {0caf9f04-5159-403a-828c-0dd9be68e1a0} of the medium '/Users/-/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vmdk' does not match the value {07ad4be9-d2d0-4ac5-bb8a-e992e816ed19} stored in the media registry ('/Users/-/Library/VirtualBox/VirtualBox.xml')
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Medium, interface IMedium
What seemed to fix it for me was to "boot2docker stop", remove the .vmdk from VirtualBox Storage settings, run this command (mentioned in http://www.vleeuwen.net/2012/10/virtualbox-uuid-mismatch):
VBoxManage closemedium disk ~/VirtualBox\ VMs/boot2docker-vm/boot2docker-vm.vmdk
then reattach the disk and "boot2docker start".
Just leaving a reply for future (unlucky) people.
I couldn't find a solution and even on the VirtualBox forum anybody could help me. I reinstalled the machine.
Related
I have tried two methods to upload openwrt x86_64 image to AWS AMI and run on EC2, but both failed.
The image I built runs ok on VirutalBox and vmware.
The first method - vm_import/export.
I followed instruction on https://amazonaws-china.com/cn/ec2/vm-import/, vm_import tool failed and said "Not found initrd in Grub" at last.
Openwrt doesn't use initrd at boot stage. This is the default boot entry of grub.cfg
menuentry "OpenWrt" {
linux /boot/vmlinuz root=PARTUUID=fbdad417-02 rootfstype=ext4 rootwait console=tty0 console=ttyS0,115200n8 noinitrd
}
The second method - ec2-bundle-image/ec2-upgrade-image
I tried this way, and it can upload image files and metadata files to S3, and I could make a new AMI, and launch EC2 instance. But EC2 instance was not be booted correctly it stop at the grubdom>.
I followed the instruction of https://forum.archive.openwrt.org/viewtopic.php?id=41588, it seems a little old, I didn't found the aki instance it mentioned and used a alternative one (aki-7077ab11 pv-grub-hd0_1.05-x86_64.gz).
Whatever the combined image(openwrt default built) or the custom image(release rootfs.tar.gz and copy kernel and grub config to it), both failed, here is EC2 instance system log:
Xen Minimal OS!
start_info: 0x10d4000(VA)
nr_pages: 0xe504a
shared_inf: 0xeeb28000(MA)
pt_base: 0x10d7000(VA)
nr_pt_frames: 0xd
mfn_list: 0x9ab000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x300
cmd_line: root=/dev/sda1 ro console=hvc0 4
stack: 0x96a100-0x98a100
MM: Init
_text: 0x0(VA)
_etext: 0x7b824(VA)
_erodata: 0x97000(VA)
_edata: 0x9cce0(VA)
stack start: 0x96a100(VA)
_end: 0x9aa700(VA)
start_pfn: 10e7
max_pfn: e504a
Mapping memory range 0x1400000 - 0xe504a000
setting 0x0-0x97000 readonly
skipped 0x1000
MM: Initialise page allocator for 1809000(1809000)-e504a000(e504a000)
MM: done
Demand map pfns at e504b000-20e504b000.
Heap resides at 20e504c000-40e504c000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0xe504b000.
Initialising scheduler
Thread "Idle": pointer: 0x20e504c050, stack: 0x1f10000
Thread "xenstore": pointer: 0x20e504c800, stack: 0x1f20000
xenbus initialised on irq 3 mfn 0xfeffc
Thread "shutdown": pointer: 0x20e504cfb0, stack: 0x1f30000
Dummy main: start_info=0x98a200
Thread "main": pointer: 0x20e504d760, stack: 0x1f40000
"main" "root=/dev/sda1" "ro" "console=hvc0" "4"
vbd 2049 is hd0
******************* BLKFRONT for device/vbd/2049 **********
backend at /local/domain/0/backend/vbd/27482/2049
2097152 sectors of 512 bytes
**************************
vbd 2064 is hd1
******************* BLKFRONT for device/vbd/2064 **********
backend at /local/domain/0/backend/vbd/27482/2064
8377344 sectors of 512 bytes
**************************
[H[J
GNU GRUB version 0.97 (3752232K lower / 0K upper memory)
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grubdom>
Any idea? thanks.
It is easy task which doesn't need any of the complicated setup.
I used Virtualbox, but any other virtualization can be used (e.g. VMware or Hyper-V)
By my experience, placing openwrt to AWS fails using any of import methods other than "importing snapshot"
download openwrt
https://downloads.openwrt.org/releases/19.07.5/targets/x86/64/
install openwrt on virtualbox and create ova
https://openwrt.org/docs/guide-user/virtualization/virtualbox-vm
2a) convert img to vdi
- example: VBoxManage convertfromraw --format VDI openwrt-x86-64-combined.img openwrt.vdi
2b) extend vdi to 1GB
- example: VBoxManage modifymedium openwrt.vdi --resize 1024
2c) boot openwrt
2d) change eth0 interface to dhcp
- example: vi /etc/config/network
2e) shutdown
2f) export VM to ova'
rename .ova to .zip
unzip .zip
by unzipping you get vmdk file of virtual disk
upload vmdk to AWS S3 bucket
add vmimport role to your account
https://www.msp360.com/resources/blog/how-to-configure-vmimport-role/
import vmdk as snapshot
https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html
create new EC2 instance
replace EC2 instance volume with imported volume
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html
boot up
My VM in virtualbox can not start due to this error, I don't want to destroy it and reinstall it again, anyway to recover it ?
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "319fcce3-e8ff-4b6f-a641-3aee1df6543f", "--natpf1", "delete", "ssh"]
Stderr: VBoxManage: error: The machine 'centos64_c6402_1454036461345_59755' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp
Running this on the command line unlocked the VM:
vboxmanage startvm <vm-uuid> --type emergencystop
Where <vm-uuid> is the number in the error message: Command: ["modifyvm", "<vm-uuid>" [...]. After that I was able to control the VM (start, halt, etc).
Using Virtualbox 4.1 on Ubuntu.
Having the same issue I found that there was a process running actually locking the vm:
501 79419 79323 0 2:18PM ?? 0:39.75 /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless --comment default --startvm 1d438a2e-68d7-4ba2-bef9-4ea162913c1b --vrde config
Make sure you don't have a process stuck trying to start the vm:
ps -ef | grep -i "vbox"
I found this answer from #Gonzalez very interesting.
vboxmanage startvm <vm-uuid> --type emergencystop
The only problem with that it shut down the current instance of my VM, so instead of using modifyvm you can use controlvm if the current vm is running.
For example:
VBoxManage modifyvm <vm_name> --natpf1 "guestssh,tcp,,22,,2222"
VBoxManage modifyvm <vm_name> --natpf1 delete "guestssh"
Become:
VBoxManage controlvm <vm_name> natpf1 "guestssh,tcp,,22,,2222"
VBoxManage controlvm <vm_name> natpf1 delete "guestssh"
Full documentation Here
https://www.virtualbox.org/manual/ch08.html#vboxmanage-controlvm
For me I had to kill the VboxHeadless.exe process in task manager. I also had to ensure CMD prompt was opened in Administrative mode.
sudo pkill -9 VBox kills everything running related to vbox
In Windows Task Manager, I ended any tasks related to Virtual Box (you can see they start with a V in Task Manager like Vbox Headless.exe, etc). Once I did that, I was able to get this error to go away (the above 'vboxmanage startvm ...etc...' solutions here did not work for me).
If you have a settings window open for that box in the VirtualBox GUI, you may run into this error. Just close the settings window and try again.
I've encounter the same error message today:
>me#myhost:~$ ps -ef | grep -i "vbox"
me 3064 1 0 08:51 ? 00:00:00 /usr/lib/virtualbox/VBoxXPCOMIPCD
me 3089 1 0 08:51 ? 00:00:00 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
me 3126 3089 27 08:51 ? 00:00:39 /usr/lib/virtualbox/VBoxHeadless --comment RHEL5 64-bit desktop --startvm e5c598d8-1234-4003-a7c1-b9d8af15dfe7 --vrde config
me 3861 3415 0 08:53 pts/1 00:00:00 grep --color=auto -i vbox*
Gergely's answer solves it perfectly. It turned out that I've a crontab set at reboot to boot the virtual machine, which initiated the three VBox process shown above
me#myhost:~$ crontab -l
#reboot me /usr/bin/vboxmanage startvm "RHEL5 64-bit desktop" --type headless
The only option that worked for me was to kill all the processes matching ps axl|grep -i vbox.
In my case, the apparent cause was a USB ethernet adapter that had been removed after suspending the machine. In my case,
vboxmanage startvm <vm-uuid> --type emergencystop
did not help. Instead, I received the confusing message that
VBoxManage: error: The machine 'xyzzy' is not locked by a session
The true error was revealed by running
vboxmanage startvm <vm-uuid> --type gui
which returned
VBoxManage: error: Nonexistent host networking interface, name 'en9: USBPlug' (VERR_INTERNAL_ERROR)
Changing the network configuration to a different network adapter solved the issue.
This is because You reallocated the memory set for Virtual Box
What you have to do to fix is: Restart The PC
I want to use Docker on a machine that has VT-x disabled (and cannot be enabled). Is this possible?
I'm using Boot2Docker on Windows 7 x64, there's no mention of requirements there, or in the Docker instructions either.
I get this output from Boot2Docker start:
Welcome to Git (version 1.9.0-preview20140217)
Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
initialising...
2014/06/20 08:43:04 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machinereadable
2014/06/20 08:43:05 Virtual machine boot2docker-vm already exists
starting...
2014/06/20 08:43:05 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machinereadable
2014/06/20 08:43:05 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm boot2docker-vm --type headless
Waiting for VM "boot2docker-vm" to power on...
VBoxManage.exe: error: VT-x is disabled in the BIOS. (VERR_VMX_MSR_VMXON_DISABLED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component Console, interface IConsole
2014/06/20 08:43:06 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machinereadable
2014/06/20 08:43:06 Failed to start machine "boot2docker-vm" (run again with -v for details)
connecting...
2014/06/20 08:43:06 Failed to get machine "boot2docker-vm": exit status 1
Is it possible, or is there a workaround with VirtualBox settings that can make it work?
You can fill a bug report on github: https://github.com/boot2docker/windows-installer. boot2docker should not require VT-x.
In the meantime, you can switch to any other os, like CoreOS (lightweight, docker already installed) or raw ubuntu then install docker.
You might as well want to take a look at Vagrant. CoreOS provides vagrantfiles and it is as easy as vagrant up to spawn a VM with docker enabled.
No it is not possible. I'm stuck with a similar situation with a Q8200 core 2 duo. Doesn't support VT-x which flat out means no 64 bit virtual machines. Doesn't matter which stack.
I'm trying to convert VMDK obtained from AWS to RAW but VBoxManage fails and throws back to "VERR_NOT_SUPPORTED" error!
Is there any solution?
Environment:
CentOS 6.5
VBoxManage 4.3.8r92456
[root#dhcp-xxx-xx-xx-xx Disks]# **VBoxManage clonehd downloadedImage.vmdk foo.img --format RAW**
VBoxManage: error: Could not get the storage format of the medium '/home/swapniku/Documents/Disks/downloadedImage.vmdk' (VERR_NOT_SUPPORTED)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
Found the root cause. VBoxManage fails to identify latest versions of VMDK. So I used qemu-img to convert VMDK to RAW. I hope this helps!
The command vagrant up is failing and I don't know why.
$ egrep -v '^ *(#|$)' Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise32"
end
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise32'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
The VM failed to remain in the "running" state while attempting to boot.
This is normally caused by a misconfiguration or host system incompatibilities.
Please open the VirtualBox GUI and attempt to boot the virtual machine
manually to get a more informative error message.
$ vagrant status
Current machine states:
default poweroff (virtualbox)
The VM is powered off. To restart the VM, simply run `vagrant up`
$ VBoxManage list runningvms
$
Here are the messages in the VirtualBox log file, VBoxSVC.log:
$ cat ~/.VirtualBox/VBoxSVC.log
VirtualBox XPCOM Server 4.2.16 r86992 linux.amd64 (Jul 4 2013 16:29:59) release log
00:00:00.000499 main Log opened 2013-08-13T18:40:45.907580000Z
00:00:00.000508 main OS Product: Linux
00:00:00.000509 main OS Release: 3.6.11-4.fc16.x86_64
00:00:00.000510 main OS Version: #1 SMP Tue Jan 8 20:57:42 UTC 2013
00:00:00.000537 main DMI Product Name: X8DA3
00:00:00.000547 main DMI Product Version: 1234567890
00:00:00.000647 main Host RAM: 24103MB total, 17127MB available
00:00:00.000654 main Executable: /usr/local/VirtualBox/VBoxSVC
00:00:00.000655 main Process ID: 9417
00:00:00.000656 main Package type: LINUX_64BITS_GENERIC
00:00:00.110125 nspr-2 Loading settings file "/opt/tomcat/.VirtualBox/VirtualBox.xml" with version "1.12-linux"
00:00:00.110817 nspr-2 Failed to retrive disk info: getDiskName(/dev/md126p1) --> md126p1
00:00:00.264367 nspr-2 VDInit finished
00:00:00.275173 nspr-2 Loading settings file "/opt/tomcat/VirtualBox VMs/vagrant_getting_started_default_1376419129/vagrant_getting_started_default_1376419129.vbox" with version "1.12-linux"
00:00:05.288923 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={29989373-b111-4654-8493-2e1176cba890} aComponent={Medium} aText={Medium '/opt/tomcat/VirtualBox VMs/vagrant_getting_started_default_1376419129/box-disk1.vmdk' cannot be closed because it is still attached to 1 virtual machines}, preserve=false
00:00:05.290229 Watcher ERROR [COM]: aRC=E_ACCESSDENIED (0x80070005) aIID={3b2f08eb-b810-4715-bee0-bb06b9880ad2} aComponent={VirtualBox} aText={The object is not ready}, preserve=false
$
Any advice would be greatly appreciated.
Had the same error on OSX. Restarting VirtualBox fixed it :S
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
Also see: https://forums.virtualbox.org/viewtopic.php?t=5489
I solved the problem by re-installing VirtualBox and adding myself to the vboxusers group. The re-installation process printed a message indicating that VM users had to be a member of that group. I don't know if the re-installation was necessary or if being added to the group would have sufficed.
The host machine was 32bits (Ubuntu) and the guest was 64bit, I changed the guest to 32 and it solved the problem.
My understanding is that vboxusers group is related to accessing USB devices within the guest. Not sure why it is causing the issue. Normally, as a vagrant base box build guideline, audio and USB are both disabled.
As per the VirtualBox Manual => The vboxusers group
The Linux installers create the system user group vboxusers during installation. Any system user who is going to use USB devices from VirtualBox guests must be a member of that group. A user can be made a member of the group vboxusers through the GUI user/group management or at the command line with sudo usermod -a -G vboxusers username
Note that adding an active user to that group will require that user to log out and back in again. This should be done manually after successful installation of the package.
I had the same problem. It is because I did a wrong configuration on my Vagrantfile in the provider section. I had tried to make my VM machine more powerfull, with 2 cpus when i have on the machine host just one.
this often happens when you try to add more hardware to your VM machine but your host machine does not have the minimun requirements