clonebox 1.1.11__py3-none-any.whl → 1.1.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- clonebox/cli.py +35 -13
- clonebox/cloner.py +18 -10
- {clonebox-1.1.11.dist-info → clonebox-1.1.13.dist-info}/METADATA +1 -1
- {clonebox-1.1.11.dist-info → clonebox-1.1.13.dist-info}/RECORD +8 -8
- {clonebox-1.1.11.dist-info → clonebox-1.1.13.dist-info}/WHEEL +0 -0
- {clonebox-1.1.11.dist-info → clonebox-1.1.13.dist-info}/entry_points.txt +0 -0
- {clonebox-1.1.11.dist-info → clonebox-1.1.13.dist-info}/licenses/LICENSE +0 -0
- {clonebox-1.1.11.dist-info → clonebox-1.1.13.dist-info}/top_level.txt +0 -0
clonebox/cli.py
CHANGED
|
@@ -1825,23 +1825,37 @@ def cmd_test(args):
|
|
|
1825
1825
|
# Test 4: Check mounts (if running)
|
|
1826
1826
|
if not quick and state == "running":
|
|
1827
1827
|
console.print("[bold]4. Mount Points Check[/]")
|
|
1828
|
-
|
|
1829
|
-
|
|
1828
|
+
paths = config.get("paths", {})
|
|
1829
|
+
app_data_paths = config.get("app_data_paths", {})
|
|
1830
1830
|
|
|
1831
|
-
if
|
|
1831
|
+
if paths or app_data_paths:
|
|
1832
1832
|
if not _qga_ping(vm_name, conn_uri):
|
|
1833
1833
|
console.print("[yellow]⚠️ QEMU guest agent not connected - cannot verify mounts[/]")
|
|
1834
1834
|
else:
|
|
1835
|
-
|
|
1835
|
+
# Check bind mounts
|
|
1836
|
+
for idx, (host_path, guest_path) in enumerate(paths.items()):
|
|
1836
1837
|
try:
|
|
1837
1838
|
# Use the same QGA helper as diagnose/status
|
|
1838
1839
|
is_accessible = _qga_exec(
|
|
1839
1840
|
vm_name, conn_uri, f"test -d {guest_path} && echo yes || echo no", timeout=5
|
|
1840
1841
|
)
|
|
1841
1842
|
if is_accessible == "yes":
|
|
1842
|
-
console.print(f"[green]✅ {guest_path}[/]")
|
|
1843
|
+
console.print(f"[green]✅ {guest_path} (mount)[/]")
|
|
1844
|
+
else:
|
|
1845
|
+
console.print(f"[red]❌ {guest_path} (mount inaccessible)[/]")
|
|
1846
|
+
except Exception:
|
|
1847
|
+
console.print(f"[yellow]⚠️ {guest_path} (could not check)[/]")
|
|
1848
|
+
|
|
1849
|
+
# Check copied paths
|
|
1850
|
+
for idx, (host_path, guest_path) in enumerate(app_data_paths.items()):
|
|
1851
|
+
try:
|
|
1852
|
+
is_accessible = _qga_exec(
|
|
1853
|
+
vm_name, conn_uri, f"test -d {guest_path} && echo yes || echo no", timeout=5
|
|
1854
|
+
)
|
|
1855
|
+
if is_accessible == "yes":
|
|
1856
|
+
console.print(f"[green]✅ {guest_path} (copied)[/]")
|
|
1843
1857
|
else:
|
|
1844
|
-
console.print(f"[red]❌ {guest_path} (
|
|
1858
|
+
console.print(f"[red]❌ {guest_path} (copy missing)[/]")
|
|
1845
1859
|
except Exception:
|
|
1846
1860
|
console.print(f"[yellow]⚠️ {guest_path} (could not check)[/]")
|
|
1847
1861
|
else:
|
|
@@ -2521,14 +2535,22 @@ def cmd_clone(args):
|
|
|
2521
2535
|
console.print(" [cyan]clonebox-health[/] # Re-run health check")
|
|
2522
2536
|
|
|
2523
2537
|
# Show mount instructions
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2538
|
+
paths = config.get("paths", {})
|
|
2539
|
+
app_data_paths = config.get("app_data_paths", {})
|
|
2540
|
+
|
|
2541
|
+
if paths:
|
|
2542
|
+
console.print("\n[bold]📁 Mounted paths (shared live):[/]")
|
|
2543
|
+
for idx, (host, guest) in enumerate(list(paths.items())[:5]):
|
|
2544
|
+
console.print(f" [dim]{host}[/] → [cyan]{guest}[/]")
|
|
2545
|
+
if len(paths) > 5:
|
|
2546
|
+
console.print(f" [dim]... and {len(paths) - 5} more paths[/]")
|
|
2547
|
+
|
|
2548
|
+
if app_data_paths:
|
|
2549
|
+
console.print("\n[bold]📥 Copied paths (one-time import):[/]")
|
|
2550
|
+
for idx, (host, guest) in enumerate(list(app_data_paths.items())[:5]):
|
|
2529
2551
|
console.print(f" [dim]{host}[/] → [cyan]{guest}[/]")
|
|
2530
|
-
if len(
|
|
2531
|
-
console.print(f" [dim]... and {len(
|
|
2552
|
+
if len(app_data_paths) > 5:
|
|
2553
|
+
console.print(f" [dim]... and {len(app_data_paths) - 5} more paths[/]")
|
|
2532
2554
|
except PermissionError as e:
|
|
2533
2555
|
console.print(f"[red]❌ Permission Error:[/]\n{e}")
|
|
2534
2556
|
console.print("\n[yellow]💡 Try running with --user flag:[/]")
|
clonebox/cloner.py
CHANGED
|
@@ -263,13 +263,21 @@ class SelectiveVMCloner:
|
|
|
263
263
|
|
|
264
264
|
return cached_path
|
|
265
265
|
|
|
266
|
-
def
|
|
267
|
-
"""Check if libvirt default network is active."""
|
|
266
|
+
def _default_network_state(self) -> str:
|
|
268
267
|
try:
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
active = self.conn.listNetworks() or []
|
|
269
|
+
if "default" in active:
|
|
270
|
+
return "active"
|
|
271
|
+
defined = self.conn.listDefinedNetworks() or []
|
|
272
|
+
if "default" in defined:
|
|
273
|
+
return "inactive"
|
|
274
|
+
return "missing"
|
|
271
275
|
except Exception:
|
|
272
|
-
return
|
|
276
|
+
return "unknown"
|
|
277
|
+
|
|
278
|
+
def _default_network_active(self) -> bool:
|
|
279
|
+
"""Check if libvirt default network is active."""
|
|
280
|
+
return self._default_network_state() == "active"
|
|
273
281
|
|
|
274
282
|
def resolve_network_mode(self, config: VMConfig) -> str:
|
|
275
283
|
"""Resolve network mode based on config and session type."""
|
|
@@ -310,10 +318,9 @@ class SelectiveVMCloner:
|
|
|
310
318
|
)
|
|
311
319
|
|
|
312
320
|
# Check default network
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
except libvirt.libvirtError:
|
|
321
|
+
default_net_state = self._default_network_state()
|
|
322
|
+
checks["default_network"] = default_net_state == "active"
|
|
323
|
+
if default_net_state in {"inactive", "missing", "unknown"}:
|
|
317
324
|
checks["network_error"] = (
|
|
318
325
|
"Default network not found or inactive.\n"
|
|
319
326
|
" For user session, CloneBox can use user-mode networking (slirp) automatically.\n"
|
|
@@ -1404,7 +1411,8 @@ fi
|
|
|
1404
1411
|
" - chown -R 1000:1000 /home/ubuntu/.config /home/ubuntu/.cache /home/ubuntu/.local",
|
|
1405
1412
|
" - chmod 700 /home/ubuntu/.config /home/ubuntu/.cache",
|
|
1406
1413
|
" - systemctl set-default graphical.target",
|
|
1407
|
-
" - systemctl enable gdm3 || systemctl enable gdm || true",
|
|
1414
|
+
" - systemctl enable --now gdm3 || systemctl enable --now gdm || true",
|
|
1415
|
+
" - systemctl start display-manager || true",
|
|
1408
1416
|
]
|
|
1409
1417
|
)
|
|
1410
1418
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
clonebox/__init__.py,sha256=CyfHVVq6KqBr4CNERBpXk_O6Q5B35q03YpdQbokVvvI,408
|
|
2
2
|
clonebox/__main__.py,sha256=Fcoyzwwyz5-eC_sBlQk5a5RbKx8uodQz5sKJ190U0NU,135
|
|
3
|
-
clonebox/cli.py,sha256=
|
|
4
|
-
clonebox/cloner.py,sha256=
|
|
3
|
+
clonebox/cli.py,sha256=CcqJgVH-hSGm4FXTuJCWniocKnAeQayhPPO17nxK578,139009
|
|
4
|
+
clonebox/cloner.py,sha256=3ZL_F-GTMT38cJ0-mgz-ESG7Ioa-1tEYPjdoSBS4lP0,96633
|
|
5
5
|
clonebox/container.py,sha256=tiYK1ZB-DhdD6A2FuMA0h_sRNkUI7KfYcJ0tFOcdyeM,6105
|
|
6
6
|
clonebox/dashboard.py,sha256=dMY6odvPq3j6FronhRRsX7aY3qdCwznB-aCWKEmHDNw,5768
|
|
7
7
|
clonebox/detector.py,sha256=vS65cvFNPmUBCX1Y_TMTnSRljw6r1Ae9dlVtACs5XFc,23075
|
|
@@ -34,9 +34,9 @@ clonebox/snapshots/manager.py,sha256=hGzM8V6ZJPXjTqj47c4Kr8idlE-c1Q3gPUvuw1HvS1A
|
|
|
34
34
|
clonebox/snapshots/models.py,sha256=sRnn3OZE8JG9FZJlRuA3ihO-JXoPCQ3nD3SQytflAao,6206
|
|
35
35
|
clonebox/templates/profiles/ml-dev.yaml,sha256=w07MToGh31xtxpjbeXTBk9BkpAN8A3gv8HeA3ESKG9M,461
|
|
36
36
|
clonebox/templates/profiles/web-stack.yaml,sha256=EBnnGMzML5vAjXmIUbCpbTCwmRaNJiuWd3EcL43DOK8,485
|
|
37
|
-
clonebox-1.1.
|
|
38
|
-
clonebox-1.1.
|
|
39
|
-
clonebox-1.1.
|
|
40
|
-
clonebox-1.1.
|
|
41
|
-
clonebox-1.1.
|
|
42
|
-
clonebox-1.1.
|
|
37
|
+
clonebox-1.1.13.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
38
|
+
clonebox-1.1.13.dist-info/METADATA,sha256=-lAcuKp05h-8MuuwAq5aj0FPwGwOJfntQfQ_NZrcSts,48916
|
|
39
|
+
clonebox-1.1.13.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
40
|
+
clonebox-1.1.13.dist-info/entry_points.txt,sha256=FES95Vi3btfViLEEoHdb8nikNxTqzaooi9ehZw9ZfWI,47
|
|
41
|
+
clonebox-1.1.13.dist-info/top_level.txt,sha256=LdMo2cvCrEcRGH2M8JgQNVsCoszLV0xug6kx1JnaRjo,9
|
|
42
|
+
clonebox-1.1.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|