[ovirt-users] Cloud-Init with python SDK (oVirt 3.6.2)

2016-02-09 Thread Vladimir Astafiev

I'm sorry. Mistake in version. Correct version is 3.6.2.

On 02/02/16 19:54, Vladimir Astafiev wrote:

Hi,

Before the last update to 3.6.3 I used this code to init VMs via 
Cloud-Init


cloud_init = params.CloudInit(regenerate_ssh_keys=True,
users=params.Users(user=[params.User(user_name="root", 
password=vm_config.rootpw)]),

  files=files, host=host,
network_configuration=params.NetworkConfiguration(
nics=params.Nics(nic=[params.NIC(name='eth0',
boot_protocol='static',
on_boot=True,
network=params.Network(
ip=params.IP(address=vm_config.ipaddress,
netmask=vm_config.netmask,
gateway=vm_config.gateway)))]),
dns=params.DNS(servers=params.Hosts(host=[params.Host(address=vm_config.dns1), 


params.Host(address=vm_config.dns2)]

action = params.Action(use_cloud_init=True, 
vm=params.VM(initialization=params.Initialization(regenerate_ssh_keys=True, 
cloud_init=cloud_init)))

vm.start(action=action)


After updating to 3.6.3 the code stopped working. After initializing I 
get this payload:



# ll -R /mnt
/mnt:
total 2
drwxr-xr-x. 3 root root 2048 Feb  2 19:25 openstack

/mnt/openstack:
total 2
drwxr-xr-x. 2 root root 2048 Feb  2 19:25 latest

/mnt/openstack/latest:
total 1
-rw-r-. 1 root root 200 Feb  2 19:25 meta_data.json
-rw-r-. 1 root root 316 Feb  2 19:25 user_data

# cat /mnt/openstack/latest/user_data
#cloud-config
ssh_pwauth: true
disable_root: 0
ssh_deletekeys: 'True'
output:
  all: '>> /var/log/cloud-init-output.log'
chpasswd:
  expire: false
runcmd:
- 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo 
''datasource_list:

  ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'

# cat /mnt/openstack/latest/meta_data.json
{
  "launch_index" : "0",
  "availability_zone" : "nova",
  "uuid" : "d6309b89-c793-4db5-83bc-9c38a18b1bfa",
  "meta" : {
"essential" : "false",
"role" : "server",
"dsmode" : "local"
  }
}

I believe, this commit [1] changed API. Can someone give me an advice 
on where to change the code so it will work again?



[1] https://gerrit.ovirt.org/#/c/50240/



--
Vladimir Astafiev

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Cloud-Init with python SDK (oVirt 3.6.3)

2016-02-02 Thread Vladimir Astafiev

Hi,

Before the last update to 3.6.3 I used this code to init VMs via Cloud-Init

cloud_init = params.CloudInit(regenerate_ssh_keys=True,
users=params.Users(user=[params.User(user_name="root", 
password=vm_config.rootpw)]),

  files=files, host=host,
network_configuration=params.NetworkConfiguration(
nics=params.Nics(nic=[params.NIC(name='eth0',
boot_protocol='static',
on_boot=True,
network=params.Network(
ip=params.IP(address=vm_config.ipaddress,
netmask=vm_config.netmask,
gateway=vm_config.gateway)))]),
dns=params.DNS(servers=params.Hosts(host=[params.Host(address=vm_config.dns1),
params.Host(address=vm_config.dns2)]

action = params.Action(use_cloud_init=True, 
vm=params.VM(initialization=params.Initialization(regenerate_ssh_keys=True, 
cloud_init=cloud_init)))

vm.start(action=action)


After updating to 3.6.3 the code stopped working. After initializing I 
get this payload:



# ll -R /mnt
/mnt:
total 2
drwxr-xr-x. 3 root root 2048 Feb  2 19:25 openstack

/mnt/openstack:
total 2
drwxr-xr-x. 2 root root 2048 Feb  2 19:25 latest

/mnt/openstack/latest:
total 1
-rw-r-. 1 root root 200 Feb  2 19:25 meta_data.json
-rw-r-. 1 root root 316 Feb  2 19:25 user_data

# cat /mnt/openstack/latest/user_data
#cloud-config
ssh_pwauth: true
disable_root: 0
ssh_deletekeys: 'True'
output:
  all: '>> /var/log/cloud-init-output.log'
chpasswd:
  expire: false
runcmd:
- 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo 
''datasource_list:

  ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'

# cat /mnt/openstack/latest/meta_data.json
{
  "launch_index" : "0",
  "availability_zone" : "nova",
  "uuid" : "d6309b89-c793-4db5-83bc-9c38a18b1bfa",
  "meta" : {
"essential" : "false",
"role" : "server",
"dsmode" : "local"
  }
}

I believe, this commit [1] changed API. Can someone give me an advice on 
where to change the code so it will work again?



[1] https://gerrit.ovirt.org/#/c/50240/

--
Vladimir Astafiev

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] ISO_DOMAIN unknow file type

2015-12-09 Thread Vladimir Astafiev

This happens when iso-domain contains non *.iso files.


On 09/12/15 14:33, alireza sadeh seighalan wrote:

hi everyone


i get this message in Events section of OVIRT 3.6 .everything is ok 
apparently but i feared that create a big problem in the future.what 
should i do? thankd in advance



Refresh image lisst failed for domain(s): ISO_DOMAIN (Unknown file 
type) Please check domain activity.






___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


--
Vladimir Astafiev

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Ovirt 3.6 RC import VM

2015-10-07 Thread Vladimir Astafiev
-95d6-dffbc0a3213d]: Compensating NEW_ENTITY_ID 
of org.ovirt.engine.core.common.businessentities.VmStatic; snapshot: 
1abdcfd8-77b2-47c3-9973-8184167b3774.
2015-10-01 11:53:00,818 ERROR 
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-8-thread-36) 
[7c844f2] Correlation ID: 2221ad18, Job ID: 
df3b9ba1-90bf-4647-9712-f4e3eccfc256, Call Stack: null, Custom Event 
ID: -1, Message: Failed to import Vm test to Data Center TEST, 
Cluster INTEL
2015-10-01 11:53:00,822 INFO 
[org.ovirt.engine.core.bll.ImportVmCommand] 
(org.ovirt.thread.pool-8-thread-36) [7c844f2] Lock freed to object 
'EngineLock:{exclusiveLocks='[test=<VM_NAME, 
ACTION_TYPE_FAILED_NAME_ALREADY_USED>, 
1abdcfd8-77b2-47c3-9973-8184167b3774=<VM, 
ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName test>]', 
sharedLocks='[1abdcfd8-77b2-47c3-9973-8184167b3774=<REMOTE_VM, 
ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName test>]'}'


Hi,
did you check the rest of the system? The name need to be unique, and 
you can rename that VM on import to something else.
Often happens to people who are just trying it out and export  an 
existing VM and immediately try to import it back…but it's already there.


Thanks,
michal





Thanks

Wolfgang Bucher




___
Users mailing list
Users@ovirt.org <mailto:Users@ovirt.org>
http://lists.ovirt.org/mailman/listinfo/users




___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


--
Vladimir Astafiev

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users