Bug 998279

Summary: [RFE] Import VirtualBox .VDI disk image file in Ovirt
Product: [oVirt] ovirt-engine Reporter: Moez Roy <moez.roy>
Component: RFEsAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED WONTFIX QA Contact: Raz Tamir <ratamir>
Severity: low Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, dfediuck, mbooth, mgoldboi, michal.skrivanek, moez.roy, nsoffer, rbalakri, rjones, scohen, srevivo, ykaul, ylavi
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: ylavi: ovirt-future?
ylavi: planning_ack?
ylavi: devel_ack?
ylavi: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-16 10:37:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Moez Roy 2013-08-18 21:07:51 UTC
Description of problem:

It is simple to attach disk image files such as:  Microsoft Virtual PC .VHD, VMware Workstation .VMDK, and VirtualBox .VDI files inside VirtualBox.

------------------------------------------
In VirtualBox click New then:
1. Choose Name and OS
2. RAM size
3. Use an existing virtual hard drive file
-------------------------------------------

How do I open VirtualBox .VDI disk image file in oVirt?

Comment 1 Itamar Heim 2013-08-20 09:44:57 UTC
rich - iiuc, these should first be converted by v2v?

Comment 2 Richard W.M. Jones 2013-08-20 09:52:31 UTC
It depends if the disk image files contain operating systems or
just data disks.

If operating systems, converting them in virt-v2v is essential.

For data disks, perhaps oVirt could provide an easier way to just
attach them to existing guests (performance wouldn't be great however).
For now you can run the following:
  qemu-img convert -O qcow2 data-disk.vdi data-disk.qcow2
Make sure you've got a very recent version of qemu-img, because older
versions are known to silently corrupt certain types of disk.

Comment 3 Moez Roy 2013-08-21 00:19:48 UTC
(In reply to Richard W.M. Jones from comment #2)
> It depends if the disk image files contain operating systems or
> just data disks.
> 
> If operating systems, converting them in virt-v2v is essential.
> 
> For data disks, perhaps oVirt could provide an easier way to just
> attach them to existing guests (performance wouldn't be great however).
> For now you can run the following:
>   qemu-img convert -O qcow2 data-disk.vdi data-disk.qcow2
> Make sure you've got a very recent version of qemu-img, because older
> versions are known to silently corrupt certain types of disk.

The default behaviour of VirtualBox is to use only 1 disk image for the OS (as well as the data).

http://libvirt.org/drvvbox.html says that VirtualBox is supported? 

So can open I the OS stored inside a .VDI disk image file using oVirt? 
(i.e. without converting using virt-v2v or qemu-img convert)

Comment 4 Richard W.M. Jones 2013-08-21 09:17:43 UTC
(In reply to quickbooks.office from comment #3)
> The default behaviour of VirtualBox is to use only 1 disk image for the OS
> (as well as the data).

You need to convert it using virt-v2v, *if* that is possible.  When
I originally read this bug report I thought it was about VMware.
I don't know if anyone has tried converting VirtualBox images or
if virt-v2v supports them.

Matt ^^ have you ever thought about converting VirtualBox images
with virt-v2v or guestconv?

> http://libvirt.org/drvvbox.html says that VirtualBox is supported? 

This link is for libvirt controlling a virtualbox hypervisor.  It's
got nothing to do with oVirt support for vdi disk images.

Comment 5 Richard W.M. Jones 2013-08-21 09:21:17 UTC
(In reply to Richard W.M. Jones from comment #4)
> (In reply to quickbooks.office from comment #3)
> > The default behaviour of VirtualBox is to use only 1 disk image for the OS
> > (as well as the data).
> 
> You need to convert it using virt-v2v, *if* that is possible.  When
> I originally read this bug report I thought it was about VMware.
> I don't know if anyone has tried converting VirtualBox images or
> if virt-v2v supports them.
> 
> Matt ^^ have you ever thought about converting VirtualBox images
> with virt-v2v or guestconv?

The answer to this is that virt-v2v can remove virtualbox
agents, but it's unlikely that anyone has tested whether
it really works with virtualbox images end to end.

Comment 6 Moez Roy 2013-12-07 05:08:35 UTC

(In reply to Richard W.M. Jones from comment #5)
> (In reply to Richard W.M. Jones from comment #4)
> > (In reply to quickbooks.office from comment #3)
> > > The default behaviour of VirtualBox is to use only 1 disk image for the OS
> > > (as well as the data).
> > 
> > You need to convert it using virt-v2v, *if* that is possible.  When
> > I originally read this bug report I thought it was about VMware.
> > I don't know if anyone has tried converting VirtualBox images or
> > if virt-v2v supports them.
> > 
> > Matt ^^ have you ever thought about converting VirtualBox images
> > with virt-v2v or guestconv?
> 
> The answer to this is that virt-v2v can remove virtualbox
> agents, but it's unlikely that anyone has tested whether
> it really works with virtualbox images end to end.

Why would you need to run virt-v2v when you can just uninstall the VirtualBox Guest Additions after you load up the OS?

For example when I wanted to a virtualize a physical PC with Windows on it, I ran this tool: Disk2vhd v1.64 http://technet.microsoft.com/en-ca/sysinternals/ee656415.aspx

Then I opened the resulting VHD image file inside VirtualBox and uninstalled the graphics driver (Intel/Nvidia) using Add/Remove programs.

After that I installed VirtualBox Guest Additions to get 3D acceleration / full screen resize etc.

Comment 7 Moez Roy 2013-12-11 15:29:19 UTC
(In reply to Richard W.M. Jones from comment #2)
> For data disks, perhaps oVirt could provide an easier way to just
> attach them to existing guests (performance wouldn't be great however).

Well, how do you just attach a disk image (like .vdi, .vmdk, or .vhd) to an existing right now? Screenshots appreciated :)

Comment 8 Itamar Heim 2014-01-12 08:43:18 UTC
setting target release to current version for consideration and review. please do not push non-RFE bugs to an undefined target release to make sure bugs are reviewed for relevancy, fix, closure, etc.

Comment 9 Moez Roy 2014-01-21 23:06:33 UTC
I am able to open ViurtualBox .VDI disk image (which contains the OS) via virt-manager.

See Bug 952908:

(Martin Kletzander from comment #6)
> The problem is that virt-manager doesn't detect the VDI format properly. 
> This can be seen from the log output where the machine is being generated
> with:
> 
> <driver name='qemu' type='raw'/>
> 
> You can workaround this with clicking "Customize configuration before
> install" and select "VDI" as a format of the disk image.  The support for
> probing VDI files is not yet implemented, though.

Comment 10 Michal Skrivanek 2014-02-14 14:25:31 UTC
IIUC this is about a non-system disk, just to be able to add/discover such a disk to a VM. I think you'd need to import it into the storage domain first. Moving to "storage" to consider

integration with v2v for whole VM import is a different matter

Comment 11 Allon Mureinik 2015-01-27 22:09:34 UTC
(In reply to Michal Skrivanek from comment #10)
> IIUC this is about a non-system disk, just to be able to add/discover such a
> disk to a VM. I think you'd need to import it into the storage domain first.
> Moving to "storage" to consider
> 
> integration with v2v for whole VM import is a different matter

Aren't we already integrating with v2v for 3.6.0?

Comment 12 Michal Skrivanek 2015-01-28 08:20:49 UTC
my understanding is this is not about virt-v2v, as per comment #9 we should be able to use the .vdi directly.

Comment 16 Doron Fediuck 2018-05-16 10:37:14 UTC
Closing old bugs.
If needed please reopen and explain why.