Virtual Box to KVM Virt Manager How :)

Hello Guys
I have Virtual Box running Win 11 as i need it for a few work-related things. I would like to know if there is a noobish guide on how move over the image from VBox to KVM. I take it Zorin supports KVM so just looking for a guide or andbody got a link to a YT video as most i have seen are very lets say not for a beginner :slight_smile:

For a good beginners video I recommend this video below.

Another site that I found and looks useful to make the conversion:

HI
I saw the latter Red Hat
But when i see stuff like this below it is not for a noob
You cannot use a .vdi virtual disk with QEMU and - it is recommended to have only one virtualization solution installed.
So you have to convert the .vdi disk to a .qcow2 disk. The first part should be done with VBoxManage, the second with
qemu-img. Afterwards uninstall VirtualBox and restart the system - then create new VM(s) with virt-manager or from
within the web console (Cockpit) and attach the existing .qcow2 virtual disks. And here are the commands to convert :

VBoxManage clonehd --format RAW <vdisk-name>.vdi <vdisk-name>.img
qemu-img convert -f raw <vdisk-name>.img -O qcow2 <vdisk-name>.qcow2

Not everything will be simple just like it isn't in Windows if you want to do something using two entirely different formats. But unlike many things in Windows, there is a way to convert which can't always be said for many things.

I agree, but it's likely the case the reason why there are no graphical interfaces for this is the fact that this isn't such a common thing to do.

While some things are easier through a point-and-click interface, some others are easier done through a terminal window. This is true even on Windows or MacOS as well.

Here's a step by step breakdown:

NOTE: You might want to make a backup copy before proceeding just in case to prevent any potential data loss.

  1. Navigate using the file explorer to the folder where the VirtualBox image is located. It's possible VirtualBox has a shortcut for it when you launch it.

  2. Right-click on the file explorer window, not the icon, same as you would if you wanted to create new file or folder, and select the "Open Terminal Here" option.

  3. In the terminal, enter the following commands, one at the time. Make sure to change <vdisk-name> with the name of the file in your computer.

NOTE: sometimes you need to use Ctrl+Shift+V instead of the regular Ctrl+V, to paste text in the terminal.

NOTE: I'm not sure why in the link to that Red Hat thread the vboxmanage utility is shown in uppercase. I don't know if there's a difference but if you get an error that it couldn't be found, try lowercase as well.

vboxmanage clonehd --format RAW <vdisk-name>.vdi <vdisk-name>.img
qemu-img convert -f raw <vdisk-name>.img -O qcow2 <vdisk-name>.qcow2

If using virt manager I would advise that you:

  1. create a folder called 'Storage' in your /home folder and point Virt Manager to save images there.

  2. copy the VBox image into 'Storage'.

When you run Virt Manager you will be asked for your /root password (I am using Devuan where I have created a separate /root user account to mine so I don't have raised privileges for security reasons).

Click on New Virtual Machine, then select Import existing image:

Back later as copying .vhd of 138 Gb going to take some time of Windows 7 Pro!

Job done! As soon as you click on finish it will launch the newly created image in Virt Manager!

I would advise that you need a machine with 8 Gb of Physical RAM and allocate half of that to the VM and 2 processors if you have a multiple processor like my Ryzen 7. The Desktop image quality is far better than Virtual Box but don't expect to use any VM software to play games on!

1 Like

HI Guys
I have tried the Red Hat of copying / converting the image to the correct format.
Everything looked went ok no errors i can even launch Virt Manager. But before removing VirtualBox the difference in the file conversion looks wrong, or is it? See here
Does this seem correct?
Also, what is the correct way to remove VirtualBox including all configuration files completely from Zorin

HI yes we did get error but i think we are near just concerned about file size if you see my last comment

I will never have a one drive account!

If the image is to big to post here get yourself a free imgbb account and post there.

To be honest i use Flameshot and it should upload to imgur but it fails 50% due to everybody using same id number i think. But flameshot only allows auto upload to imgur i think

Yes, that .im file should be .img.

HI my VM still fires up in it now on Win 11, but my query was about the difference in file size. If i have read wrong now i have the qcow2 file i delete the rest!

Having looked at my Windows VM before wiping the drive I'd say keep the additional folders as they may contain dependencies. To test this out, move the folders to a new location first before deleting. I would also backup your VM .vhd from Virtual Box as added backup. I should point out that whenever I used VB I always stuck to creating .vhd images and not .vdi.

Cannot get the qcow file to boot Win 11???

Trying to add this to Vert the qcow2 file converted
Vert Manager

In folders i have

I also still have this folder

OK, I can see what the issue is. When I create a .vhd file I actually install the OS to a Virtual drive, usually "vdaX" and allow it to grow automatically. When I run Zorin as a VM from the iso, in Virt Manager switch off and back again I have to delete the VM and start again. However, if I install to a Virtual Drive it will be there next time I boot. I was trying to do a Virtual Hard install of Zorin at the weekend to look at an accessibility issue raised in another thread when I got a warning my / was running out of space.

So what should I do?

I would try reinstalling Windows 11 as a .vhd in Virtual Box and install to a virtual hard drive, hence .vhd, not .vdi.
Then import to virt manager as shown on the screenshots I posted. You could try installing Windows 11 directly in Virt Manager but you might have more success creating an expandable virtual hard drive in VB then import the .vhd file into Virt Manager. The other possibility is that it might be a Windows 11 issue. The licence will inly allow you to run one copy of Windows whether it be to Hard drive or a VM. You are not permitted to have a hard install and a VM install at the same time. Afraid I can't help with Windows 11 or Windows 10 issues as I will never go near them. I like to keep my pc free from spyware! :wink:

Hi

Just followed your guide which was excellent.

My setup here

I got it running but i have an issue with the resolution and the RedHat display drivers.

My actual resolution can be seen here but this is not possible on the VM.

The screen is sluggish a little and has lots of small squares in it.

In virtual box it ran fine without any issues.

I guess it must be possible in KVM via Virt Manager.

The highest setting i can get in the VM is 2560 x 1600 at 175% plus unable to cover screen fully.

Running a Dell XPS 15

Is there any way to fix this?

Suspect because it's a notebook. I have desktop with dedicared graphics. Why did you need the Red Hat drivers? I never needed such drivers.

I followed the guide which indicated it was better. My laptop has a Nvidia GPU built into the mobo but no idea how to get it into KVM.
The screen is dreadful it keeps getting a full refresh line run down the screen when you do anything. Virtualbox was 10 times quicker than this. But i know it's a graphic issue just hope i can fix without having to do it again