[Users] run once via ovirt-shell 3.3?

Juan Hernandez jhernand at redhat.com
Mon Mar 24 14:52:06 UTC 2014


On 03/24/2014 03:15 PM, Sven Kieske wrote:
> Hi,
> 
> with the 3.3 shell I just got the following tab options:
> 
> [oVirt shell (connected)]# action vm test start
> async pause vm-domain-user-password vm-os-cmdline
> vm-placement_policy-affinity vm-stateless
> correlation_id vm-display-type vm-domain-user-username
> vm-os-initRd vm-placement_policy-host-id grace_period-expiry
> vm-domain-name vm-os-boot vm-os-kernel vm-placement_policy-host-name
> 
> can I use newer cli versions with older engines? it's a 3.3.3-2 engine
> 

In general you can use a newer version of the SDKs and CLI with an older
engine, as the RESTAPI is backwards compatible. However, some options of
the newer SDKs and CLI won't work, as the support in the engine side
won't exist.

In this particular case you probably have an old version of the Python
SDK (the CLI sits on top of the Python SDK). To have the cloud-init
support you need at least version 3.3.3.0 of the ovirt-engine-sdk-python
package (better to use the latest, 3.3.3.1).

In addition, as I mentioned before, there is a bug around the "hostname"
attribute, it should have been "host-address". Auto-completion will tell
you that the option is --vm-initialization-cloud_init-hostname, but
actually it should be --vm-initialization-cloud_init-host-address.
Typing that manually should work. I opened the following bug to track
this issue:

  https://bugzilla.redhat.com/1080033

> 
> Am 24.03.2014 14:56, schrieb Juan Hernandez:
>> On 03/24/2014 11:18 AM, Sven Kieske wrote:
>>> Hi,
>>>
>>> I'm just trying to figure out how to use run-once via
>>> shell..
>>>
>>> [oVirt shell (connected)]# action vm vm_name start --run-once
>>> does not work, and there is no help for "action vm start"..
>>>
>>> Does anybody have an idea on how to use run once
>>> via shell and how to pass cloud-init data over it?
>>>
>>
>> If you type "action vm vm_name start" and then hit tab twice it should
>> display the available command line options. In your case you are
>> interested in the "initialization-cloud_init" options:
>>
>>   [oVirt shell (connected)]# action vm vm_name start <TAB><TAB>
>>   ...
>>   vm-initialization-cloud_init-authorized_keys-authorized_key
>>   vm-initialization-cloud_init-hostname
>>   vm-initialization-cloud_init-network-dns-search_domains-host
>>   vm-initialization-cloud_init-network-dns-servers-host
>>   vm-initialization-cloud_init-network-nics-nic
>>   vm-initialization-cloud_init-payload_files-payload_file
>>   vm-initialization-cloud_init-regenerate_ssh_keys
>>   vm-initialization-cloud_init-timezone
>>   vm-initialization-cloud_init-users-user
>>   ...
>>
>> You should then be able to use these options as follows:
>>
>>   [oVirt shell (connected)]# action vm vm_name start
>> --vm-initialization-cloud_init-hostname your_host_name
>>
>> However, I think there is a bug in this particular option, the hostname,
>> that will prevent using it. The name should be "host", not "hostname".
>> As this is probably the first thing you will need the net result is that
>> you won't be able to use it currently. I'm investigating it and will let
>> you know if there is a workaround.
>>
> 


-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Users mailing list