Lines Matching +full:rootfs +full:- +full:x86_64
2 # Use of this source code is governed by a BSD-style license that can be
22 Arch = Literal["x86_64", "aarch64"]
42 ["cargo", "metadata", "--no-deps", "--format-version=1"],
68 return f"base-{arch}-{BASE_IMG_VERSION}.qcow2"
80 return data_dir(arch).joinpath(f"rootfs-{arch}-{BASE_IMG_VERSION}.qcow2")
83 def ssh_port(arch: Arch) -> int:
92 qemu_img = cmd("qemu-img")
97 "x86_64": 9000,
103 "-display none",
104 "-device virtio-net-pci,netdev=net0",
105 "-smp 8",
106 "-m 4G",
111 "x86_64": cmd(
112 "qemu-system-x86_64",
113 "-cpu host",
114 "-enable-kvm" if KVM_SUPPORT else None,
118 "qemu-system-aarch64",
119 "-M virt",
120 "-machine virt,virtualization=true,gic-version=3",
121 "-cpu cortex-a57",
122 "-bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd",
128 def ssh_opts(arch: Arch) -> Dict[str, str]:
140 return [f"-o{k}={v}" for k, v in ssh_opts(arch).items()]
148 *(["-T", cmd] if cmd else []),
157 "-oConnectTimeout=1",
158 "-T exit",
203 f"-hda {hda}",
204 f"-serial {serial}",
205 f"-netdev user,id=net0,hostfwd=tcp::{port}-:22",
282 # The rootfs is backed by the base image generated above. So we can
283 # easily reset to a clean VM by rebuilding an empty rootfs image.
284 print(f"Creating {arch} rootfs overlay...")
287 "-f qcow2",
288 "-F qcow2",
289 f"-b {base_img}",
338 while (time.time() - start_time) < timeout: