[ovirt-users] Setting up new VM

2018-05-31 Thread 03ce007
I have self-hosted-engine (4.2) running on centos (7.4), the engine is running 
fine so I am trying to deploy a test vm to check ssh connectivity. 

however, the vm-infra role runs without any issues and I can see the new VM is 
in "up" state but it does not have any IP assigned eventhough I have defined it 
in the cloud_init dict. What I have noticed is that the reported_devices array 
comes out empty and hence the "Wait for VMs IP" task within create_vm.yml is 
keep getting skipped. 

TASK [oVirt.vm-infra : Wait for VMs IP] 
**
task path: /ansible/roles/oVirt.vm-infra/tasks/main.yml:102
skipping: [hypervisor-ovirt] => (item={'name': 'mytest01-vm', 'tag': 
'httpd_vm', 'profile': {'cluster': 'Default', 'domain': 'node.dev.dw', 
'template': 'rhel7', 'memory': '2GiB', 'cores': 2, 'ssh_key': 'ssh-rsa 
AAA...LGx user@fqdn', 'disks': [{'size': '10GiB', 'name': 'data', 
'storage_domain': 'hosted_storage', 'interface': 'virtio'}]}, 'cloud_init': 
{'host_name': 'mytestvm', 'dns_servers': '10.90.x.y 10.90.x.z', 
'nic_boot_protocol': 'static', 'nic_ip_address': '10.90.0.160', 'nic_netmask': 
'255.255.255.0', 'nic_gateway': '10.90.0.a', 'nic_name': 'eth0', 'nic_on_boot': 
True, 'custom_script': "write_files:\n - content: |\n Hello, world!\n   
path: /tmp/greeting.txt\n   permissions: '0644'\n", 'user_name': 'root', 
'root_password': 'super_pass'}, 'cloud_init_persist': True})  => {
"changed": false,
"item": {
"cloud_init": {
"custom_script": "write_files:\n - content: |\n Hello, world!\n 
  path: /tmp/greeting.txt\n   permissions: '0644'\n",
"dns_servers": "10.90.x.y 10.90.x.z",
"host_name": "mytestvm",
"nic_boot_protocol": "static",
"nic_gateway": "10.90.x.a",
"nic_ip_address": "10.90.x.b",
"nic_name": "eth0",
"nic_netmask": "255.255.255.0",
"nic_on_boot": true,
"root_password": "super_pass",
"user_name": "root"
},
"cloud_init_persist": true,
"name": "mytest01-vm",
"profile": {
"cluster": "Default",
"cores": 2,
"disks": [
{
"interface": "virtio",
"name": "data",
"size": "10GiB",
"storage_domain": "hosted_storage"
}
],
"domain": "node.dev.dw",
"memory": "2GiB",
"ssh_key": "ssh-rsa AAA...LGx user@fqdn",
"template": "rhel7"
},
"tag": "httpd_vm"
},
"skip_reason": "Conditional result was False"
}

I think this is the very last stage I am once the ssh connection works, I will 
be able to use with install yum repo, etc. 

Please advise. 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/HPISGO6RI6CMS7VYXYLHNNMS2QT2HYYE/


[ovirt-users] VM status and issue with cloud_init

2018-05-30 Thread 03ce007
Some what new to the VM and Ovirt world here and need some help understanding 
terminologies and get the VM to work as per requirement. 

I have a self-hosted-engine (4.2) running on centos (7.4). The engine is in 
good health and I have deployed a test VM using below playbook successfully. It 
is currently in "up" state.


- name: oVirt Self-Hosted-Engine - Manage VMs
  hosts: hypervisor_ovirt
  gather_facts: false

  vars_files:
# Contains encrypted `engine_password` varibale using ansible-vault
- ovirt-secrets.yml

  vars:
engine_url: https://engine-ovirt.dw/ovirt-engine/api
engine_user: admin@internal
engine_cafile: /etc/pki/ovirt-engine/ca.pem

