feat: create and start vm via quickemu

This commit is contained in:
Oskar Manhart
2023-07-27 11:33:22 +02:00
parent dde2255b57
commit da55fcc2ed
3 changed files with 79 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
use clap::Command;
use winapps::quickemu::{create_vm, run_vm};
fn cli() -> Command {
Command::new("winapps-cli")
@@ -8,6 +9,8 @@ fn cli() -> Command {
.allow_external_subcommands(true)
.subcommand(Command::new("check").about("Checks remote connection"))
.subcommand(Command::new("connect").about("Connects to remote"))
.subcommand(Command::new("create-vm").about("Create a windows 10 vm using quickemu"))
.subcommand(Command::new("run-vm").about("Start the vm using quickemu"))
}
fn main() {
@@ -23,6 +26,14 @@ fn main() {
Some(("connect", _)) => {
println!("Connecting to remote");
}
Some(("create-vm", _)) => {
println!("Creating windows 10 vm..");
create_vm();
}
Some(("run-vm", _)) => {
println!("Starting vm..");
run_vm();
}
Some((_, _)) => {
cli.about("Command not found, try existing ones!")
.print_help()