Xen image to VirtualBox - Could not read from the boot medium - virtualbox

I have a problem with moving xen img to virtual box. After executing the below command, I made the newly created vdi file Primary Master of my virtual machine.
VBoxManage convertdd disk.img vb.vdi
But it kept complaining about the error in the title. Same thing happened with the command below:
VBoxManage convertfromraw disk.img vb.vdi
How can I solve this issue?
Any help is appreciated. Thanks in advance.

XEN doesn't use a "real" boot sector, so there is none for you to boot from in VirtualBox.
You need to boot a live linux on your VB and try to fix your bootsector yourself. This hugely depends on your used distribution, but it can be done and should be very straight forward.

Related

Convert openVZ container to VMware

I'm trying to convert an openVZ container to VMware.
Since this is planned for roughly 1000 instances, I'm looking for a different approach than reinstalling from scratch.
I followed the steps in the last post:
https://communities.vmware.com/message/1719787#1719787
However, when booting from a live CD, it can't find any linux partition.
I also tried yum install kernel-xx which had no effect on the live CD not finding a partition so I'm assuming there's an error while converting.
Does anyone know of a solution or some tweaks to the one I posted?
The OS in this case is CentOS 7 on openVZ 6.
Long story short: Convert openVZ to KVM, then convert to VMWare.
create a KVM with the same OS as your container
mount the KVM image file
rsync all data to that image file
umount image file and start and stop KVM
convert img to vmdk with qemu-img
move vmdk file to esxi host
convert to thin-provisioned vmdk with vmkfstools
I had to tackle (and still am) multiple issues to make it boot, like recrating initrams, reinstalling policykit, reconfiguring networking, adjusting grub.
Hope this helps someone.
It looks like you will have to go the OpenVZ -> KVM -> VMware route. This post by Roman Pertl explains how he did it, plus it also links to some other tutorials.
rsync --exclude=/var/lib/initramfs-tools/* --exclude=/var/lock --exclude=/etc/fstab --exclude=/etc/modules --exclude=/etc/mtab --exclude=/boot/* --exclude=/proc/* --exclude=/lib/modules/* --exclude=/tmp/* --exclude=/dev/* --exclude=/sys/* -e ssh --delete-after --numeric-ids -avpogtStlHz / root#sourcevm:22/

VirtualBox error "Failed to open a session for the virtual machine"

I have a virtual machine with Windows XP with a clean installation. I set it as immutable to create a differential machine, so I create a new virtual machine, select the immutable hard disk and create a new snapshot in the new virtual machine folder.
However, when I try to start the virtual machine I get this error:
"failed to open a session for the virtual machine".
Código Resultado:
VBOX_E_INVALID_OBJECT_STATE (0x80BB0007)
Componente:
ProgressProxy
Interfaz:
IProgress {c20238e4-3221-4d3f-8891-81ce92d9f913}
What is the problem? until now I can use differential virtual machines without problems. I have installed the last version or VirtualBox v4.3.4 and the problem persists.
If I set the hard driver as normal and I create a new virtual machine and select this hard drive I don't have any problem.
EDIT: I use the same virtual disk and do the same steps in another computer and it works fine. I think that the problem is the VirtualBox of my computer with the problem, but I try to uninstall the program and reinstall it and the problem persists, so I don't know how to solve the problem.
EDIT 2: if I set the virtual harddrive as multiattached instead of immutable, then it works fine. In my case is enough, but I know that it would be work as immutable because it was work until now and it works in another computer.
I try to create a new user in windows to try if the problem if with the configuration of my account, but the problem persists. So I think that some general configuration of VirtualBox has been corrupted and I am not be able to repair it.
I would like to know if there is any solution to use a immutable hard drive, because I would like to solve the problem with VirtualBox, although by the moment the multiattached hard disk is enough.
I had the same issue, I tried editing the VM but it wasn't letting me save it. So I tried the following:
Tried editing the VM to change RAM/CPU etc, but it wasn't letting me save it
Deleted the vm (not the data) and tried adding it again, didn't fix it
Tried moving the vbox file to another directory and import it, but it didn't let me move the vbox file so I realized there's a virtualbox process running that's holding a lock on it. So I killed that process and started it again and my VM booted
Killing VM process dint work in my case.
Right click on the VM and click on "Discard Saved State".
This worked for me.
For windows users
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I had the same issue, and this trick works for me
Goto control panel
Open Uninstall program
Click on turn windows features on or off
Scroll down and find the hyper-V folder.
Uncheck the Hyper-V.
Apply changes and restart your system.
Now here you go... Open your virtual box and start the os you want.
Hope this helps..
Updating VirtualBox to newest version fixed my issue.
If you are in Windows and the error message shows VT-x is not available make sure Hyper-V is disabled in Windows components.
maybe it is caused by privilege, please try this:
#sudo chmod 755 /Applications
#sudo chmod 755 /Applications/Virtualbox.app
Something that I tried and work for me is simply you create a new virtual machine and you use the existing virtual hard disk file and everything is like you left it.
On Ubuntu, this can also be caused by incorrect permissions. I chmod 755 Logs/ which fixed the issue.
In my case I gave administrator privilege to Virtualbox and it solved my problem.
i.e., run run as administrator on windows 10
In may case, "VM VirtualBox Extension Pack" was broken. So I uninstalled it and reinstalled it.
For MAC users
After some research, this worked for me:
Quit VirtualBox
Right click "Applications" folder
Click on "Get Info"
Change "Everyone" Permission to "Read Only"
Open VirtualBox, and now it should work.
Normally this error occurs when it try to load the previous state. This happened in Mac Virtual box.
I tried after restarting the virtual box but again also i've encountered this issue.
Right Click on the operating system in the virtual box and then Click on the Discard Saved State.. .This fixed the issue.
try this
sudo update-secureboot-policy --enroll-key
and restart your system, when restart it shows option and select Mok key and you will work fine.
The only thing that solved the issue for me is to unmount the second hard disk on my laptop.
My current setup contains 1 HDD on SATA0 port and 1 SSD on SATA1 port. I've the OS and Oracle VirtualBox installed on the SSD drive.
When I deleted the partition on the HDD, the issue was solved.
This solved my problem:
open a cmd with admin privilige
bcdedit /set hypervisorlaunchtype off
reboot
Error gone and VMs are working again.
This worked for me:
In the Oracle VM Manager - right click on your virtual maching (for example kali linux).
In the menu choose "discard saved state".
Then press discard and restart your virtual machine.
Ubuntu based system, solution that worked for me...
Delete virtualbox and download the latest deb package from the virtualbox website.

Vagrant reset my VM and now I am frightened I lost my work

I have a horrible situation and I hope you can help.
This morning, the terminal opened in my VM hanged, I tried to access Virtualbox and it went unresponsive. I killed Virtualbox manually and typed vagrant up. Vagrant (vagrant ssh) booted on a VM that pretty much seems the default one and I am terrified that all my work has been lost.
Typing vmboxmanage list vms shows:
wasp_1375609265" {29663113-786b-4b8a-adc8-2edecf06bcff}
which is the same UUID I find on the .vagrant file.
I am on a Mac OSX Montain Lion, the version of vagrant I am using is 1.0.6 and Virtualbox is 4.2.16.
Is there any way I can access the image at the previous state it had before I manually killed it? I can't believe that vagrant or Virtualbox purposely overwrote the image with a default one
It turned out that I am an idiot and the image was not lost. For some reasons Virtualbox saved it with a cryptic name and vagrant reverted to the default vagrant box wasp_32... when I run it again. I found the image I was looking for simply running all the *.vmdk I found under ~/VirtualBox VMs.
After that I followed the instructions I found here to make vagrant booting the correct image

Looking for Virtual PC or VMware Guest O/S with Linux already installed

I wanted to play around with Linux and do some testing. I've tried installing Linux on a Virtual PC (2004) guest but couldn't get it to work.
I figured with all the folks out there proselytizing about Linux maybe someone had made an guess file that I could just download and open up in Virtual PC (ideally) or VmWare.
PS - I asked question on ExpertsExchange about 2 years ago and all I got was people telling me I should use VMware (but not suggestions of where to find a pre-made Guest record.)
The VMWare library of pre-installed guests is at http://www.vmware.com/appliances/ - it seems to be currently down for maintenance though.
VMware player: http://www.vmware.com/products/player/
Vmware images: http://www.vmware.com/appliances/
The appliances website was down for me, but you can download premade images of various operating systems and run them using the vmware player or vmware server.
Ubuntu 8.04: http://www.vmware.com/appliances/directory/1224
Also, just look at the popular section on the right-hand side. I have found that when you want to use Linux, vmware is the way to go. I have had issues trying to install it on virtual pc, but that might have changed since I tried it back in 2006 with Fedora.
The VMWare appliance site is down as I write this but there is a very useful appliance that is about 60K that allows you to mount an ISO as a VM.
This is great because you don't have to install the distribution in a VM. You can load up the ISO into the VM every time as new or simply reload a suspended image.
When you feel comfortable - try installing the version of Linux in the VM.
You could also simply burn an ISO to a CD/DVD and boot it up to play with it - no install required.
You should also take a look at Sun's VirtualBox VM manager. Its free and pretty good.
Try http://elasticserver.com/
They have a a la carte approach for linux VM's.
Virtual Hosted Linux is a pain. If you MUST do this, then use Sun's VirtualBox - it starts up faster and really is easier to use than anything else .. You can get Ready To Use VDI images from VirtualBoxImages too... But, if you just wanna 'play around' with linux, then why not boot up a LiveCD ..

Unable to determine guest operating system: Vmware error

Ok, here's a very short and to the point question. When trying to import a virtual PC 2004 Windows 2003 Server VM in VM Workstation 6.0.2 I'm getting an error 'unable to determine guest operating system'. Soo how to fix?
From here:
Make sure that that the VM is not currently running in VMware Server.
Make sure that VMware Server does not have a lock on the VM’s files. You have have to stop all VMware Server Services and/or reboot the (VMWare) server.
Make sure you have appropriate permissions to the VM’s files.
This is a fairly generic error from VMware Converter so I would try the following:
Step 1. Make sure you are running the latest version of VMware Converter. Updates seem to come pretty often for this tool.
Step 2. Check the VMware Converter log file. More often than not you will find the source of your problem here.