mytest_vm:
  cluster: Default
  memory: 64GiB
  memory_guaranteed: 1GiB
  cores: 2
  nics:
- name: vnet0
  network: ovirtmgmt
  profile: ovirtmgmt
  interface: virtio
  wait: true
  domain: node.dev.dw
  os_type: rhel_7x64
  ssh_key: ssh-rsa AAA...LGx user01@mytestvm
  root_password: super_password
  disks:
- size: 20GiB
  name: data
  storage_domain: hosted_storage
  interface: virtio
  bootable: true
  nics:
- name: vnet0
  network: ovirtmgmt
  profile: ovirtmgmt
  interface: virtio

vms:
  - name: mytest_vm
tag: mytest_vm
profile: "{{ mytest_vm }}"
cloud_init:
  dns_servers:
- 10.90.x.1
- 10.90.x.1
  nic_boot_protocol: static
  nic_ip_address: 10.90.x.y
  nic_netmask: 255.255.255.0
  nic_gateway: 10.90.x.z
  nic_name: eth0
  nic_on_boot: true
  host_name: mytestvm.test.dw
  custom_script: |
write_files:
 - content: |
 Hello, world!
   path: /tmp/greeting.txt
   permissions: '0644'
  user_name: root
  root_password: super_password
cloud_init_persist: true

  roles:
- oVirt.vm-infra


Above playbook runs fine, but when i see summary using ovirt4.py, i do not see 
ipaddr for this test vm. 

- I do not see the ipaddr for this VM despite specifying it using cloud_init
- does the "up" status mean it has "booted" or I need to do something else to 
boot it with centos 7.4 minimal

Thank you in advance.
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/YF635QVUMPZTMVX3CMPSNUORXK527OFA/


[ovirt-users] Re: Cannot see ipaddr of new VM

2018-05-30 Thread 03ce007
the vm does come up, but I do not see any ipaddr, fqdn or dns. 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/NAJRZ62LOPIXGMWKOUM74NLQBIM6F33J/


[ovirt-users] Cannot see ipaddr of new VM

2018-05-29 Thread 03ce007
I have got a self-hosted-engine (4.2) running on centos (7.4). 

I am trying to create new vanilla vm with static ip using cloud-init to test 
ssh connectivity. I have below playbook - 



- name: Add vanilla vm
ovirt_vms:
  auth: "{{ ovirt_auth }}"
  name: test01
  cluster: Default
  state: running
  memory: 2GiB
  cpu_cores: 8
  operating_system: rhel_7x64
  high_availability: true
  high_availability_priority: 50  # Available from Ansible 2.5
  cloud_init:
nic_boot_protocol: static
nic_ip_address: 10.34.60.86
nic_netmask: 255.255.252.0
nic_gateway: 10.34.63.254
nic_name: eth1
nic_on_boot: true
host_name: test01.ovirt.dw
custom_script: |
  write_files:
   - content: |
   Hello, world!
 path: /tmp/greeting.txt
 permissions: '0644'
user_name: root
root_password: super_password
  nics:
- name: vnet0
  network: ovirtmgmt
  profile: ovirtmgmt
  interface: virtio

# taken from actual vm-infra playbook
- name: Add disks
ovirt_disks:
  auth: "{{ ovirt_auth }}"
  name: "{{ item.0.name }}_{{ item.1.name }}"
  vm_name: test01
  size: "{{ item.1.size | default(omit) }}"
  format: "{{ item.1.format | default(omit) }}"
  storage_domain: "{{ item.1.storage_domain | default(omit) }}"
  interface: "{{ item.1.interface | default(omit) }}"
  bootable: "{{ item.1.bootable | default(omit) }}"
  wait: true
with_subelements:
  - "{{ vms }}"
  - "profile.disks"
  - flags:
skip_missing: true


the playbook runs successfully, but when I want to see the summary of vms using 
ovirt4.py, i do not see any devices attached, nor using curl api i see anything 
under reported_devices.

