cot icon indicating copy to clipboard operation
cot copied to clipboard

Support editing (or removing) auxiliary devices from ovf

Open evanjs opened this issue 4 years ago • 1 comments

Recently, I encountered this issue when trying to import an OVA made with VirtualBox into VMWare/ESXi.

I was able to execute the first part of the solution using: cot edit-hardware nixos-20.09pre-git-x86_64-linux.ova -v vmx-14 -o nixos.ova.

However, it doesn't seem like there are any options to edit hardware devices outside CPU, network devices, memory, etc.

Editing aside, perhaps we could start by allowing users to remove devices in order to help resolve some compatibility issues like the one mentioned above.

In this case, for example, I believe all I would need to do is remove all devices with a DeviceType of 35.

evanjs avatar May 29 '20 14:05 evanjs

I'm not opposed to adding new subcommands to create/edit/delete generic hardware Item elements - the existing cot edit-hardware command is complex enough that I wouldn't want to add this functionality to that command. Something like:

cot add-hardware-item PACKAGE [-o output] [-i instanceid] [-t type] [-s subtype] [-q quantity] [-n name] ... cot remove-hardware-item PACKAGE [-o output] [-i instanceid] [-t type] ...

It may be a while until I can get to this enhancement, but a pull request would be very welcome if you want to make an attempt at it yourself.

glennmatthews avatar Jul 06 '20 15:07 glennmatthews