Showing posts with label VirtualBox. Show all posts
Showing posts with label VirtualBox. Show all posts

Monday, February 13, 2023

Import OVA which is created by VMWare to VirtualBox

Notes about the problem I had when trying to import OVA created by VMWare to VirtualBox...

My environment: 
  • Windows 10 pro + VirtualBox v7.0 
    • VirtualBox downgraded to 6.1.26 due to this issue with Wayland
      • Still not fixed with Wayland on old linux guest machine (kernel 2.x)
Failed to import OVA file, error when trying import OVA file (exported by VMWare) to VirtualBox:  
  • VBOX_E_INVALID_OBJECT_STATE (0x80bb0007)
OVA file is just a tar file, so extracted it using 7z, we can see these 3 files:
  • vm-disk1.vmdk: Virtual Disk file
  • vm.mf: checksum data
  • vm.ovf: OVF file, VM definition file
Use "qemu-img" to check "vm-disk1.vmdk" (need to install qemu tool to Windows ):
> qemu-img info vm-disk1.vmdk
image: vm-disk1.vmdk
file format: vmdk
virtual size: 22 GiB (23667847168 bytes)
disk size: 316 MiB
cluster_size: 65536
Format specific information:
    cid: 1377153543
    parent cid: 4294967295
    create type: streamOptimized
    extents:
        [0]:
            compressed: true
            virtual size: 23667847168
            filename: vm-disk1.vmdk
            cluster size: 65536
            format:
Probably  VirtualBox could not handle the "streamOptimized" type or compressed vmdk disk image format. 

Tried  use "qemu-img" to convert it to non-compressed disk image:
> qemu-img convert -f vmdk vm-disk1.vmdk -O vmdk vm-disk1-decompressed.vmdk
    
> qemu-img info vm-disk1-decompressed.vmdk
image: vm-disk1-decompressed.vmdk
file format: vmdk
virtual size: 22 GiB (23667847168 bytes)
disk size: 709 MiB
cluster_size: 65536
Format specific information:
    cid: 3421777080
    parent cid: 4294967295
    create type: monolithicSparse
    extents:
        [0]:
            virtual size: 23667847168
            filename: vm-disk1-decompressed.vmdk
            cluster size: 65536
            format:
Ok, now it is "monolithicSparse" and not-compressed disk image type.

Because we just created a new disk, old checksum in file "vm.mf" cannot be used so just delete this file before trying to import again

Replace the  original "vm-disk1.vmdk" with "vm-disk1-decompressed.vmdk"(or edit the "vm.ovf" to make it point to "vm-disk1-decompressed.vmdk", no need to correct the disk size information in this case)

Now try to import again "vm.ovf" and we should be able to import it to VirtualBox. After this step, we can modify the config of the imported VM (cpu numer, memory size, etc., just check the "vm.ovf" and try to set the same config)

After this step, we can run the imported virtual machine, but if you see the error No bootable medium found! System halted , you should enable the "Enable EFI" config:


Done.

Thursday, January 23, 2014

Ubuntu, Lubuntu 12.04 with VirtualBox

Proxy設定for apt-get:はapt.conf.dの中に設定ファイル(例えばここでは80proxy)を追加

% export http_proxy="http://x.x.x.x:8080"
% export ftp_proxy="..."
% export https_proxy="..."

% sudo vim /etc/apt/apt.conf.d/80proxy
Acqurire::http::proxy "http://x.x.x.x:8080";
Acqurire::https::proxy "http://x.x.x.x:8080";
Acqurire::ftp::proxy "http://x.x.x.x:8080";

これでProxyを通してupdateできる 上記はapt-get用のプロキシの設定で,システムのプロキシ設定は/etc/environmentファイルを編集して追加する.
/etc/environment

http_proxy=http:// myproxy.server.com:8080/ 
https_proxy=http:// myproxy.server.com:8080/
ftp_proxy=http:// myproxy.server.com:8080/
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"

VirtualBoxのネットワーク設定
(http://nwing.knowd.co.jp/yamazaki/index.php?q=node/169) このページはとてもわかりやすい
VirtualBoxの3Dアクセラレーションを有効にする方法