cloud-hypervisor sockets: use spectrum names
- CONNECT.sock → vsock.sock - ch.sock → vmm.sock
This commit is contained in:
parent
61dd3938aa
commit
6d710952ee
4 changed files with 8 additions and 8 deletions
|
|
@ -41,7 +41,7 @@ char *extract_uvm(const char *host_string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
char *result;
|
char *result;
|
||||||
if (asprintf(&result, "%s/uvms/%s/CONNECT.sock", home, &host_string[PREFIX_LEN]) == -1) {
|
if (asprintf(&result, "%s/uvms/%s/vsock.sock", home, &host_string[PREFIX_LEN]) == -1) {
|
||||||
perror("ch-proxy/extract_uvm");
|
perror("ch-proxy/extract_uvm");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
@ -59,7 +59,7 @@ char *extract_muvm(const char *host_string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
char *result;
|
char *result;
|
||||||
if (asprintf(&result, "/var/lib/microvms/%s/CONNECT.sock", &host_string[PREFIX_LEN]) == -1) {
|
if (asprintf(&result, "/var/lib/microvms/%s/vsock.sock", &host_string[PREFIX_LEN]) == -1) {
|
||||||
perror("ch-proxy/extract_muvm");
|
perror("ch-proxy/extract_muvm");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@ in
|
||||||
"--cmdline=${lib.concatStringsSep " " cfg.cmdline}"
|
"--cmdline=${lib.concatStringsSep " " cfg.cmdline}"
|
||||||
"--kernel=${config.boot.kernelPackages.kernel}/${pkgs.stdenv.hostPlatform.linux-kernel.target}"
|
"--kernel=${config.boot.kernelPackages.kernel}/${pkgs.stdenv.hostPlatform.linux-kernel.target}"
|
||||||
"--initramfs=${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}"
|
"--initramfs=${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}"
|
||||||
"--vsock=cid=4,socket=CONNECT.sock"
|
"--vsock=cid=4,socket=vsock.sock"
|
||||||
"--api-socket=ch.sock"
|
"--api-socket=vmm.sock"
|
||||||
"--serial=tty"
|
"--serial=tty"
|
||||||
"--console=null"
|
"--console=null"
|
||||||
"--watchdog"
|
"--watchdog"
|
||||||
|
|
@ -69,7 +69,7 @@ in
|
||||||
mkdir -p "$HOME/uvms/$GUESTNAME"
|
mkdir -p "$HOME/uvms/$GUESTNAME"
|
||||||
cd "$HOME/uvms/$GUESTNAME"
|
cd "$HOME/uvms/$GUESTNAME"
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm "$HOME/uvms/$GUESTNAME"/{ch,CONNECT}.sock
|
rm "$HOME/uvms/$GUESTNAME"/{vmm,vsock}.sock
|
||||||
}
|
}
|
||||||
exec -a "uuvm/$GUESTNAME" "''${args[@]}"
|
exec -a "uuvm/$GUESTNAME" "''${args[@]}"
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,8 @@ in
|
||||||
];
|
];
|
||||||
systemd.services."microvm@".serviceConfig.ExecStartPost = [
|
systemd.services."microvm@".serviceConfig.ExecStartPost = [
|
||||||
(pkgs.writeShellScript "microvm-fix-umask" ''
|
(pkgs.writeShellScript "microvm-fix-umask" ''
|
||||||
if [[ -e CONNECT.sock ]] ; then
|
if [[ -e vsock.sock ]] ; then
|
||||||
chmod g+rw CONNECT.sock
|
chmod g+rw vsock.sock
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ in
|
||||||
(mkIfGuest {
|
(mkIfGuest {
|
||||||
microvm.cloud-hypervisor.extraArgs = [
|
microvm.cloud-hypervisor.extraArgs = [
|
||||||
"--vsock"
|
"--vsock"
|
||||||
"cid=4,socket=CONNECT.sock"
|
"cid=4,socket=vsock.sock"
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue