Comments (4)
Hi! When last I looked into the OVF files exported from VirtualBox, the XML that you're referencing above was encapsulated in the VirtualBox-specific vbox:Machine
section in the XML; I'm not sure if that's changed in newer VirtualBox versions, but in any case despite their use of the ovf
XML namespace, the above elements are not part of the OVF standard but are in fact VirtualBox-specific extensions.
I've tried to keep COT agnostic of the various vendor-specific extensions of the specification so far, but if you can specify the exact functionality that you'd like to have here for processing a VirtualBox-specific OVF, I'm willing to consider adding it - i.e., what information would you like to appear in cot info
? What would be the arguments and behavior you'd like to see for a new cot edit-vbox-port-forwarding
(?) command?
Thanks!
from cot.
That would be great! Or if you're uncomfortable with adding non-generic utilities to COT, maybe a plugin / addon or a separate python program that uses the cot API? I'm no expert when it comes to this, whatever you're most happy with.
You're right, I checked, both 1.0 and 2.0 exports have the forward inside the vbox:Machine
namespace. If you were to add the functionality, in info
I'd like to see the name, host port and guest port, type (TCP or UDP), and if they are specified, the IP bindings (guest and host). For the edit command, I'd like to be able to edit all of those fields, as well as add and delete. Essentially, a replication of the functionality in the GUI. This is only available when using the NAT type network.
Here's my attempt at syntax, though I'm in no way married to this exact format if you have any other suggestions:
$ cot help edit-vbox-port-forwarding
usage:
cot edit-vbox-port-forwarding --help
Edit VirtualBox Port Forwarding Rules
positional arguments:
PACKAGE OVF descriptor or OVA file to edit
general options:
-h, --help Show this help message and exit
-o OUTPUT, --output OUTPUT
Name/path of new OVF/OVA package to create instead of updating the existing OVF
-n 'Rule Name', --rule 'Rule Name'
Select which rule we will be modifying.
-d, --delete
Delete the specified rule. Ignores other args
-p (TCP/UDP), --protocol
Specify which protocol to forward
-gp (1...65300), --guest-port
Specify which port to expose from the guest
-gip (IP_ADDRESS), --guest-ip
Specify which IP to bind from the guest
-hp (1...65300), --host-port
Specify which port to expose on the host
-hip (IP_ADDRESS), --host-ip
Which IP to bind to on the host
--delete-all-rules
Delete all forwarding rules
from cot.
If it helps at all, here's what it looks like when exported as OVF v2, with the hostip and guestip set.
<Network>
<Adapter slot="0" enabled="true" MACAddress="<snip>" type="82540EM">
<DisabledModes>
<BridgedInterface name="<snip>"/>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<NAT>
<Forwarding name="Rule 1" proto="1" hostip="0.0.0.0" hostport="9080" guestip="1.1.1.1" guestport="9080"/>
</NAT>
</Adapter>
</Network>
from cot.
I ended up finding a way around this -- I ran a docker container with virtualbox, imported the file, used VBoxManage to tweak the vm, and exported it. Feel free to close this ticket if you're not interested in implementing this anymore, thank your for considering it in the first place!
from cot.
Related Issues (20)
- cot edit-hardware RuntimeError when adding NICs and creating a profile at the same time
- ESXi rejects streamOptimized VMDKs built with QEMU < 2.5.1
- 2.0.1 - in-place editing of TAR files fails HOT 2
- UnboundLocalError in vmdk.py when disk image conversion errors
- COT considers OVF with different CPU InstanceID across different profiles as invalid HOT 6
- COT support for creating placeholder disks
- COT shouldn't clone existing items to lower InstanceID
- Does COT support <ovf:VirtualSystemCollection></ovf:VirtualSystemCollection> HOT 1
- Unable to manage an OVF with multiple Product Section HOT 1
- [SSL: CERTIFICATE_VERIFY_FAILED] during "Fixing up serial ports" HOT 1
- any CONFIG_FILE format example ? HOT 2
- Distutils Error in version.py HOT 1
- LookupError on inspection of OVA file HOT 2
- os.statvfs not available in Windows HOT 1
- Support editing (or removing) auxiliary devices from ovf HOT 1
- OVA image created with cot 2.2.1 and Python 3.8.5 fails the ovftool validation HOT 3
- Enhancement Request - Please add support for Cisco Catalyst 8000v HOT 2
- Hello
- Way to set <ProductSection ovf:required="false">? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cot.