Zmiana typu interfejsu w VMware Workstation

W większości niestandardowych systemów takich jak np. FreeNAS VMware Workstation przy tworzeniu maszyny tworzy interfejs(y) sieciowe wykorzystując domyślnie sterownik e1000, który pozwala na wyciągnięcie 1 Gbit/s po stworzeniu sieci pomiędzy maszynami wirtualnymi/hostem. To jest problem, bo czasami jeśli chce się zrobić testy na iSCSI, sprzęt mamy wydajny i coś wolno działa. Generalnie ten sterownik jest problemem i jest proste rozwiązanie na zmianę tego sterownika na wydajny vmxnet3, który pozwala na wyciągnięcie na luzie 10 Gbit/s. Problem w tym, że nie każdy system to wspiera. W moim przypadku wiem, że wspiera.

Rozwiązanie jest proste: wystarczy znaleźć plik o formacie *.vmx dla naszej maszyny wirtualnej (w moim przypadku jest to maszyna freenas.vmx, edytować plik i zmienić zmienną ethernetX.virtualDev = "e1000" (X – numer interfejsu sieciowego) na ethernetX.virtualDev = "vmxnet3". To załatwia sprawę, ale trzeba pamiętać, że system wykryje te interfejsy jako nowe przechowując nadal starą konfigurację, więc trzeba się upewnić, że nie ma się w swoim systemie przypisanych żadnych ustawień do tych „starych” interfejsów.

Przykład pliku VMX przed:

.encoding = "windows-1250"
config.version = "8"
virtualHW.version = "18"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
hpet0.present = "TRUE"
nvram = "freenas.nvram"
virtualHW.productCompatibility = "hosted"
powerType.powerOff = "soft"
powerType.powerOn = "soft"
powerType.suspend = "soft"
powerType.reset = "soft"
displayName = "freenas"
guestOS = "freebsd-64"
tools.syncTime = "FALSE"
sound.autoDetect = "TRUE"
sound.fileName = "-1"
sound.present = "TRUE"
numvcpus = "8"
cpuid.coresPerSocket = "8"
memsize = "8192"
nvme0.present = "TRUE"
nvme0:0.fileName = "freenas.vmdk"
ide1:0.deviceType = "cdrom-image"
ide1:0.fileName = "V:\Roboczy!\ISO i appliance\TrueNAS-12.0-RELEASE.iso"
ide1:0.present = "TRUE"
usb.present = "TRUE"
ehci.present = "TRUE"
ethernet0.connectionType = "custom"
ethernet0.addressType = "generated"
ethernet0.vnet = "VMnet2"
ethernet0.displayName = "VMnet2"
ethernet0.virtualDev = "e1000"
ethernet4.connectionType = "custom"
ethernet4.addressType = "generated"
ethernet4.vnet = "VMnet6"
ethernet4.displayName = "VMnet6"
ethernet4.virtualDev = "e1000"
ethernet3.connectionType = "custom"
ethernet3.addressType = "generated"
ethernet3.vnet = "VMnet5"
ethernet3.displayName = "VMnet5"
ethernet3.virtualDev = "e1000"
ethernet2.connectionType = "custom"
ethernet2.addressType = "generated"
ethernet2.vnet = "VMnet4"
ethernet2.displayName = "VMnet4"
ethernet2.virtualDev = "e1000"
ethernet1.connectionType = "custom"
ethernet1.addressType = "generated"
ethernet1.vnet = "VMnet3"
ethernet1.displayName = "VMnet3"
ethernet1.virtualDev = "e1000"
ethernet0.present = "TRUE"
ethernet4.present = "TRUE"
ethernet3.present = "TRUE"
ethernet2.present = "TRUE"
ethernet1.present = "TRUE"
extendedConfigFile = "freenas.vmxf"
floppy0.present = "FALSE"
numa.autosize.cookie = "80082"
numa.autosize.vcpu.maxPerVirtualNode = "8"
uuid.bios = "56 4d 91 60 c6 03 50 e2-04 21 ed b1 0e 01 c7 7b"
uuid.location = "56 4d 91 60 c6 03 50 e2-04 21 ed b1 0e 01 c7 7b"
nvme0:0.redo = ""
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
usb.pciSlotNumber = "32"
ethernet0.pciSlotNumber = "192"
ethernet1.pciSlotNumber = "224"
ethernet2.pciSlotNumber = "256"
ethernet3.pciSlotNumber = "1184"
ethernet4.pciSlotNumber = "1216"
sound.pciSlotNumber = "38"
ehci.pciSlotNumber = "39"
vmci0.pciSlotNumber = "40"
nvme0.pciSlotNumber = "160"
svga.vramSize = "268435456"
vmotion.checkpointFBSize = "134217728"
vmotion.checkpointSVGAPrimarySize = "268435456"
vmotion.svga.mobMaxSize = "268435456"
vmotion.svga.graphicsMemoryKB = "262144"
ethernet0.generatedAddress = "00:0c:29:01:c7:7b"
ethernet0.generatedAddressOffset = "0"
ethernet1.generatedAddress = "00:0c:29:01:c7:85"
ethernet1.generatedAddressOffset = "10"
ethernet2.generatedAddress = "00:0C:29:01:C7:8F"
ethernet2.generatedAddressOffset = "20"
ethernet3.generatedAddress = "00:0C:29:01:C7:99"
ethernet3.generatedAddressOffset = "30"
ethernet4.generatedAddress = "00:0C:29:01:C7:A3"
ethernet4.generatedAddressOffset = "40"
vmci0.id = "234997627"
monitor.phys_bits_used = "45"
cleanShutdown = "TRUE"
softPowerOff = "TRUE"
usb:1.speed = "2"
usb:1.present = "TRUE"
usb:1.deviceType = "hub"
usb:1.port = "1"
usb:1.parent = "-1"
nvme0:4.fileName = "freenas-3.vmdk"
nvme0:1.fileName = "freenas-2.vmdk"
nvme0:3.fileName = "freenas-2.vmdk"
nvme0:2.fileName = "freenas-1.vmdk"
nvme0:2.redo = ""
nvme0:3.redo = ""
nvme0:1.redo = ""
nvme0:4.redo = ""
guestOS.detailed.data = "bitness='64' distroName='FreeBSD' familyName='FreeBSD' kernelVersion='12.2-RC3'"
checkpoint.vmState = ""
scsi0.virtualDev = "lsilogic"
scsi0.present = "TRUE"
scsi0:2.fileName = "freenas-1.vmdk"
scsi0:3.fileName = "freenas-2.vmdk"
scsi0:0.fileName = "freenas.vmdk"
scsi0:1.fileName = "freenas-0.vmdk"
scsi0:2.redo = ""
scsi0:1.redo = ""
scsi0:3.redo = ""
scsi0:0.redo = ""
scsi0.pciSlotNumber = "16"
scsi0:0.present = "TRUE"
ide1:0.startConnected = "FALSE"
scsi0:3.present = "TRUE"
scsi0:4.fileName = "freenas-3.vmdk"
scsi0:4.present = "TRUE"
scsi0:1.present = "TRUE"
scsi0:2.present = "TRUE"
scsi0:4.redo = ""
usb:0.present = "TRUE"
usb:0.deviceType = "hid"
usb:0.port = "0"
usb:0.parent = "-1"

Po zmianach:

.encoding = "windows-1250"
config.version = "8"
virtualHW.version = "18"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
hpet0.present = "TRUE"
nvram = "freenas.nvram"
virtualHW.productCompatibility = "hosted"
powerType.powerOff = "soft"
powerType.powerOn = "soft"
powerType.suspend = "soft"
powerType.reset = "soft"
displayName = "freenas"
guestOS = "freebsd-64"
tools.syncTime = "FALSE"
sound.autoDetect = "TRUE"
sound.fileName = "-1"
sound.present = "TRUE"
numvcpus = "8"
cpuid.coresPerSocket = "8"
memsize = "8192"
nvme0.present = "TRUE"
nvme0:0.fileName = "freenas.vmdk"
ide1:0.deviceType = "cdrom-image"
ide1:0.fileName = "V:\Roboczy!\ISO i appliance\TrueNAS-12.0-RELEASE.iso"
ide1:0.present = "TRUE"
usb.present = "TRUE"
ehci.present = "TRUE"
ethernet0.connectionType = "custom"
ethernet0.addressType = "generated"
ethernet0.vnet = "VMnet2"
ethernet0.displayName = "VMnet2"
ethernet0.virtualDev = "vmxnet3"
ethernet4.connectionType = "custom"
ethernet4.addressType = "generated"
ethernet4.vnet = "VMnet6"
ethernet4.displayName = "VMnet6"
ethernet4.virtualDev = "vmxnet3"
ethernet3.connectionType = "custom"
ethernet3.addressType = "generated"
ethernet3.vnet = "VMnet5"
ethernet3.displayName = "VMnet5"
ethernet3.virtualDev = "vmxnet3"
ethernet2.connectionType = "custom"
ethernet2.addressType = "generated"
ethernet2.vnet = "VMnet4"
ethernet2.displayName = "VMnet4"
ethernet2.virtualDev = "vmxnet3"
ethernet1.connectionType = "custom"
ethernet1.addressType = "generated"
ethernet1.vnet = "VMnet3"
ethernet1.displayName = "VMnet3"
ethernet1.virtualDev = "vmxnet3"
ethernet0.present = "TRUE"
ethernet4.present = "TRUE"
ethernet3.present = "TRUE"
ethernet2.present = "TRUE"
ethernet1.present = "TRUE"
extendedConfigFile = "freenas.vmxf"
floppy0.present = "FALSE"
numa.autosize.cookie = "80082"
numa.autosize.vcpu.maxPerVirtualNode = "8"
uuid.bios = "56 4d 91 60 c6 03 50 e2-04 21 ed b1 0e 01 c7 7b"
uuid.location = "56 4d 91 60 c6 03 50 e2-04 21 ed b1 0e 01 c7 7b"
nvme0:0.redo = ""
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
usb.pciSlotNumber = "32"
ethernet0.pciSlotNumber = "33"
ethernet1.pciSlotNumber = "34"
ethernet2.pciSlotNumber = "35"
ethernet3.pciSlotNumber = "36"
ethernet4.pciSlotNumber = "37"
sound.pciSlotNumber = "38"
ehci.pciSlotNumber = "39"
vmci0.pciSlotNumber = "40"
nvme0.pciSlotNumber = "160"
svga.vramSize = "268435456"
vmotion.checkpointFBSize = "134217728"
vmotion.checkpointSVGAPrimarySize = "268435456"
vmotion.svga.mobMaxSize = "268435456"
vmotion.svga.graphicsMemoryKB = "262144"
ethernet0.generatedAddress = "00:0c:29:01:c7:7b"
ethernet0.generatedAddressOffset = "0"
ethernet1.generatedAddress = "00:0c:29:01:c7:85"
ethernet1.generatedAddressOffset = "10"
ethernet2.generatedAddress = "00:0C:29:01:C7:8F"
ethernet2.generatedAddressOffset = "20"
ethernet3.generatedAddress = "00:0C:29:01:C7:99"
ethernet3.generatedAddressOffset = "30"
ethernet4.generatedAddress = "00:0C:29:01:C7:A3"
ethernet4.generatedAddressOffset = "40"
vmci0.id = "234997627"
monitor.phys_bits_used = "45"
cleanShutdown = "TRUE"
softPowerOff = "TRUE"
usb:1.speed = "2"
usb:1.present = "TRUE"
usb:1.deviceType = "hub"
usb:1.port = "1"
usb:1.parent = "-1"
nvme0:4.fileName = "freenas-3.vmdk"
nvme0:1.fileName = "freenas-2.vmdk"
nvme0:3.fileName = "freenas-2.vmdk"
nvme0:2.fileName = "freenas-1.vmdk"
nvme0:2.redo = ""
nvme0:3.redo = ""
nvme0:1.redo = ""
nvme0:4.redo = ""
guestOS.detailed.data = "bitness='64' distroName='FreeBSD' familyName='FreeBSD' kernelVersion='12.2-RC3'"
checkpoint.vmState = ""
scsi0.virtualDev = "lsilogic"
scsi0.present = "TRUE"
scsi0:2.fileName = "freenas-1.vmdk"
scsi0:3.fileName = "freenas-2.vmdk"
scsi0:0.fileName = "freenas.vmdk"
scsi0:1.fileName = "freenas-0.vmdk"
scsi0:2.redo = ""
scsi0:1.redo = ""
scsi0:3.redo = ""
scsi0:0.redo = ""
scsi0.pciSlotNumber = "16"
scsi0:0.present = "TRUE"
ide1:0.startConnected = "FALSE"
scsi0:3.present = "TRUE"
scsi0:4.fileName = "freenas-3.vmdk"
scsi0:4.present = "TRUE"
scsi0:1.present = "TRUE"
scsi0:2.present = "TRUE"
scsi0:4.redo = ""
usb:0.present = "TRUE"
usb:0.deviceType = "hid"
usb:0.port = "0"
usb:0.parent = "-1"

Tak wyglądają prędkości po zmianie w iperf:

Dodaj komentarz

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są oznaczone *