- Community Home
- >
- Software
- >
- HPE OneView
- >
- OneView configure second interface in DHCP.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 08:30 AM - last edited on 03-06-2024 02:43 AM by support_s
02-26-2024 08:30 AM - last edited on 03-06-2024 02:43 AM by support_s
OneView configure second interface in DHCP.
Hello,
I am trying to configure a second network interface in the oneview appliance. I read this can be achieved only via the rest api, is it true?
I am trying to run the following python code but I receive an error : "hpeOneView.exceptions.HPEOneViewTaskError: A appliance-2 IPv4 host name is required for DHCP configuration."
#!/usr/bin/python3
import logging
import sys
import getpass
from pprint import pprint
from hpeOneView.oneview_client import OneViewClient
from hpeOneView.exceptions import HPEOneViewException
# Default credentials to login to oneview
if sys.stdin.isatty():
print("Enter credentials")
USERNAME = input("Username: ")
PASSWORD = getpass.getpass("Password: ")
else:
USERNAME = sys.stdin.readline().rstrip()
PASSWORD = sys.stdin.readline().rstrip()
CONFIG = {
"api_version": 6000,
"ip": "<OneViewIP>",
"credentials": {
"userName": USERNAME,
"password": PASSWORD
}
}
# Initiate a connection to the appliance and instanciate a new OneViewClient class object
ONEVIEW_CLIENT = OneViewClient(CONFIG)
network_interface = ONEVIEW_CLIENT.appliance_network_interfaces
updated_details = {"applianceNetworks": [{
"hostname": "<oneviewHostname>",
"networkLabel":"ILOnetwork",
"interfaceName": "ILOnetwork",
"device": "eth1",
"macAddress": "<MACaddress>",
"ipv4Type": "DHCP"
}]}
updated_network_interface = network_interface.create(updated_details)
pprint(updated_network_interface.data)
print("\nNetwork Interface updated successfully")
Could you help finding what is going wrong?
Thank you in advance...
- Tags:
- OneView
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 08:33 PM
03-01-2024 08:33 PM
Re: OneView configure second interface in DHCP.
Hi linuxteam-belgi,
Yes, you heard right. Configuration of the secondary NIC is supported only through the REST API.
For 2nd NIC configuration, you need to retrieve the network settings first, then configure the secondary NIC using the following NIC REST API.
Please refer the link for more information on configuration. Hope it gives solution for you.
Regards,
Shiva_JR
Please mark as 'Accepted solution' and thumbs up with Kudos if my post worked
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 04:08 AM
03-04-2024 04:08 AM
Re: OneView configure second interface in DHCP.
Hello,
I agree with the above information.
Please do let us know if a case is logged.
Thanks,
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 09:10 PM
03-06-2024 09:10 PM
Re: OneView configure second interface in DHCP.
Hi @linuxteam-belgi
Is this issue resolved? Any help required ?
Regards,
Shiva_JR
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
