Am running my Opennebula instance on a server I own. I has pulled a lot of marketplace image templates, and the vms deploy very fast for these images. But when I try to create my own template, with a custom kali qcow2 image of 30 GiB. It is too slow, it takes about 4 minutes for a machine to spawn. And takes quite a lot of time (>30 minutes) for multiple users(30-40) to instantiate a non-persistent VM at the same time. I’m using a NAS storage for storing the data. If the marketplace image templates spawn so quick, why dont my template faster enough? Can someone help me out?
Hi @samuel1
Could you share the Image template? I think the output of the oneimage show -x <image_id>
command would be great.
And if you can show us the logs of a VM deployed with that image it would be awesome too , so we can see the time consumed by the VM to be deployed (You can find this log file inside the
/var/log/one/<vm_id>.log
folder.
Best,
Victor
oneimage show -x 248
<IMAGE>
<ID>248</ID>
<UID>0</UID>
<GID>1</GID>
<UNAME>oneadmin</UNAME>
<GNAME>users</GNAME>
<NAME>Kali Linux - offsec</NAME>
<PERMISSIONS>
<OWNER_U>1</OWNER_U>
<OWNER_M>1</OWNER_M>
<OWNER_A>0</OWNER_A>
<GROUP_U>1</GROUP_U>
<GROUP_M>0</GROUP_M>
<GROUP_A>0</GROUP_A>
<OTHER_U>0</OTHER_U>
<OTHER_M>0</OTHER_M>
<OTHER_A>0</OTHER_A>
</PERMISSIONS>
<TYPE>0</TYPE>
<DISK_TYPE>0</DISK_TYPE>
<PERSISTENT>0</PERSISTENT>
<REGTIME>1704985215</REGTIME>
<SOURCE><![CDATA[/data/LAB/datastores/1/778d2e10378cf46f0eeb167786da619d]]></SOURCE>
<PATH><![CDATA[/data/LAB/datastores/1/96b9f37122d29c30fd0dcafc3eb7e5c8]]></PATH>
<FORMAT><![CDATA[qcow2]]></FORMAT>
<FS><![CDATA[]]></FS>
<SIZE>25600</SIZE>
<STATE>2</STATE>
<PREV_STATE>2</PREV_STATE>
<RUNNING_VMS>36</RUNNING_VMS>
<CLONING_OPS>0</CLONING_OPS>
<CLONING_ID>-1</CLONING_ID>
<TARGET_SNAPSHOT>-1</TARGET_SNAPSHOT>
<DATASTORE_ID>1</DATASTORE_ID>
<DATASTORE>default</DATASTORE>
<VMS>
<ID>455</ID>
<ID>513</ID>
<ID>538</ID>
<ID>539</ID>
<ID>540</ID>
<ID>541</ID>
<ID>542</ID>
<ID>543</ID>
<ID>544</ID>
<ID>545</ID>
<ID>546</ID>
<ID>547</ID>
<ID>548</ID>
<ID>549</ID>
<ID>550</ID>
<ID>551</ID>
<ID>552</ID>
<ID>553</ID>
<ID>554</ID>
<ID>555</ID>
<ID>557</ID>
<ID>558</ID>
<ID>559</ID>
<ID>560</ID>
<ID>561</ID>
<ID>562</ID>
<ID>563</ID>
<ID>564</ID>
<ID>565</ID>
<ID>566</ID>
<ID>567</ID>
<ID>568</ID>
<ID>569</ID>
<ID>572</ID>
<ID>584</ID>
<ID>586</ID>
</VMS>
<CLONES/>
<APP_CLONES/>
<TEMPLATE>
<DEV_PREFIX><![CDATA[sd]]></DEV_PREFIX>
<LABELS><![CDATA[Now]]></LABELS>
</TEMPLATE>
<SNAPSHOTS/>
<BACKUP_INCREMENTS/>
</IMAGE>
Logs of the VM:
Sun Apr 14 21:08:00 2024 [Z0][VM][I]: New state is ACTIVE
Sun Apr 14 21:08:00 2024 [Z0][VM][I]: New LCM state is PROLOG
Sun Apr 14 21:15:11 2024 [Z0][VM][I]: New LCM state is BOOT
Sun Apr 14 21:15:11 2024 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/595/deployment.0
Sun Apr 14 21:15:11 2024 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Sun Apr 14 21:15:12 2024 [Z0][VMM][I]: ExitCode: 0
Sun Apr 14 21:15:12 2024 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Sun Apr 14 21:15:12 2024 [Z0][VMM][I]: ExitCode: 0
Sun Apr 14 21:15:12 2024 [Z0][VMM][I]: Successfully execute virtualization driver operation: /bin/mkdir -p.
Sun Apr 14 21:15:12 2024 [Z0][VMM][I]: ExitCode: 0
Sun Apr 14 21:15:12 2024 [Z0][VMM][I]: Successfully execute virtualization driver operation: /bin/cat - >/data/CLAB/datastores/0/595/vm.xml.
Sun Apr 14 21:15:12 2024 [Z0][VMM][I]: ExitCode: 0
Sun Apr 14 21:15:12 2024 [Z0][VMM][I]: Successfully execute virtualization driver operation: /bin/cat - >/data/CLAB/datastores/0/595/ds.xml.
Sun Apr 14 21:15:13 2024 [Z0][VMM][I]: ExitCode: 0
Sun Apr 14 21:15:13 2024 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy.
Sun Apr 14 21:15:13 2024 [Z0][VMM][I]: ExitCode: 0
Sun Apr 14 21:15:13 2024 [Z0][VMM][I]: Successfully execute network driver operation: post.
Sun Apr 14 21:15:13 2024 [Z0][VM][I]: New LCM state is RUNNING