Skip to content

Commit 75fac66

Browse files
authored
fix(ovm,darwin): cannot launch ovm in darwin (#195)
Signed-off-by: Kevin Cui <bh@bugs.cc>
1 parent af2ea17 commit 75fac66

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/darwin.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ export class DarwinOVM extends RequestDarwin {
9696

9797
const ovmBin = resource("ovm", this.options.resource);
9898
const ovmArgs = [
99-
"machine",
10099
"init",
101100
"--cpus", String(this.options.cpu),
102101
"--memory", String(this.options.memory),
@@ -107,7 +106,7 @@ export class DarwinOVM extends RequestDarwin {
107106
"--workspace", this.options.workspace,
108107
"--ppid", String(this.options.bindPID),
109108
"--volume", "/Users:/Users",
110-
"default",
109+
"-name", "default",
111110
];
112111

113112
for (const item of this.options.appendVolume || []) {
@@ -158,12 +157,11 @@ export class DarwinOVM extends RequestDarwin {
158157

159158
const ovmBin = resource("ovm", this.options.resource);
160159
const ovmArgs = [
161-
"machine",
162160
"start",
163161
"--report-url", `unix://${this.restfulWithRun}`,
164162
"--workspace", this.options.workspace,
165163
"--ppid", String(this.options.bindPID),
166-
"default",
164+
"-name", "default",
167165
];
168166

169167
if (enableDebug()) {

src/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ type RequestDarwinRawInfoResp = {
125125

126126
export class RequestDarwin extends Request {
127127
public constructor(workspace: string) {
128-
super(path.join(workspace, "socks", "ovm_restapi.socks"), "http://ovm/default/");
128+
super(path.join(workspace, "socks", "ovm_restapi.socks"), "http://ovm/");
129129
}
130130

131131
public async info(): Promise<OVMDarwinInfo> {

0 commit comments

Comments
 (0)