clanCore: init machine_id.nix with clan.core.machine.{id,diskId}
This commit is contained in:
@@ -46,7 +46,7 @@ def wait_vm_up(machine_name: str, flake_url: str | None = None) -> None:
|
||||
if flake_url is None:
|
||||
flake_url = str(Path.cwd())
|
||||
socket_file = vm_state_dir(flake_url, machine_name) / "qmp.sock"
|
||||
timeout: float = 600
|
||||
timeout: float = 1200 # in seconds
|
||||
while True:
|
||||
if timeout <= 0:
|
||||
msg = f"qmp socket {socket_file} not found. Is the VM running?"
|
||||
@@ -62,7 +62,7 @@ def wait_vm_down(machine_name: str, flake_url: str | None = None) -> None:
|
||||
if flake_url is None:
|
||||
flake_url = str(Path.cwd())
|
||||
socket_file = vm_state_dir(flake_url, machine_name) / "qmp.sock"
|
||||
timeout: float = 300
|
||||
timeout: float = 600
|
||||
while socket_file.exists():
|
||||
if timeout <= 0:
|
||||
msg = f"qmp socket {socket_file} still exists. Is the VM down?"
|
||||
|
||||
@@ -112,15 +112,15 @@ const InstallMachine = (props: InstallMachineProps) => {
|
||||
e.preventDefault();
|
||||
const curr_uri = activeURI();
|
||||
const disk = getValue(formStore, "disk");
|
||||
const disk_id = props.disks.find((d) => d.name === disk)?.id_link;
|
||||
if (!curr_uri || !disk_id || !props.name) {
|
||||
const diskId = props.disks.find((d) => d.name === disk)?.id_link;
|
||||
if (!curr_uri || !diskId || !props.name) {
|
||||
return;
|
||||
}
|
||||
|
||||
const r = await callApi("set_single_disk_uuid", {
|
||||
base_path: curr_uri,
|
||||
machine_name: props.name,
|
||||
disk_uuid: disk_id,
|
||||
disk_uuid: diskId,
|
||||
});
|
||||
if (r.status === "error") {
|
||||
toast.error("Failed to set disk");
|
||||
|
||||
Reference in New Issue
Block a user