Fixes issue with packet capture on VMware VMs. Fixes #396.

pull/416/head
grossmj 9 years ago
parent 39ddc4e8c1
commit 2e05290206

@ -375,6 +375,8 @@ class VMwareVM(BaseVM):
vnet = "ethernet{}.vnet".format(adapter_number) vnet = "ethernet{}.vnet".format(adapter_number)
if vnet not in self._vmx_pairs: if vnet not in self._vmx_pairs:
raise VMwareError("vnet {} not in VMX file".format(vnet)) raise VMwareError("vnet {} not in VMX file".format(vnet))
if not self._ubridge_hypervisor:
raise VMwareError("Cannot start the packet capture: uBridge is not running")
yield from self._ubridge_hypervisor.send('bridge start_capture {name} "{output_file}"'.format(name=vnet, yield from self._ubridge_hypervisor.send('bridge start_capture {name} "{output_file}"'.format(name=vnet,
output_file=output_file)) output_file=output_file))
@ -389,6 +391,8 @@ class VMwareVM(BaseVM):
vnet = "ethernet{}.vnet".format(adapter_number) vnet = "ethernet{}.vnet".format(adapter_number)
if vnet not in self._vmx_pairs: if vnet not in self._vmx_pairs:
raise VMwareError("vnet {} not in VMX file".format(vnet)) raise VMwareError("vnet {} not in VMX file".format(vnet))
if not self._ubridge_hypervisor:
raise VMwareError("Cannot stop the packet capture: uBridge is not running")
yield from self._ubridge_hypervisor.send("bridge stop_capture {name}".format(name=vnet)) yield from self._ubridge_hypervisor.send("bridge stop_capture {name}".format(name=vnet))
def check_hw_virtualization(self): def check_hw_virtualization(self):

Loading…
Cancel
Save