[ovirt-users] [ovirt-shell] update hostnic/nic ???

Bloemen, Jurriën Jurrien.Bloemen at dmc.amcnetworks.com
Thu Jan 14 12:22:10 UTC 2016


On 14-01-16 12:16, Juan Hernández wrote:

On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:


Hi,

First I created a bonding interface:

# add nic --parent-host-name server01 --name bond0 --network-name
VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
--bonding-slaves-host_nic host_nic.name=eno2

This works great but no IP is set on VLAN602.

Then I'm trying to add an ip address to a network with the following
command:

# update hostnic --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

==============================================================================================================
ERROR
============================================================================================================

wrong number of arguments, try 'help update' for help.
================================================================================================================================================================================================================================

Looking at this document
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
I need to use "nic" instead of "hostnic" but then I don't have the
options to say this is a --parent-host-name. Only VM related command
options.

So I think the documentation is behind.

Can somebody help me with what the command is to add a IP to a
VLAN/Network for a host?





The command should be like this:

  # update nic bond0 --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

Note that the it is "nic" instead of "hostnic" and that you need to
specify the name of that NIC, in this case "bond0".

The command will work if you type it like that, but auto-completion
won't work. This is a bug in the CLI, indirectly caused by the fact that
the name of the URL segment used in the RESTAPI is "nics" (from
/hosts/{host:id}/*nics*) but the name of the XML schema complex type is
"HostNIC".



Thanks! That works!

Another question:

Now I got the message that my network is out-of-sync. How can i force within the ovirt-shell that it syncs the networks?
This message (including any attachments) may contain information that is privileged or confidential. If you are not the intended recipient, please notify the sender and delete this email immediately from your systems and destroy all copies of it. You may not, directly or indirectly, use, disclose, distribute, print or copy this email or any part of it if you are not the intended recipient
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160114/6e4a4da1/attachment-0001.html>


More information about the Users mailing list