Loosing information in VirtualBox export/import: cable connected, Remote dispay

115 views
Skip to first unread message

Bruno Vernay

unread,
Jul 23, 2016, 7:50:12 PM7/23/16
to Packer
I set information in post_manage, like 
"vboxmanage_post": [
["modifyvm", "{{.Name}}", "--vrde", "off"],
["modifyvm", "{{.Name}}", "--nic1", "nat"],
...
["modifyvm", "{{.Name}}", "--cableconnected2", "on"]


But they are lost in translation. I have to re-set them on the command line, after having imported the VM:

VBoxManage modifyvm $VM_NAME --vrde off
VBoxManage modifyvm $VM_NAME --nic1 nat
...
VBoxManage modifyvm $VM_NAME --cableconnected2 on



I attached the ovf as produced by Packer via VirtualBox export and the logs.
Below is the diff between the machine imported before and after the modifyVM commands (via the shell)

30c30
<       <RemoteDisplay enabled="true">
---
>       <RemoteDisplay>
40c40
<         <Adapter slot="0" enabled="true" MACAddress="08002775709D" cable="false" promiscuousModePolicy="AllowAll" type="virtio">
---
>         <Adapter slot="0" enabled="true" MACAddress="08002775709D" promiscuousModePolicy="AllowAll" type="virtio">
43c43
<         <Adapter slot="1" enabled="true" MACAddress="080027867BF6" cable="false" promiscuousModePolicy="AllowAll" type="virtio">
---
>         <Adapter slot="1" enabled="true" MACAddress="080027867BF6" promiscuousModePolicy="AllowAll" type="virtio">


Not sure if it is a VirtualBox or a Packer issue.  I will try to play with import/export to know more.
In the mean time maybe someone already had the issue ???   I did not find much on Google.

Using:
- Packer 0.10.1
- VirtualBox 5.1.2
- Fedora 23
2016-07-24_00h03_vb-fedora-24-np.ovf
2016-07-24_00h03_packer.txt

Alvaro Miranda Aguilera

unread,
Jul 23, 2016, 7:58:10 PM7/23/16
to packe...@googlegroups.com
Can you share a zip with packer template and scripts? I can run a build in a MAC to test

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/6cf3a5ef-deba-4d9e-82ac-32348af68653%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bruno Vernay

unread,
Jul 24, 2016, 4:53:36 AM7/24/16
to Packer
Thanks
Here it is.  You may want to edit kickstart/fed.cfg to use the "No local cache URLs"    The whole project is here https://github.com/BrunoVernay/VM-images-packer

I also posted on VirtualBox, since I reproduce the problem without Packer actually.  Just exporting and re-importing a machine seems to loose the info, or I may have something misconfigured somewhere ... https://forums.virtualbox.org/viewtopic.php?f=7&t=78840

But overall , they are my 2 issues: The cables are disconnected (that is why I ended up messing up with post_manage)  and I have to specify the KVM virtualization (should be by default on Linux no?)
I feel I am not too far, at least I setup the local squid cache for RPM which is good.
export.zip

Alvaro Miranda Aguilera

unread,
Jul 24, 2016, 6:49:02 PM7/24/16
to packe...@googlegroups.com
hello,

is any of the templates that I can just do packer build <template> ?


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.

Bruno Vernay

unread,
Jul 25, 2016, 7:26:40 AM7/25/16
to Packer
In the zip file there are the template and the kickstart (where you might want to comment 2 lines)
That is the bare minimum. 

Then there is the guest addition shell provisioner, but you could comment it out in the template, It is not required.
The shell script is just an helper.

Bruno Vernay

unread,
Jul 26, 2016, 3:21:39 AM7/26/16
to Packer
Seems to be confirmed: problem appeared with VirtualBox v5.1 : https://forums.virtualbox.org/viewtopic.php?f=7&t=78840

Søren Bjerregaard Vrist

unread,
Jul 26, 2016, 4:47:44 AM7/26/16
to Packer
I'm seeing the same thing for my VB v5.1 packer builds :(
Reply all
Reply to author
Forward
0 new messages