Page 1 of 2

export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 24. Jul 2016, 09:55
by BrnVrn
Maybe it is an OVF limitation, but if I export a VM and then import it to another name:

Code: Select all

vboxmanage export vb-fedora-24-np -o export-2b.ovf --ovf20
vboxmanage import export-2b.ovf  --vsys 0 --vmname vb-fedora-24-np_2b
diff ~/VirtualBoxVM/vb-fedora-24-np/vb-fedora-24-np.vbox ~/VirtualBoxVM/vb-fedora-24-np_2b/vb-fedora-24-np_2b.vbox
it disconnects the cables and re-enable Remote display (i remove expected diff: uuid, path ...):
< <RemoteDisplay>
> <RemoteDisplay enabled="true">
< <Adapter slot="0" enabled="true" MACAddress="08002775709D" promiscuousModePolicy="AllowAll" type="virtio">
> <Adapter slot="0" enabled="true" MACAddress="0800270AF932" cable="false" promiscuousModePolicy="AllowAll" type="virtio">
< <Adapter slot="1" enabled="true" MACAddress="080027867BF6" promiscuousModePolicy="AllowAll" type="virtio">
> <Adapter slot="1" enabled="true" MACAddress="080027FB9690" cable="false" promiscuousModePolicy="AllowAll" type="virtio">
Same with or without the option --ovf20

Ideas? I can live with RemoteDisplay (and the Audio), but the cable=false is annoying.
Could there be some default option ???
  • VirtualBox 5.1.2
    Linux 4.6.4 Fedora 23 x86_64
Import log:

Code: Select all

Interpreting /home/bruno/dev/virtua/VM-images-packer/tmp/export-2b.ovf...
OK.
Disks:
  vmdisk1	31457280000	-1	CannotPostURL_streamOptimized	export-2b-disk1.vmdk	-1	-1	