Is there something I am missing?

thank you.
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/XQZB5276OGYVU5JEIPCSL35HBDF5MIQQ/


[ovirt-users] SSH into guest VM

2018-05-23 Thread 03ce007
I have self-hosted-engine (4.2) deployed successfully on cento (7.4) server. 

The physical server has 'ovirt' as hostname and the self-hosted engineVM 
deployed
and running on it has 'engine.ovirt' as fdqn.

I can successfully create new VM using the oVirt.vm-infra example playbook. But 
what other config/var i need to add in them so that I can ssh into this new VM. 
Some example, tips, hints would be helpful.

Thank you.
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org


[ovirt-users] Second host deployment fails on self-hosted-engine

2018-05-23 Thread 03ce007
I have self-hosted-engine (4.2) deployed successfully on cento (7.4) server. 

The physical server has 'ovirt' as hostname and the self-hosted engineVM 
deployed and running on it has 'engine.ovirt' as fdqn.

I want to deploy another host on engineVM and I am using pre-baked oVirt.Infra 
role example playbook that has two host defined. But when I run it against the 
engineVM it fails with 'Connecting to host via SSH has failed' error. Below is 
the snippet from engine.log

Failed to establish session with host 'host2': SSH connection timed out 
connecting to 'root@1.2.3.6'
Validation of action 'AddVds' failed for user admin@internal-authz. Reasons: 
VAR__ACTION__ADD,VAR__TYPE__HOST,$server 1.2.3.6,VDS_CANNOT_CONNECT_TO_SERVER

I thought, the example playbook should run and deploy two hosts on already 
deployed engineVM. Do i need to update the example playbook?
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org


[ovirt-users] Obtain dynamic inventory onto local machine using ovirt4.py for self-hosted engine

2018-05-22 Thread 03ce007
I have successfully deployed self-hosted-engine (4.2) on centos (7.4) server. 

the server address is ovirt where the self-hosted engine running on it has fdqn 
as engine.ovirt. I  have ovirt,ini configured on server acan run the ovirt4.py 
from the server to obtain the vms in groups. But I want to control the vms 
using ansible from my macbook and run ansible playbooks locally. 

so I have downloaded the ovirt.ini and ovirt4.py from server and tried running 
it, but had no success. 

Is there something special needs setting up for 'self-hosted-ovirt-engine' as 
oppose to vanilla ovirt-engine which will allow me to control vms from my 
macbook?

thanks. 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org


[ovirt-users] Use local ansible to talk to engineVM and other vm

2018-05-21 Thread 03ce007
I have a self-hosted-engine (4.2) running on a centos 7.4 server.

I have downloaded ovirt ansible roles from ansible-galaxy and can run them from 
the server where the engineVM is running and able to deploy new vms, clusters, 
dc, etc. 

I have seen the use of ovirt4.py file to target and group hosts which you can 
target for specific plays. However, the box where self-hosted-engine is running 
is a physical server but I am looking to run ansible from my local machine 
instead to manage vms running on engineVM. Is there a way to achieve this?

Thank you in advance.
 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org


[ovirt-users] First host within Self-Hosted engine stays in non-responsive state

2018-05-18 Thread 03ce007
I am trying to setup self-hosted-engine (4.2) on a single machine running 
centos 7.4.

I ran hosted-engine deploy script and it ran all the way through but failed on 
last task (at "Wait for the local bootstrap VM to be down at engine eyes") 
while creating the local engine VM. However, the --vm-status shows the engine 
status as up and is in good health, but I cannot interact with host installed 
on engine VM. 

The host within engine VM shows it is in non-responsive state, not clear why 
and what caused it. I can ssh into the local engine VM and the engine.log has 
below entries - 

