Guest User

vif hotplug fix

a guest
Aug 28th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
  2. index 007cd28..9385e3a 100755
  3. --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
  4. +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
  5. @@ -1250,12 +1250,12 @@ public class LibvirtComputingResource extends ServerResourceBase implements
  6. if (nic.getBrName().equalsIgnoreCase(_linkLocalBridgeName)) {
  7. vlanAllocatedToVM.put("LinkLocal", nicPos);
  8. } else {
  9. - String vlanId = getVlanIdFromBridge(nic.getBrName());
  10. - if (vlanId != null) {
  11. - vlanAllocatedToVM.put(vlanId, nicPos);
  12. - } else {
  13. - vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos);
  14. - }
  15. + if (nic.getBrName().equalsIgnoreCase(_publicBridgeName) || nic.getBrName().equalsIgnoreCase(_privBridgeName) || nic.getBrName().equalsIgnoreCase(_guestBridgeName)) {
  16. + vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos);
  17. + } else {
  18. + String vlanId = getVlanIdFromBridge(nic.getBrName());
  19. + vlanAllocatedToVM.put(vlanId, nicPos);
  20. + }
  21. }
  22. nicPos++;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment