Revision ed6d006b
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
1007 | 1007 |
"""Removes an instance's rutime sockets/files/dirs. |
1008 | 1008 |
|
1009 | 1009 |
""" |
1010 |
# This takes info from NICDir and RuntimeFile |
|
1011 |
cls._UnconfigureInstanceNICs(instance_name) |
|
1010 | 1012 |
utils.RemoveFile(pidfile) |
1011 | 1013 |
utils.RemoveFile(cls._InstanceMonitor(instance_name)) |
1012 | 1014 |
utils.RemoveFile(cls._InstanceSerial(instance_name)) |
... | ... | |
2231 | 2233 |
elif dev_type == constants.HOTPLUG_TARGET_NIC: |
2232 | 2234 |
cmds = ["device_del %s" % kvm_devid] |
2233 | 2235 |
cmds += ["netdev_del %s" % kvm_devid] |
2234 |
utils.RemoveFile(self._InstanceNICFile(instance.name, seq)) |
|
2236 |
self._UnconfigureNic(instance.name, kvm_device, False) |
|
2237 |
self._RemoveInstanceNICFiles(instance.name, seq, device) |
|
2235 | 2238 |
self._CallHotplugCommands(instance.name, cmds) |
2236 | 2239 |
self._VerifyHotplugCommand(instance.name, kvm_device, dev_type, False) |
2237 | 2240 |
index = _DEVICE_RUNTIME_INDEX[dev_type] |
... | ... | |
2459 | 2462 |
|
2460 | 2463 |
self._WriteKVMRuntime(instance.name, info) |
2461 | 2464 |
else: |
2465 |
self._UnconfigureInstanceNICs(instance.name, info) |
|
2462 | 2466 |
self.StopInstance(instance, force=True) |
2463 | 2467 |
|
2464 | 2468 |
def MigrateInstance(self, instance, target, live): |
Also available in: Unified diff