2018-05-17 11:03:57,739+01 ERROR 
[org.ovirt.engine.core.vdsbroker.monitoring.VmDevicesMonitoring] 
(EE-ManagedThreadFactory-engineScheduled-Thread-78) [6768004b] Exception:: 
org.springframework.dao.DataIntegrityViolationException: 
CallableStatementCallback; SQL [{call insertvmdevice(?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?)}]; ERROR: insert or update on table "vm_device" violates foreign 
key constraint "fk_vm_device_vm_static"
  Detail: Key (vm_id)=(114581bb-7fef-4b08-8e3c-85dd5a9e680b) is not present in 
table "vm_static".
...
...
...
2018-05-17 11:03:59,957+01 ERROR 
[org.ovirt.engine.core.bll.pm.FenceProxyLocator] 
(EE-ManagedThreadFactory-engineScheduled-Thread-44) [2bf8b18f] Can not run 
fence action on host 'ovirt', no suitable proxy host was found.
...
...
...
2018-05-17 11:20:00,093+01 ERROR 
[org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient] 
(EE-ManagedThreadFactory-engine-Thread-2) [1a833057] Exception during connection
...
...
...
2018-05-17 11:20:00,386+01 ERROR 
[org.ovirt.engine.core.vdsbroker.HostDevListByCapsVDSCommand] 
(EE-ManagedThreadFactory-engine-Thread-2) [1a833057] Command 
'HostDevListByCapsVDSCommand(HostName = ovirt, 
VdsIdAndVdsVDSCommandParametersBase:{hostId='1a6a47e6-934e-43f7-ad5b-ba8f8ff8df99',
 vds='Host[ovirt,1a6a47e6-934e-43f7-ad5b-ba8f8ff8df99]'})' execution failed: 
java.net.UnknownHostException: ovirt: Name or service not known
...
...
...
2018-05-17 11:20:03,287+01 ERROR 
[org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient] 
(EE-ManagedThreadFactory-engineScheduled-Thread-14) [] Exception during 
connection
2018-05-17 11:20:03,292+01 ERROR 
[org.ovirt.engine.core.vdsbroker.monitoring.HostMonitoring] 
(EE-ManagedThreadFactory-engineScheduled-Thread-14) [] Unable to 
RefreshCapabilities: UnknownHostException: ovirt
2018-05-17 11:20:03,294+01 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesAsyncVDSCommand] 
(EE-ManagedThreadFactory-engineScheduled-Thread-14) [] Command 
'org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesAsyncVDSCommand' 
return value 'org.ovirt.engine.core.vdsbroker.vdsbroker.VDSInfoReturn@46e3da89'
2018-05-17 11:20:03,294+01 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesAsyncVDSCommand] 
(EE-ManagedThreadFactory-engineScheduled-Thread-14) [] HostName = ovirt
2018-05-17 11:20:03,297+01 ERROR 
[org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesAsyncVDSCommand] 
(EE-ManagedThreadFactory-engineScheduled-Thread-14) [] Command 
'GetCapabilitiesAsyncVDSCommand(HostName = ovirt, 
VdsIdAndVdsVDSCommandParametersBase:{hostId='1a6a47e6-934e-43f7-ad5b-ba8f8ff8df99',
 vds='Host[ovirt,1a6a47e6-934e-43f7-ad5b-ba8f8ff8df99]'})' execution failed: 
java.net.UnknownHostException: ovirt
2018-05-17 11:20:03,316+01 ERROR 
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] 
(EE-ManagedThreadFactory-engineScheduled-Thread-15) [] EVENT_ID: 
VDS_BROKER_COMMAND_FAILURE(10,802), VDSM ovirt command GetCapabilitiesAsyncVDS 
failed: Connection issue ovirt
2018-05-17 11:20:03,317+01 ERROR 
[org.ovirt.engine.core.vdsbroker.monitoring.HostMonitoring] 
(EE-ManagedThreadFactory-engineScheduled-Thread-15) [] Unable to 
RefreshCapabilities: VDSNetworkException: VDSGenericException: 
VDSNetworkException: Connection issue ovirt
...
...
...