Virtual system 0:
 0: Suggested OS type: "Fedora_64"
    (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
 1: VM name specified with --vmname: "vb-fedora-24-np_2b"
 2: Number of CPUs: 1
    (change with "--vsys 0 --cpus <n>")
 3: Guest memory: 1024 MB
    (change with "--vsys 0 --memory <MB>")
 4: Sound card (appliance expects "", can change on import)
    (disable with "--vsys 0 --unit 4 --ignore")
 5: Network adapter: orig NAT, config 6, extra slot=0;type=NAT
 6: Network adapter: orig HostOnly, config 6, extra slot=1;type=HostOnly
 7: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 7 --ignore")
 8: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 8 --ignore")
 9: Hard disk image: source image=export-2b-disk1.vmdk, target path=/home/bruno/VirtualBoxVM/vb-fedora-24-np_1/export-2b-disk1.vmdk, controller=7;channel=0
    (change target path with "--vsys 0 --unit 9 --disk path";
    disable with "--vsys 0 --unit 9 --ignore")
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully imported the appliance.

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 26. Jul 2016, 09:10
by butterblume
We have exactly the same issue. This appeared with Virtalbox 5.1. Currently 5.1 is unusable for us.

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 26. Jul 2016, 09:26
by butterblume
butterblume wrote:We have exactly the same issue.
... regarding 1the network part.

With 5.0 (good):

Code: Select all

[...]
<Network>
 <Adapter slot="0" enabled="true" MACAddress="080027E9CE00" cable="true" speed="0" type="82540EM">
 <DisabledModes/>
 <NAT>
 <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
 <Alias logging="false" proxy-only="false" use-same-ports="false"/>
 </NAT>
 </Adapter>
[...]
With 5.1 (bad)

Code: Select all

<Adapter slot="0" enabled="true" MACAddress="080027A19325" type="82540EM">
 <NAT/>
</Adapter>

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 26. Jul 2016, 10:48
by klaus
(Oops, noticed that you provided the version info, so I edited the post.) It would be useful if you could provide the full OVF file, because it contains relevant information. Feel free to censor names and other things you don't want to be publicly visible, as long as the OVF file can still be used.

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 26. Jul 2016, 13:40
by BrnVrn
OK, here is the complete round trip:

Code: Select all

vboxmanage export vb-fedora-24 -o vb-fed-24.ovf --ovf20
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully exported 1 machine(s).

$ vboxmanage import vb-fed-24.ovf  --vsys 0 --vmname vb-fedora-24-import 
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/bruno/dev/virtua/VM-images-packer/test/vb-fed-24.ovf...
OK.
Disks:
  vmdisk1	31457280000	-1	http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized	vb-fed-24-disk1.vmdk	-1	-1	

Virtual system 0:
 0: Suggested OS type: "Fedora_64"
    (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
 1: VM name specified with --vmname: "vb-fedora-24-import"
 2: Number of CPUs: 1
    (change with "--vsys 0 --cpus <n>")
 3: Guest memory: 512 MB
    (change with "--vsys 0 --memory <MB>")
 4: Sound card (appliance expects "", can change on import)
    (disable with "--vsys 0 --unit 4 --ignore")
 5: Network adapter: orig NAT, config 6, extra slot=0;type=NAT
 6: Network adapter: orig HostOnly, config 6, extra slot=1;type=HostOnly
 7: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 7 --ignore")
 8: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 8 --ignore")
 9: Hard disk image: source image=vb-fed-24-disk1.vmdk, target path=/home/bruno/VirtualBoxVM/vb-fedora-24_1/vb-fed-24-disk1.vmdk, controller=7;channel=0
    (change target path with "--vsys 0 --unit 9 --disk path";
    disable with "--vsys 0 --unit 9 --ignore")
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully imported the appliance.
The initial machine has: Cables connected, no Audio and no RemoteDisplay
(only the Network is important)

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 1. Aug 2016, 23:23
by aoepuk
Any update on this issue?

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 2. Aug 2016, 10:09
by butterblume
klaus wrote:(Oops, noticed that you provided the version info, so I edited the post.) It would be useful if you could provide the full OVF file, because it contains relevant information. Feel free to censor names and other things you don't want to be publicly visible, as long as the OVF file can still be used.
Do you need more information? I could provide our OVFs. We use Packer to built Vagrantboxes with Virtualbox and suffer from this issue too.

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 2. Aug 2016, 10:17
by klaus
This is fixed in the latest Test builds. Please confirm.

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 2. Aug 2016, 10:30
by klaus
oops, didn't really mean to be so tight-lipped... the bug was purely on the import side, which means there's nothing wrong with the created OVF/OVA files. It also happened only for VM configs which for some reason used 5.1 level settings (which only happens if you actually touched some new features), which isn't unconditional. Most VMs out there are probably happily using 4.3 level settings and wouldn't be affected.

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 2. Aug 2016, 14:46
by BrnVrn
For me it is working!

I uninstalled Oracle VirtualBox-5.1 5.1.2 rpm. and installed the Test Build (and then added the extension pack)
VirtualBox-5.1.3-109190-Linux_amd64.run
I executed the same operation (export / import) and the resulting machine had everything expected:
  • - Cable connected
    - No Audio
    - No RemoteDisplay
I joined the files ovf and vbox.

Good work
Thanks

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 3. Aug 2016, 11:53
by butterblume
Sadly the version 5.1.3r109190 doesn't work for us. We use Packer to build Vagrant-boxes. We haven't touched the setup and it definitely works with 5.0. So no 5.1 features are touched/used. The cable is still "pulled". I attached the OVF file (as .txt) which was created by the Packer build. Packer uses the export function:

Code: Select all

==> virtualbox-iso: Exporting virtual machine...
    virtualbox-iso: Executing: export centos-7.1-x86_64 --output output-virtualbox-iso/centos-7.1-x86_64.ovf
[...]
Versions used:

Code: Select all

$ VBoxManage --version
5.1.3r109190
and the Extpack Oracle_VM_VirtualBox_Extension_Pack-5.1.3-109191.vbox-extpack.

Thanks for the help

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 3. Aug 2016, 13:47
by klaus
Which VirtualBox version are you using to import the appliance? That's what matters, since the issue is purely with interpreting the appliance. Your VM has x2APIC enabled (default for new Linux VMs), which forces the VM to use settings version 1.16. If you import a VM in VirtualBox 5.0 which has been exported with 5.1 there can be trouble if it uses features which aren't available in the old version, but if that's the case you're seeing it needs to be stated explicitly.

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 3. Aug 2016, 15:01
by butterblume
klaus wrote:Which VirtualBox version are you using to import the appliance? That's what matters, since the issue is purely with interpreting the appliance. Your VM has x2APIC enabled (default for new Linux VMs), which forces the VM to use settings version 1.16. If you import a VM in VirtualBox 5.0 which has been exported with 5.1 there can be trouble if it uses features which aren't available in the old version, but if that's the case you're seeing it needs to be stated explicitly.
OK, I think I get it.
At the above trial I used v 5.0. Now I imported the box with v 5.1.3r109190 then started it and it worked. Sry, was a bit slow here...
So, it looks at the moment that boxes build with 5.1.3??? can only be imported with the same version? That would force some people to upgrade.

Thanks

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 3. Aug 2016, 19:36
by klaus
Working on a solution so that 5.0.28 (and soon a 5.0.27 test build) can properly deal with VMs exported by 5.1. Which also is a kind of forced upgrade, but with less side effects.

Re: export / import: looses info: disconnect cable, re-enable Audio, RemoteDisplay

Posted: 4. Aug 2016, 09:15
by butterblume
klaus wrote:Working on a solution so that 5.0.28 (and soon a 5.0.27 test build) can properly deal with VMs exported by 5.1. Which also is a kind of forced upgrade, but with less side effects.
Great! Thanks a lot.