clonebox 0.1.24__tar.gz → 0.1.25__tar.gz
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-0.1.24/src/clonebox.egg-info → clonebox-0.1.25}/PKG-INFO +4 -2
- {clonebox-0.1.24 → clonebox-0.1.25}/README.md +3 -1
- {clonebox-0.1.24 → clonebox-0.1.25}/pyproject.toml +1 -1
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/cli.py +55 -0
- {clonebox-0.1.24 → clonebox-0.1.25/src/clonebox.egg-info}/PKG-INFO +4 -2
- {clonebox-0.1.24 → clonebox-0.1.25}/LICENSE +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/setup.cfg +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/__init__.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/__main__.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/cloner.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/container.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/dashboard.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/detector.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/models.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/profiles.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/templates/profiles/ml-dev.yaml +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox/validator.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox.egg-info/SOURCES.txt +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox.egg-info/dependency_links.txt +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox.egg-info/entry_points.txt +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox.egg-info/requires.txt +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/src/clonebox.egg-info/top_level.txt +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/tests/test_cli.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/tests/test_cloner.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/tests/test_container.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/tests/test_detector.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/tests/test_models.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/tests/test_network.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/tests/test_profiles.py +0 -0
- {clonebox-0.1.24 → clonebox-0.1.25}/tests/test_validator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clonebox
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.25
|
|
4
4
|
Summary: Clone your workstation environment to an isolated VM with selective apps, paths and services
|
|
5
5
|
Author: CloneBox Team
|
|
6
6
|
License: Apache-2.0
|
|
@@ -651,7 +651,9 @@ clonebox list # List all VMs
|
|
|
651
651
|
virsh --connect qemu:///session dominfo clone-clonebox
|
|
652
652
|
|
|
653
653
|
# Restart VM if needed:
|
|
654
|
-
clonebox
|
|
654
|
+
clonebox restart . --user # Easiest - stop and start
|
|
655
|
+
clonebox stop . --user && clonebox start . --user # Manual restart
|
|
656
|
+
clonebox restart . --user --open # Restart and open GUI
|
|
655
657
|
virsh --connect qemu:///session reboot clone-clonebox # Direct reboot
|
|
656
658
|
virsh --connect qemu:///session reset clone-clonebox # Hard reset if frozen
|
|
657
659
|
```
|
|
@@ -602,7 +602,9 @@ clonebox list # List all VMs
|
|
|
602
602
|
virsh --connect qemu:///session dominfo clone-clonebox
|
|
603
603
|
|
|
604
604
|
# Restart VM if needed:
|
|
605
|
-
clonebox
|
|
605
|
+
clonebox restart . --user # Easiest - stop and start
|
|
606
|
+
clonebox stop . --user && clonebox start . --user # Manual restart
|
|
607
|
+
clonebox restart . --user --open # Restart and open GUI
|
|
606
608
|
virsh --connect qemu:///session reboot clone-clonebox # Direct reboot
|
|
607
609
|
virsh --connect qemu:///session reset clone-clonebox # Hard reset if frozen
|
|
608
610
|
```
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "clonebox"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.25"
|
|
8
8
|
description = "Clone your workstation environment to an isolated VM with selective apps, paths and services"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "Apache-2.0"}
|
|
@@ -1007,6 +1007,39 @@ def cmd_stop(args):
|
|
|
1007
1007
|
cloner.stop_vm(name, force=args.force, console=console)
|
|
1008
1008
|
|
|
1009
1009
|
|
|
1010
|
+
def cmd_restart(args):
|
|
1011
|
+
"""Restart a VM (stop and start)."""
|
|
1012
|
+
name = args.name
|
|
1013
|
+
|
|
1014
|
+
# If name is a path, load config
|
|
1015
|
+
if name and (name.startswith(".") or name.startswith("/") or name.startswith("~")):
|
|
1016
|
+
target_path = Path(name).expanduser().resolve()
|
|
1017
|
+
config_file = target_path / ".clonebox.yaml" if target_path.is_dir() else target_path
|
|
1018
|
+
if config_file.exists():
|
|
1019
|
+
config = load_clonebox_config(config_file)
|
|
1020
|
+
name = config["vm"]["name"]
|
|
1021
|
+
else:
|
|
1022
|
+
console.print(f"[red]❌ Config not found: {config_file}[/]")
|
|
1023
|
+
return
|
|
1024
|
+
|
|
1025
|
+
cloner = SelectiveVMCloner(user_session=getattr(args, "user", False))
|
|
1026
|
+
|
|
1027
|
+
# Stop the VM
|
|
1028
|
+
console.print("[bold yellow]🔄 Stopping VM...[/]")
|
|
1029
|
+
cloner.stop_vm(name, force=args.force, console=console)
|
|
1030
|
+
|
|
1031
|
+
# Wait a moment
|
|
1032
|
+
time.sleep(2)
|
|
1033
|
+
|
|
1034
|
+
# Start the VM
|
|
1035
|
+
console.print("[bold green]🚀 Starting VM...[/]")
|
|
1036
|
+
cloner.start_vm(name, wait_for_agent=True, console=console)
|
|
1037
|
+
|
|
1038
|
+
console.print("[bold green]✅ VM restarted successfully![/]")
|
|
1039
|
+
if getattr(args, "open", False):
|
|
1040
|
+
cloner.open_gui(name, console=console)
|
|
1041
|
+
|
|
1042
|
+
|
|
1010
1043
|
def cmd_delete(args):
|
|
1011
1044
|
"""Delete a VM."""
|
|
1012
1045
|
name = args.name
|
|
@@ -2521,6 +2554,28 @@ def main():
|
|
|
2521
2554
|
)
|
|
2522
2555
|
stop_parser.set_defaults(func=cmd_stop)
|
|
2523
2556
|
|
|
2557
|
+
# Restart command
|
|
2558
|
+
restart_parser = subparsers.add_parser("restart", help="Restart a VM (stop and start)")
|
|
2559
|
+
restart_parser.add_argument("name", nargs="?", default=None, help="VM name or '.' to use .clonebox.yaml")
|
|
2560
|
+
restart_parser.add_argument(
|
|
2561
|
+
"-f",
|
|
2562
|
+
"--force",
|
|
2563
|
+
action="store_true",
|
|
2564
|
+
help="Force stop if VM is stuck",
|
|
2565
|
+
)
|
|
2566
|
+
restart_parser.add_argument(
|
|
2567
|
+
"-u",
|
|
2568
|
+
"--user",
|
|
2569
|
+
action="store_true",
|
|
2570
|
+
help="Use user session (qemu:///session) - no root required",
|
|
2571
|
+
)
|
|
2572
|
+
restart_parser.add_argument(
|
|
2573
|
+
"--open",
|
|
2574
|
+
action="store_true",
|
|
2575
|
+
help="Open GUI after restart",
|
|
2576
|
+
)
|
|
2577
|
+
restart_parser.set_defaults(func=cmd_restart)
|
|
2578
|
+
|
|
2524
2579
|
# Delete command
|
|
2525
2580
|
delete_parser = subparsers.add_parser("delete", help="Delete a VM")
|
|
2526
2581
|
delete_parser.add_argument("name", nargs="?", default=None, help="VM name or '.' to use .clonebox.yaml")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clonebox
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.25
|
|
4
4
|
Summary: Clone your workstation environment to an isolated VM with selective apps, paths and services
|
|
5
5
|
Author: CloneBox Team
|
|
6
6
|
License: Apache-2.0
|
|
@@ -651,7 +651,9 @@ clonebox list # List all VMs
|
|
|
651
651
|
virsh --connect qemu:///session dominfo clone-clonebox
|
|
652
652
|
|
|
653
653
|
# Restart VM if needed:
|
|
654
|
-
clonebox
|
|
654
|
+
clonebox restart . --user # Easiest - stop and start
|
|
655
|
+
clonebox stop . --user && clonebox start . --user # Manual restart
|
|
656
|
+
clonebox restart . --user --open # Restart and open GUI
|
|
655
657
|
virsh --connect qemu:///session reboot clone-clonebox # Direct reboot
|
|
656
658
|
virsh --connect qemu:///session reset clone-clonebox # Hard reset if frozen
|
|
657
659
|
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|