Feature #1223

Hot-plugging for NICs

Added by Ruben S. Montero about 9 years ago. Updated over 8 years ago.

Status:ClosedStart date:04/12/2012
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:Drivers - Auth
Target version:Release 4.0
Resolution:duplicate Pull request:

Description

This issue is to develop hot-plugging of:
  • NICs: Add/remove network interfaces to a running VM

opennebula-3.3.80-nichotplug.patch Magnifier (22.7 KB) Simon Boulet, 04/15/2012 02:20 AM


Related issues

Duplicated by Feature #1691: Develop Hot-plugging for NICs Closed 12/12/2012

Associated revisions

Revision 0866d4cb
Added by Jaime Melis about 9 years ago

feature #1223: Add attach_disk and detach_disk actions to the VMM driver.

Revision 7fe0794c
Added by Jaime Melis about 9 years ago

feature #1223: Add kvm attach_disk and detach_disk remote scripts

Revision 60631291
Added by Jaime Melis about 9 years ago

feature #1223: Prepare driver to read attach parameters from XML driver action

Revision 73b6457d
Added by Carlos Martín about 9 years ago

Feature #1223: Refactor TransferManager::prolog_action to create the prolog commands in a separate method

Revision cc13c073
Added by Carlos Martín about 9 years ago

Feature #1223: New VMM attach action

Revision 8071e5ca
Added by Carlos Martín about 9 years ago

Feature #1223: implement DispatchManager::attach

Revision e5b2f84f
Added by Carlos Martín about 9 years ago

Feature #1223: Basic xmlrpc method one.vm.attach, needs to be finished

Revision 492ba465
Added by Carlos Martín about 9 years ago

Feature #1223: Implement LCM::attach success/failure.

Revision 554321c7
Added by Carlos Martín about 9 years ago

Feature #1223: New VM state HOTPLUG, continue work on the attach operation

Revision 1eebdbc0
Added by Carlos Martín about 9 years ago

Feature #1223: Detach operation

Revision 0f59a29e
Added by Carlos Martín about 9 years ago

Feature #1223: Use the disk_id to generate the disk.i paths everywhere

Revision 582b8736
Added by Ruben S. Montero about 9 years ago

feature #1223: Removed unneeded log functions

Revision e2927e87
Added by Jaime Melis about 9 years ago

Feature #1223: Add OCA and CLI for onevm attach and onevm detach

Revision ba04cb04
Added by Jaime Melis about 9 years ago

feature #1223: Add HOTPLUG to the LCM states in OCA ruby, OCA Java, Ozones GUI and Sunstone GUI

Revision 2f0c1d0e
Added by Ruben S. Montero about 9 years ago

feature #1223: Included quotas for detach. Refactor some detach methods

Revision 32845b49
Added by Ruben S. Montero about 9 years ago

feature #1223: removed debug lines

Revision f04749ed
Added by Jaime Melis about 9 years ago

feature #1223: Fix minor typos

Revision 214133eb
Added by Jaime Melis about 9 years ago

feature #1223: Make attach/detach driver actions more robust to properly handle missing required XML tags, instead of crashing

Revision 1ddf0e28
Added by Jaime Melis about 9 years ago

feature #1223: Send target_index as well to both attach and detach VMM commands

Revision e05dbdb5
Added by Ruben S. Montero about 9 years ago

feature #1223: Attach operation name missmatch. attach operations for the dummy driver

Revision f8fa2e09
Added by Ruben S. Montero about 9 years ago

feature #1223: Modified Quota interface to accomodate Attach/Detach operations

Revision 75ba4597
Added by Jaime Melis about 9 years ago

feature #1223: which sudo is now evaluated in the ESX server

Revision 9c27830b
Added by Ruben S. Montero about 9 years ago

feature #1223: Release image after a successful detach/failure attach operations

Revision ce39dc51
Added by Ruben S. Montero about 9 years ago

feature #1223: Removed no-longer supported DISK/SOURCE attribute from VM_RESTRICTED_ATTR in oned.conf

Revision 04e1dd9d
Added by Carlos Martín about 9 years ago

Feature #1223: Add attach & detach methods to Java OCA

Revision 2772ba8a
Added by Jaime Melis about 9 years ago

feature #1223: Fix error messages and error handling bugs for attach_disk methods

Revision 8b0db92d
Added by Jaime Melis about 9 years ago

feature #1223: Remove DISK_ID from VMM_DRIVER_ACTION_DATA

Revision 3790a90c
Added by Jaime Melis about 9 years ago