and then above 5 ERROR messages are keep getting repeated. 

Why the connection fails when I can still ssh into the engine? where is the 
issue here?
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org


[ovirt-users] Self-Hosted engine deploy fails but hosted-engine --vm-status shows engine in good health

2018-05-17 Thread 03ce007
I am setting up self-hosted engine (4.2) on centos 7.4. 

The setup runs all the way through and creates the local VM, but fails on task 
"Wait for the local bootstrap VM to be down at engine eyes". 

But if I then run hosted-engine --vm-start, it comes back up and shows it is in 
good health, but when I do an api call with curl, it shows me that the host is 
in 'non responsive' state! I cannot deploy any VM on the engine VM, the ssh 
connection fails. 

How and what could have caused it, where can i find more detailed information 
related to this error/status of engine vm ?

Thanks
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org


[ovirt-users] Ovirt host becomes non_operational

2018-05-15 Thread 03ce007
I am setting up self-hosted-ovirt-engine (4.2) on centos7.4.

While running hosted-engine --deploy script, it fails at "Check host status" 
with 'host has been set in non_operational status' error.

logs on engine vm at /var/log/ovirt-engine/host-deploy shows ansible tasl for 
"add host" ran successfully, but yet after that the host becomes 
non_operational!

Where can i find more information on this error?

Thank you.
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives:


[ovirt-users] Ovirt Self Hosted engine deploy fails

2018-05-14 Thread 03ce007
I am trying to setup self hosted ovirt engine (4.2) on centos 7.4, but the 
setup fails after 'Add host' task on 'wait for the host to be up'. The log 
doesn't seem to give clear indication where the issue might be. But I got below 
when ssh manually into ovirt appliance where the engine-deploy runs and I see 
the host status as'install_failed'. 

Where the issue might be, and where can i find detailed log on failure?

"ovirt_hosts": [
{
"address": "ovirt",
"affinity_labels": [],
"auto_numa_status": "unknown",
"certificate": {
"organization": "ovirt",
"subject": "O=ovirt,CN=ovirt"
},
"cluster": {
"href": 
"/ovirt-engine/api/clusters/ba170b8e-5744-11e8-8676-00163e3c9a32",
"id": "ba170b8e-5744-11e8-8676-00163e3c9a32"
},
"comment": "",
"cpu": {
"speed": 0.0,
"topology": {}
},
"device_passthrough": {
"enabled": false
},
"devices": [],
"external_network_provider_configurations": [],
"external_status": "ok",
"hardware_information": {
"supported_rng_sources": []
},
"hooks": [],
"href": 
"/ovirt-engine/api/hosts/aad0fe84-2a9b-446d-ac02-82a8f6eb2a3c",
"id": "aad0fe84-2a9b-446d-ac02-82a8f6eb2a3c",
"katello_errata": [],
"kdump_status": "unknown",
"ksm": {
"enabled": false
},
"max_scheduling_memory": 0,
"memory": 0,
"name": "ovirt",
"network_attachments": [],
"nics": [],
"numa_nodes": [],
"numa_supported": false,
"os": {
"custom_kernel_cmdline": ""
},
"permissions": [],
"port": 54321,
"power_management": {
"automatic_pm_enabled": true,
"enabled": false,
"kdump_detection": true,
"pm_proxies": []
},
"protocol": "stomp",
"se_linux": {},
"spm": {
"priority": 5,
"status": "none"
},
"ssh": {
"fingerprint": 
"SHA256:o98ZOygBK0jcfY+l5nfi0EGV9v3A4zjclG9d+C3U0WA",
"port": 22
},
"statistics": [],
"status": "install_failed",
"storage_connection_extensions": [],
"summary": {
"total": 0
},
"tags": [],
"transparent_huge_pages": {
"enabled": false
},
"type": "rhel",
"unmanaged_networks": [],
"update_available": false
}
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org