esx: Add VMCI device for virtualHW >= 7

This patch fixes an issue where vMotion fails when VMCI device is not
present in the vmx file.
This commit is contained in:
Dawid Zamirski 2016-05-23 17:22:54 -04:00 committed by Matthias Bolte
parent 2b89f1d8f5
commit 5b36410f37
6 changed files with 23 additions and 14 deletions

View File

@ -3383,24 +3383,28 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virDomainDe
goto cleanup; goto cleanup;
} }
if (virtualHW_version >= 7 && hasSCSI) { if (virtualHW_version >= 7) {
virBufferAddLit(&buffer, "pciBridge0.present = \"true\"\n"); if (hasSCSI) {
virBufferAddLit(&buffer, "pciBridge0.present = \"true\"\n");
virBufferAddLit(&buffer, "pciBridge4.present = \"true\"\n"); virBufferAddLit(&buffer, "pciBridge4.present = \"true\"\n");
virBufferAddLit(&buffer, "pciBridge4.virtualDev = \"pcieRootPort\"\n"); virBufferAddLit(&buffer, "pciBridge4.virtualDev = \"pcieRootPort\"\n");
virBufferAddLit(&buffer, "pciBridge4.functions = \"8\"\n"); virBufferAddLit(&buffer, "pciBridge4.functions = \"8\"\n");
virBufferAddLit(&buffer, "pciBridge5.present = \"true\"\n"); virBufferAddLit(&buffer, "pciBridge5.present = \"true\"\n");
virBufferAddLit(&buffer, "pciBridge5.virtualDev = \"pcieRootPort\"\n"); virBufferAddLit(&buffer, "pciBridge5.virtualDev = \"pcieRootPort\"\n");
virBufferAddLit(&buffer, "pciBridge5.functions = \"8\"\n"); virBufferAddLit(&buffer, "pciBridge5.functions = \"8\"\n");
virBufferAddLit(&buffer, "pciBridge6.present = \"true\"\n"); virBufferAddLit(&buffer, "pciBridge6.present = \"true\"\n");
virBufferAddLit(&buffer, "pciBridge6.virtualDev = \"pcieRootPort\"\n"); virBufferAddLit(&buffer, "pciBridge6.virtualDev = \"pcieRootPort\"\n");
virBufferAddLit(&buffer, "pciBridge6.functions = \"8\"\n"); virBufferAddLit(&buffer, "pciBridge6.functions = \"8\"\n");
virBufferAddLit(&buffer, "pciBridge7.present = \"true\"\n"); virBufferAddLit(&buffer, "pciBridge7.present = \"true\"\n");
virBufferAddLit(&buffer, "pciBridge7.virtualDev = \"pcieRootPort\"\n"); virBufferAddLit(&buffer, "pciBridge7.virtualDev = \"pcieRootPort\"\n");
virBufferAddLit(&buffer, "pciBridge7.functions = \"8\"\n"); virBufferAddLit(&buffer, "pciBridge7.functions = \"8\"\n");
}
virBufferAddLit(&buffer, "vmci0.present = \"true\"\n");
} }
/* Get final VMX output */ /* Get final VMX output */

View File

@ -41,3 +41,4 @@ pciBridge6.functions = "8"
pciBridge7.present = "true" pciBridge7.present = "true"
pciBridge7.virtualDev = "pcieRootPort" pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8" pciBridge7.functions = "8"
vmci0.present = "true"

View File

@ -13,3 +13,4 @@ serial0.fileType = "network"
serial0.fileName = "tcp://192.168.0.17:42001" serial0.fileName = "tcp://192.168.0.17:42001"
serial0.network.endPoint = "client" serial0.network.endPoint = "client"
serial0.yieldOnMsrRead = "true" serial0.yieldOnMsrRead = "true"
vmci0.present = "true"

View File

@ -13,3 +13,4 @@ serial0.fileType = "network"
serial0.fileName = "ssl://0.0.0.0:42001" serial0.fileName = "ssl://0.0.0.0:42001"
serial0.network.endPoint = "server" serial0.network.endPoint = "server"
serial0.yieldOnMsrRead = "true" serial0.yieldOnMsrRead = "true"
vmci0.present = "true"

View File

@ -33,3 +33,4 @@ pciBridge6.functions = "8"
pciBridge7.present = "true" pciBridge7.present = "true"
pciBridge7.virtualDev = "pcieRootPort" pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8" pciBridge7.functions = "8"
vmci0.present = "true"

View File

@ -33,3 +33,4 @@ pciBridge6.functions = "8"
pciBridge7.present = "true" pciBridge7.present = "true"
pciBridge7.virtualDev = "pcieRootPort" pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8" pciBridge7.functions = "8"
vmci0.present = "true"