feature #1223: Use ATTACH=YES to locate the attached/detached disk.

Revision b4bd1956
Added by Jaime Melis about 9 years ago

feature #1223: Use XPATH to parse the drv_message in the attach_disk scripts, to extract DISK attributes like BUS, DRIVER, CACHE.

Revision ca540073
Added by Jaime Melis about 9 years ago

feature #1223: Add attach_disk and detach_disk scripts to install.sh

Revision 6172aee9
Added by Ruben S. Montero about 9 years ago

feature #1223: Delete disks if an error ocurred setting up target/DISK

Revision 4f8e4a5e
Added by Jaime Melis about 9 years ago

feature #1223: Use standard opts both for file and for image in onevm attachdisk

Revision 6a3f1b67
Added by Jaime Melis about 9 years ago

feature #1223: Use attach-device instead of attach-disk for KVM. More flexible.

Revision f43779e0
Added by Jaime Melis about 9 years ago

feature #1223: Fix typos.

History

#1 Updated by Ruben S. Montero about 9 years ago

  • Assignee set to Jaime Melis

#2 Updated by Simon Boulet about 9 years ago

This patch against 3.3.80 (and 3.4.0) adds NIC hot-plug. It allows to dynamically add (and remove) NIC / Network Leases to running VMs.

I've been working on this patch since I initially asked the One-users list back end of March [1].

This patch adds two new call to the OpenNebula API: one.vm.addnic and one.vm.rmnic. Both calls take 3 parameters:

IN String The session string.
IN Int The object ID (the VM ID)
IN String template of the NIC to add (or remove), e.g. "NIC=[NETWORK_ID=1, IP=10.10.10.10]".

The addnic call does:

1- Authorize the operation (requires MANAGE access to the VM)
2- Parse passed template into a NIC description
3- Obtain auth for the requested Virtual network
4- Assign new NIC to VM (mark the IP as used by the VM in the Virtual network pool)
5- Append new NIC to VM template and Update the VM template
6- Trigger a new ADDNIC VMM action (which in turn calls a new ADDNIC VNM script)

The rmnic call does:

1- Authorize the operation (requires MANAGE access to the VM)
2- Parse passed template into a NIC description
3- Search VM template for requested NIC to be removed
4- Release IP address back into the pool
5- Remove NIC from VM template and Update the VM template
6- Trigger a new RMNIC VMM action (which in turn calls a new RMNIC VNM script)

Unfortunately, I am unable to provide any of the ADDNIC or RMNIC scripts for the existing VNMs in OpenNebula. The scripts receive the modified VM template as a base64 encoded parameter (exactly like the others VNM scripts do). One has to parse the current VNM IP addresses and the IP addresses from the template and adjust the VNM accordingly. I'd be happy to provide Xen VNM scripts if someone can provide me access to a Xen hypervisor.

I'd love to see this patch merged into the next 3.5 release. Please let me know your feedbacks / recommendations to get this patch through.

Simon

[1] http://lists.opennebula.org/pipermail/users-opennebula.org/2012-March/008326.html

#3 Updated by Ruben S. Montero about 9 years ago

Hi Simon,

THANK YOU very much for contributing this. We are working in the integration. Most of your code will go through. We are just adding some abstraction here and there to handle in a similar way NICs and DISKs

Again Thanks for this. Kudos!

#4 Updated by Ruben S. Montero about 9 years ago

  • Target version changed from Release 3.6 to Release 3.8

#5 Updated by Ruben S. Montero about 9 years ago

  • Subject changed from Hot-plugging for OpenNebula to Hot-plugging for NICs
  • Description updated (diff)

#6 Updated by Ruben S. Montero almost 9 years ago

  • Target version deleted (Release 3.8)

#7 Updated by Ruben S. Montero over 8 years ago

  • Target version set to Release 4.0

#8 Updated by Simon Boulet over 8 years ago

How can I help get this into 4.0?

#9 Updated by Ruben S. Montero over 8 years ago

  • Assignee changed from Jaime Melis to Ruben S. Montero

Hi Simon,

Thanks for your help. This is going to be scheduled for 4.0, that should be out before Christmas. We'll start working on this based on your previous patch (that is a wonderful help :). We'll post here our progress here and any question we may have. We'll probably start working on this in 3 - 4 weeks.

THANKS AGAIN for your great contribution!.

Ruben

#10 Updated by Ruben S. Montero over 8 years ago

  • Status changed from New to Closed
  • Resolution set to duplicate

Closing this and keep the work on #1691

Also available in: Atom PDF