Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Ensure that vm-console uses the correct NMDM side
Browse files Browse the repository at this point in the history
Fix: #33
  • Loading branch information
io7m committed Jul 30, 2020
1 parent 01a036e commit d1f9034
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Expand Up @@ -76,6 +76,7 @@
import static com.io7m.waxmill.machines.WXMBootConfigurationType.WXMEvaluatedBootConfigurationType;
import static com.io7m.waxmill.machines.WXMDeviceType.WXMDeviceVirtioNetworkType.WXMTTYBackendType;
import static com.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendType;
import static com.io7m.waxmill.machines.WXMTTYBackends.NMDMSide.NMDM_GUEST;
import static com.io7m.waxmill.machines.WXMTTYBackends.NMDMSide.NMDM_HOST;
import static com.io7m.waxmill.machines.WXMTTYBackends.nmdmPath;

Expand Down Expand Up @@ -743,7 +744,7 @@ private void configureBhyveDeviceLPCBackend(
.mountPoint()
.getFileSystem(),
this.machine.id(),
NMDM_HOST
NMDM_GUEST
)
));
break;
Expand Down
Expand Up @@ -50,6 +50,7 @@
import java.util.TreeSet;
import java.util.stream.Collectors;

import static com.io7m.waxmill.machines.WXMTTYBackends.NMDMSide.NMDM_GUEST;
import static com.io7m.waxmill.machines.WXMTTYBackends.NMDMSide.NMDM_HOST;
import static com.io7m.waxmill.machines.WXMTTYBackends.nmdmPath;

Expand Down Expand Up @@ -208,7 +209,7 @@ private static void processLPC(
.mountPoint()
.getFileSystem(),
machine.id(),
NMDM_HOST
NMDM_GUEST
);
others.add(path);
nmdmPaths.add(path);
Expand Down
Expand Up @@ -1418,7 +1418,7 @@ public void linuxLPC()
final var lastExec = commands.lastExecution().orElseThrow();
assertEquals(
String.format(
"/usr/sbin/bhyve -U %s -P -A -w -H -c cpus=1,sockets=1,cores=1,threads=1 -m 512M -s 0:0:0,hostbridge -s 0:1:0,ahci-hd,/tmp/file -s 0:2:0,lpc -l bootrom,/tmp/rom -l com1,/dev/nmdm_%s_B -l com2,stdio %s",
"/usr/sbin/bhyve -U %s -P -A -w -H -c cpus=1,sockets=1,cores=1,threads=1 -m 512M -s 0:0:0,hostbridge -s 0:1:0,ahci-hd,/tmp/file -s 0:2:0,lpc -l bootrom,/tmp/rom -l com1,/dev/nmdm_%s_A -l com2,stdio %s",
machine.id(),
machine.id(),
WXMShortIDs.encode(machine.id())),
Expand Down

0 comments on commit d1f9034

Please sign in to comment.