Skip to content

Commit 09c6299

Browse files
committed
M #-: Add docs for VMDK import using OneSwap
Signed-off-by: Alejandro Mosteiro <[email protected]>
1 parent 539d5fa commit 09c6299

File tree

4 files changed

+44
-10
lines changed

4 files changed

+44
-10
lines changed

source/marketplace/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ A Marketplace stores Marketplace Appliances. A MarketPlace Appliance includes on
2121
Private Marketplaces <private_marketplaces/index>
2222
Managing Marketplaces in Sunstone <sunstone_marketplaces/index>
2323
Appliances <appliances/index>
24-
OVA Management <ova_management/index>
24+
OVA / VMDK Management <ova_management/index>

source/marketplace/ova_management/import_ova.rst

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
.. _import_ova:
22

33
================
4-
OVA Import
4+
OVA / VMDK Import
55
================
66

77
Requirements
88
================================================================================
99

1010
The import tool will assume that the provided OVA has been exported from a VMware environment, user must make sure that the provided OVA is compatible with VMware environments. Other sources are currently not supported (i.e. Xen or VirtualBox).
1111

12-
When converting an OVA you will need enough space both in the ``/tmp`` folder and in the destination DS where the disk images are going to be imported.
12+
When converting an OVA or VMDK you will need enough space both in the ``/tmp`` folder (can be changed by ``--work-dir``) and in the destination DS where the disk images are going to be imported.
1313

1414
Windows VirtIO drivers
1515
--------------------------------------------------------------------------------
@@ -28,16 +28,25 @@ It is possible to specify the target Datastore and VNET for the OVA to be import
2828
+============================================+=======================================================================+
2929
| ``--ova file.ova | /path/to/ovf/files/`` | Path to the OVA file or folder containing the OVF files. |
3030
+--------------------------------------------+-----------------------------------------------------------------------+
31+
| ``--vmdk file.ova | /path/to/disk.vmdk`` | Path to the VMDK disk file. |
32+
+--------------------------------------------+-----------------------------------------------------------------------+
3133
| ``--datastore name | ID`` | Name/ID of the Datastore to store the new Image. Accepts one or more |
3234
| | Datastores (i.e. ``--datastore 101,102``). When more than one |
3335
| | Datastore is provided, each disk will be allocated in a different one.|
3436
+--------------------------------------------+-----------------------------------------------------------------------+
3537
| ``--network name | ID`` | Name/ID of the VNET to assign in the VM Template. Accepts one or more |
3638
| | VNETs (i.e. ``--network 0,1``). When more than one VNET is provided, |
3739
| | each interface from the OVA will be assigned to each VNET. |
40+
| | **Not supported for VMDK**. |
3841
+--------------------------------------------+-----------------------------------------------------------------------+
3942
| ``--virtio /path/to/virtio.iso`` | Path to the ISO file with the VirtIO drivers for the Windows version. |
4043
+--------------------------------------------+-----------------------------------------------------------------------+
44+
| ``--skip-context`` | Skips the injection of the context package. |
45+
+--------------------------------------------+-----------------------------------------------------------------------+
46+
| ``--remove_vmtools`` | Add contextualization script to force remove VMware tools from the VM.|
47+
+--------------------------------------------+-----------------------------------------------------------------------+
48+
49+
.. note:: The options ``--ova`` and ``--vmdk`` are mutually exclusive, they cannot be used together.
4150

4251
If multiple network interfaces are detected when importing an OVA and only one VNET ID or not enough VNET IDs are provided for all interfaces, using ``--network ID``, the last one will be used for the rest of the interfaces after the last coincidence. The same will apply to Datastores using the ``--datastore ID`` option.
4352

@@ -96,24 +105,49 @@ Example command on how to import an OVA with two disks and two network interface
96105
(...)
97106

98107
$ onetemplate list
99-
ID USER GROUP NAME REGTIME
108+
ID USER GROUP NAME REGTIME
100109
101 onepoc oneadmin ubuntu2404 04/10 12:55:03
101110

102111
The OS Image is imported in Datastore 1 and the Datablock Image is imported in Datastore 101, and the VM Template has one NIC using VNET 1 and a second NIC using VNET 0.
103112

104113
.. prompt:: text $ auto
105114

106115
$ oneimage list
107-
ID USER GROUP NAME DATASTORE SIZE TYPE PER STAT RVMS
108-
151 onepoc oneadmin ubuntu2404_1 NFS image 2G DB No rdy 0
109-
150 onepoc oneadmin ubuntu2404_0 default 8G OS No rdy 0
116+
ID USER GROUP NAME DATASTORE SIZE TYPE PER STAT RVMS
117+
151 onepoc oneadmin ubuntu2404_1 NFS image 2G DB No rdy 0
118+
150 onepoc oneadmin ubuntu2404_0 default 8G OS No rdy 0
110119

111120
$ onetemplate show 101 | grep NIC -A 1
112121
NIC=[
113122
NETWORK_ID="1" ]
114123
NIC=[
115124
NETWORK_ID="0" ]
116125

126+
Example on importing VMDK uninstalling VMware Tools
127+
--------------------------------------------------------------------------------
128+
129+
Example command on how to import a VMDK disk using the Datastore ID 101:
130+
131+
.. prompt:: text $ auto
132+
133+
[onepoc@nebulito ~]$ oneswap import --vmdk /home/onepoc/ovas/vm-debian125/vm-debian125-1.vmdk --datastore 101 --remove_vmtools
134+
Converting the Image => Converting disk /home/onepoc/ovas/vm-debian125/vm-debian125-1.vmdk to qcow2...
135+
(100.00/100%)
136+
Disk converted successfully in 58.15 seconds.
137+
Converted image: /tmp/vm-debian125-1/conversions/vm-debian125-1.qcow2
138+
139+
(...)
140+
141+
Allocating image 0 in OpenNebula
142+
Waiting for image to be ready. Timeout: 120 seconds.
143+
Created image: 174
144+
Deleting password files.
145+
No such file or directory @ apply2files - /tmp/vm-debian125-1/vpassfile
146+
147+
[onepoc@nebulito ~]$ oneimage list
148+
ID USER GROUP NAME DATASTORE SIZE TYPE PER STAT RVMS
149+
174 onepoc oneadmin vm-debian125-1_0 NFS image 5G OS No rdy 0
150+
117151
Context injection
118152
================================================================================
119153

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
.. _ova_management:
22

33
====================
4-
OVA Management
4+
OVA / VMDK Management
55
====================
66

77
.. toctree::
88
:maxdepth: 2
99

1010
Overview <overview>
11-
OVA Import <import_ova>
12-
11+
OVA / VMDK Import <import_ova>

source/marketplace/ova_management/overview.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ OpenNebula supports importing OVAs that have been exported from vCenter / ESXi e
88

99
It is possible to import `.ova` files or a folder containing the OVF files (VMDK disk files and manifest file in `.ovf` format). The import tool will inject context packages in the target Images, automatically detecting the guest operating system.
1010

11+
The same command allows the users to import single VMDK disks as OpenNebula Images, converting the VMDK to qcow2 format and then creating the associated Image. It is possible to inject context, install virtio drivers and uninstall VMware Tools.

0 commit comments

Comments
 (0)