Add a Cloud Networks interface to a Cloud Server
You can add a cloud network to a cloud server at any time. This article shows you how to add a cloud network to a cloud server by using the API and the rackspace-novaclient (nova). It walks you through installing nova and the Cloud Networks extension in Mac® OS X, then using nova to add a virtual interface to a running cloud server that connects to your cloud network. Nova is also available for Linux® and Windows®.
Use the following steps to install nova:
Run the following command:
sudo easy_install pip
Install nova and the Cloud Networks virtual interface extension by running the following commands:
sudo pip install rackspace-novaclient sudo pip install os_virtual_interfacesv2_python_novaclient_ext
Set up the following environment variables in your local .profile file, replacing the values inside brackets (< >) with your account information:
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/ export OS_AUTH_SYSTEM=rackspace export OS_REGION_NAME=DFW export OS_USERNAME=<account_username> export OS_TENANT_NAME=<account_#> export NOVA_RAX_AUTH=1 export OS_PASSWORD=<api_key> export OS_PROJECT_ID=<account_#> export OS_NO_CACHE=1
Next, load the environment variables by running the following command:
Now you can use your credentials to display information about your cloud network and cloud server and add the interface by running the following commands:
nova credentials nova list #note the ID of the cloud server to which you want to add the interface. nova network-list #note the ID of your cloud network nova virtual-interface-create 30714e92-40d3-4259-bd73-2ed8b03abcf5 e74780b5-d180-4faa-bfc0-87802b20aaf4 #nova virtual-interface-create networkID cloudserverID
It takes a couple of minutes to add the interface. You should now be able to
log in to the cloud server and check interfaces by running the command
You should see the interface that you added in the output from this command.
Note: You can also run
nova virtual-interface-list cloudserverID.
If you need to add Cloud Networks to your account, submit a ticket from the Cloud Control Panel.
You might find the following additional resources helpful:
- Install CLI client and Cloud Servers Virtual Interface extension
- Install python-novaclient on Windows
©2020 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License