# Can not instant VM

**URL:** <https://forum.opennebula.io/t/can-not-instant-vm/5630>\
**Category:** Product Support\
**Created:** [January 26, 2018, 12:35pm UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630 "2018-01-26T12:35:05Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![keiji](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@keiji](https://forum.opennebula.io/u/keiji)\
**Post date:** [January 26, 2018, 12:35pm UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/1 "2018-01-26T12:35:05Z")

</div>

Please, describe the problem here and provide additional information below (if applicable) …

We built the front end and the node according to this procedure.

[https://docs.opennebula.org/5.4/deployment/opennebula\_installation/frontend\_installation.html](https://docs.opennebula.org/5.4/deployment/opennebula_installation/frontend_installation.html)

then I downloaded the image from APPS.  
and launched it.

I think that the key exchange is in the correct state.

Please tell me how to do the right thing.  
Thank you

* * *

**Versions of the related components and OS (frontend, hypervisors, VMs):**  
Ceotos7  
opennebula5,4,6

**Steps to reproduce:**  
onetemplate instantiate centos7kvm

**Current results:**  
can not make VM

**Expected results:**  
VM will be running

Fri Jan 26 21:20:16 2018 [Z0][VM][I]: New state is ACTIVE  
Fri Jan 26 21:20:16 2018 [Z0][VM][I]: New LCM state is PROLOG  
Fri Jan 26 21:20:17 2018 [Z0][TM][I]: Command execution fail: /var/lib/one/remotes/tm/ssh/clone test5:/var/lib/one//datastores/1/a2cbe1fb1d14b320bd1da81db7bfdf57 test6:/var/lib/one//datastores/0/23/disk.0 23 1  
Fri Jan 26 21:20:17 2018 [Z0][TM][I]: clone: Cloning test5:/var/lib/one//datastores/1/a2cbe1fb1d14b320bd1da81db7bfdf57 in /var/lib/one/datastores/0/23/disk.0  
Fri Jan 26 21:20:17 2018 [Z0][TM][E]: clone: Command “scp -r test5:/var/lib/one//datastores/1/a2cbe1fb1d14b320bd1da81db7bfdf57 test6:/var/lib/one//datastores/0/23/disk.0” failed: Host key verification failed.  
Fri Jan 26 21:20:17 2018 [Z0][TM][E]: Error copying test5:/var/lib/one//datastores/1/a2cbe1fb1d14b320bd1da81db7bfdf57 to test6:/var/lib/one//datastores/0/23/disk.0  
Fri Jan 26 21:20:17 2018 [Z0][TM][I]: ExitCode: 1  
Fri Jan 26 21:20:17 2018 [Z0][TM][E]: Error executing image transfer script: Error copying test5:/var/lib/one//datastores/1/a2cbe1fb1d14b320bd1da81db7bfdf57 to test6:/var/lib/one//datastores/0/23/disk.0  
Fri Jan 26 21:20:17 2018 [Z0][VM][I]: New LCM state is PROLOG\_FAILURE

---

<div class="post-metadata">

**Author:** ![marcindulak](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@marcindulak](https://forum.opennebula.io/u/marcindulak)\
**Post date:** [January 27, 2018, 4:26pm UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/2 "2018-01-27T16:26:50Z")

</div>

This post contains the steps used to debug ssh connection problems [https://forum.opennebula.io/t/error-executing-image-transfer-script-error-copying](https://forum.opennebula.io/t/error-executing-image-transfer-script-error-copying)  
Try also to read other posts that contain the errors above.

---

<div class="post-metadata">

**Author:** ![keiji](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@keiji](https://forum.opennebula.io/u/keiji)\
**Post date:** [January 29, 2018, 1:59am UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/3 "2018-01-29T01:59:27Z")

</div>

Thank you for answer. The problem was solved, but another issue came up.  
please help me.

log is

Mon Jan 29 10:56:29 2018 [Z0][VM][I]: New state is ACTIVE  
Mon Jan 29 10:56:29 2018 [Z0][VM][I]: New LCM state is PROLOG  
Mon Jan 29 10:56:35 2018 [Z0][VM][I]: New LCM state is BOOT  
Mon Jan 29 10:56:35 2018 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/27/deployment.0  
Mon Jan 29 10:56:36 2018 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm\_context.  
Mon Jan 29 10:56:36 2018 [Z0][VMM][I]: ExitCode: 0  
Mon Jan 29 10:56:36 2018 [Z0][VMM][I]: Successfully execute network driver operation: pre.  
Mon Jan 29 10:56:36 2018 [Z0][VMM][I]: Command execution fail: cat \<\< EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/27/deployment.0’ ‘test6’ 27 test6  
Mon Jan 29 10:56:36 2018 [Z0][VMM][I]: error: failed to connect to the hypervisor  
Mon Jan 29 10:56:36 2018 [Z0][VMM][I]: error: unable to connect to server at ‘localhost:16509’: Connection refused  
Mon Jan 29 10:56:36 2018 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/0/27/deployment.0  
Mon Jan 29 10:56:36 2018 [Z0][VMM][I]: ExitCode: 255  
Mon Jan 29 10:56:36 2018 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.  
Mon Jan 29 10:56:36 2018 [Z0][VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/0/27/deployment.0  
Mon Jan 29 10:56:36 2018 [Z0][VM][I]: New LCM state is BOOT\_FAILURE

---

<div class="post-metadata">

**Author:** ![keiji](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@keiji](https://forum.opennebula.io/u/keiji)\
**Post date:** [January 30, 2018, 2:32am UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/4 "2018-01-30T02:32:30Z")

</div>

and this is oned.log. somebody help me! please

Tue Jan 30 11:31:10 2018 [Z0][ReM][D]: Req:1776 UID:0 one.zone.raftstatus invoked  
Tue Jan 30 11:31:10 2018 [Z0][ReM][D]: Req:1776 UID:0 one.zone.raftstatus result SUCCESS, "-1\<…"  
Tue Jan 30 11:31:10 2018 [Z0][ReM][D]: Req:5280 UID:0 [one.vmpool.info](http://one.vmpool.info) invoked , -2, -1, -1, -1  
Tue Jan 30 11:31:10 2018 [Z0][ReM][D]: Req:5280 UID:0 [one.vmpool.info](http://one.vmpool.info) result SUCCESS, "\<VM\_POOL\>  
37\<…"  
Tue Jan 30 11:31:10 2018 [Z0][ReM][D]: Req:7840 UID:0 [one.vmpool.info](http://one.vmpool.info) invoked , -2, -1, -1, -1  
Tue Jan 30 11:31:10 2018 [Z0][ReM][D]: Req:7840 UID:0 [one.vmpool.info](http://one.vmpool.info) result SUCCESS, "\<VM\_POOL\>  
37\<…"  
Tue Jan 30 11:31:16 2018 [Z0][ONE][E]: Error parsing host information: syntax error, unexpected VARI  
ABLE, expecting EQUAL or EQUAL\_EMPTY at line 1, columns 8:14. Monitoring information:  
error: failed to connect to the hypervisor  
error: unable to connect to server at ‘localhost:16509’: Connection refused  
ARCH=x86\_64  
MODELNAME="Intel® Xeon® CPU E5-2690 0 @ 2.90GHz"  
HYPERVISOR=kvm  
TOTALCPU=3200  
CPUSPEED=1200  
TOTALMEMORY=131824240  
USEDMEMORY=1246856  
FREEMEMORY=130577384  
FREECPU=3200  
USEDCPU=0  
NETRX=0  
NETTX=0  
KVM\_MACHINES="pc-i440fx-rhel7.0.0 pc rhel6.0.0 rhel6.1.0 rhel6.2.0 rhel6.3.0 rhel6.4.0 rhel6.5.0 rhe  
l6.6.0"  
KVM\_CPU\_MODELS="486 pentium pentium2 pentium3 pentiumpro coreduo n270 core2duo qemu32 kvm32 cpu64-rh  
el5 cpu64-rhel6 kvm64 qemu64 Conroe Penryn Nehalem Nehalem-IBRS Westmere Westmere-IBRS SandyBridge S  
andyBridge-IBRS IvyBridge IvyBridge-IBRS Haswell-noTSX Haswell-noTSX-IBRS Haswell Haswell-IBRS Broad  
well-noTSX Broadwell-noTSX-IBRS Broadwell Broadwell-IBRS Skylake-Client Skylake-Client-IBRS athlon p  
henom Opteron\_G1 Opteron\_G2 Opteron\_G3 Opteron\_G4 Opteron\_G5"  
DS\_LOCATION\_USED\_MB=1826  
DS\_LOCATION\_TOTAL\_MB=204696  
DS\_LOCATION\_FREE\_MB=202871  
DS = [  
ID = 0,  
USED\_MB = 1826,  
TOTAL\_MB = 204696,  
FREE\_MB = 202871  
]

---

<div class="post-metadata">

**Author:** ![marcindulak](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@marcindulak](https://forum.opennebula.io/u/marcindulak)\
**Post date:** [January 30, 2018, 3:27am UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/5 "2018-01-30T03:27:32Z")

</div>

From the frontend, what is the output of

`sudo su - oneadmin -c 'onehost list'`

`sudo su - oneadmin -c 'onehost show 0'`

And on the worker node:

`sudo systemctl status libvirtd`

---

<div class="post-metadata">

**Author:** ![keiji](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@keiji](https://forum.opennebula.io/u/keiji)\
**Post date:** [January 30, 2018, 4:42am UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/6 "2018-01-30T04:42:29Z")

</div>

> [@marcindulak](#):
>
> systemctl status libvirtd

thisi is log. thank you for your help.

[oneadmin@test5 ~]$ onehost list  
ID NAME CLUSTER RVM ALLOCATED\_CPU ALLOCATED\_MEM STAT  
4 test6 default 0 0 / 3200 (0%) 0K / 125.7G (0%) on

[oneadmin@test5 ~]$ onehost show 4  
HOST 4 INFORMATION  
ID : 4  
NAME : test6  
CLUSTER : default  
STATE : MONITORED  
IM\_MAD : kvm  
VM\_MAD : kvm  
LAST MONITORING TIME : 01/30 13:35:32

HOST SHARES  
RUNNING VMS : 0  
MEMORY  
TOTAL : 125.7G  
TOTAL +/- RESERVED : 125.7G  
USED (REAL) : 15.3G  
USED (ALLOCATED) : 0K  
CPU  
TOTAL : 3200  
TOTAL +/- RESERVED : 3200  
USED (REAL) : 0  
USED (ALLOCATED) : 0

LOCAL SYSTEM DATASTORE #0 CAPACITY  
TOTAL: : 199.9G  
USED: : 4.8G  
FREE: : 195.1G

MONITORING INFORMATION  
ARCH=“x86\_64”  
CPUSPEED=“1200”  
HOSTNAME=“test6”  
HYPERVISOR=“kvm”  
IM\_MAD=“kvm”  
KVM\_CPU\_MODELS=“486 pentium pentium2 pentium3 pentiumpro coreduo n270 core2duo qemu32 kvm32 cpu64-rhel5 cpu64-rhel6 kvm64 qemu64 Conroe Penryn Nehalem Nehalem-IBRS Westmere Westmere-IBRS SandyBridge SandyBridge-IBRS IvyBridge IvyBridge-IBRS Haswell-noTSX Haswell-noTSX-IBRS Haswell Haswell-IBRS Broadwell-noTSX Broadwell-noTSX-IBRS Broadwell Broadwell-IBRS Skylake-Client Skylake-Client-IBRS athlon phenom Opteron\_G1 Opteron\_G2 Opteron\_G3 Opteron\_G4 Opteron\_G5”  
KVM\_MACHINES=“pc-i440fx-rhel7.0.0 pc rhel6.0.0 rhel6.1.0 rhel6.2.0 rhel6.3.0 rhel6.4.0 rhel6.5.0 rhel6.6.0”  
MODELNAME=“Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz”  
NETRX=“0”  
NETTX=“0”  
RESERVED\_CPU=“”  
RESERVED\_MEM=“”  
VERSION=“5.4.6”  
VM\_MAD=“kvm”

WILD VIRTUAL MACHINES

NAME IMPORT\_ID CPU MEMORY

VIRTUAL MACHINES

```
ID USER GROUP NAME STAT UCPU UMEM HOST TIME

```

[root@test6 kernel]# systemctl status libvirtd  
● libvirtd.service - Virtualization daemon  
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)  
Active: active (running) since 火 2018-01-30 13:25:38 JST; 13min ago  
Docs: man:libvirtd(8)  
[http://libvirt.org](http://libvirt.org)  
Main PID: 51226 (libvirtd)  
CGroup: /system.slice/libvirtd.service  
├─ 1659 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/…  
├─ 1660 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/…  
└─51226 /usr/sbin/libvirtd

1月 30 13:25:37 test6 systemd[1]: Starting Virtualization daemon…  
1月 30 13:25:38 test6 systemd[1]: Started Virtualization daemon.  
1月 30 13:25:38 test6 dnsmasq[1659]: read /etc/hosts - 4 addresses  
1月 30 13:25:38 test6 dnsmasq[1659]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses  
1月 30 13:25:38 test6 dnsmasq-dhcp[1659]: read /var/lib/libvirt/dnsmasq/default.hostsfile

Node@test6

# virsh -c qemu+tcp://host/system

error: unable to connect to server at ‘host:16509’: Connection refused  
error: failed to connect to the hypervisor

---

<div class="post-metadata">

**Author:** ![marcindulak](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@marcindulak](https://forum.opennebula.io/u/marcindulak)\
**Post date:** [January 30, 2018, 8:15pm UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/7 "2018-01-30T20:15:57Z")

</div>

I don’t know why libvirt is trying to use the 16509 port - that should be commented out by default in `/etc/libvirt/libvirtd.conf` on test6. I imagine you have no problems creating a test VM from test6 manually with virt-install, as root?

```
virsh list --all
grep oneadmin /etc/libvirt/qemu.conf # opennebula modifies this file
yum -y install wget virt-install virt-viewer
wget https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-i386-disk.img -P /tmp
chown oneadmin:oneadmin /tmp/cirros-0.4.0-i386-disk.img
virt-install --os-variant=virtio26 --name=cirros --ram=64 --vcpus=1 --disk /tmp/cirros-0.4.0-i386-disk.img,format=qcow2 --import --nonetworks

```

In another terminal, with $DISPLAY available:

```
virt-viewer cirros # just check if it starts fine
virsh destroy cirros
virsh undefine cirros
```

---

<div class="post-metadata">

**Author:** ![keiji](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@keiji](https://forum.opennebula.io/u/keiji)\
**Post date:** [January 31, 2018, 12:47am UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/8 "2018-01-31T00:47:42Z")

</div>

Than you for your help. I can create VM from test6 manually with virt-install,as root.

[root@test6 qemu]# virsh list --all

## ID Name State

1 cirros running

[root@test6 qemu]# virsh console cirros

※I can login

---

<div class="post-metadata">

**Author:** ![marcindulak](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@marcindulak](https://forum.opennebula.io/u/marcindulak)\
**Post date:** [January 31, 2018, 9:43am UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/9 "2018-01-31T09:43:14Z")

</div>

I’m unable to reproduce the problem, maybe a developer can comment.

If you google search for “‘localhost:16509’: Connection refused” there are few posts that clarify what may be happening. If you find a solution please describe it here.

---

<div class="post-metadata">

**Author:** ![VURoland](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/vuroland/32/7682_2.png) [@VURoland](https://forum.opennebula.io/u/VURoland)\
**Post date:** [February 1, 2018, 8:02pm UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/10 "2018-02-01T20:02:26Z")

</div>

Could this be your problem?  
see: [https://access.redhat.com/documentation/en-us/red\_hat\_enterprise\_linux/7/html/virtualization\_deployment\_and\_administration\_guide/sect-troubleshooting-common\_libvirt\_errors\_and\_troubleshooting#sect-Unable\_to\_connect\_to\_server\_at\_host16509\_Connection\_refused\_](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-troubleshooting-common_libvirt_errors_and_troubleshooting#sect-Unable_to_connect_to_server_at_host16509_Connection_refused_)…\_error\_failed\_to\_connect\_to\_the\_hypervisor

```
 The libvirt daemon was started without the --listen option. Verify this by running this command:

# ps aux | grep libvirtd
root 10749 0.1 0.2 558276 18280 ? Ssl 23:21 0:00 /usr/sbin/libvirtd

The output does not contain the --listen option. 

```

Solution  
Start the daemon with the --listen option.  
To do this, modify the /etc/sysconfig/libvirtd file and uncomment the following line:

```
# LIBVIRTD_ARGS="--listen"

Then, restart the libvirtd service with this command:

# /bin/systemctl restart libvirtd.service
```

---

<div class="post-metadata">

**Author:** ![keiji](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@keiji](https://forum.opennebula.io/u/keiji)\
**Post date:** [February 2, 2018, 11:16am UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/11 "2018-02-02T11:16:00Z")

</div>

Thank you for your help.  
I configured LIBVIRTD\_ARGS="–listen". but  
I could not start libvirtd.

I gave up Centos7 version.

I tried ubuntu16 version. now I perfectry set up opennebula.  
I think ubuntu version better.

---

<div class="post-metadata">

**Author:** ![keiji](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@keiji](https://forum.opennebula.io/u/keiji)\
**Post date:** [February 2, 2018, 11:18am UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/12 "2018-02-02T11:18:51Z")

</div>

I will try again Centos7 version after a while.

---

<div class="post-metadata">

**Author:** ![Jehe](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jehe/32/6461_2.png) [@Jehe](https://forum.opennebula.io/u/Jehe)\
**Post date:** [July 7, 2022, 1:53am UTC](https://forum.opennebula.io/t/can-not-instant-vm/5630/13 "2022-07-07T01:53:28Z")

</div>

Maybe after wrong opennebula packages reinstallations you’ve lost /var/lib/one/.ssh/config file, which manages ssh connections while clonning VMs.

As it is, workaround you can create config file with the next content:

```auto
Host *
  StrictHostKeyChecking no

```

But much more better to restore native opennebula config content
