Add tools directory
Add 2 scripts to help bring up vm for testing quickly: - kill-vm.sh - kills VM called apt-ostree - run-vm.sh - Creates and starts a vm called apt-ostree. You must specify the full path to the VM. Libvirt is required to run and kill the VM. Change-Id: Ia6b1c3ccaebdf9fcef644e986304049a29c8ebf5 Signed-off-by: Charles Short <charles.short@windriver.com>
This commit is contained in:
parent
7b0fc0096b
commit
3c153db48e
11
tools/kill-vm.sh
Executable file
11
tools/kill-vm.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2023 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
name=$1
|
||||
if [ -z $name ]; then
|
||||
name="apt-ostree"
|
||||
fi
|
||||
sudo virsh destroy $name && sudo virsh undefine $name
|
20
tools/run-vm.sh
Executable file
20
tools/run-vm.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2023 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
dir=$1
|
||||
name=apt-ostree
|
||||
|
||||
virt-install \
|
||||
--connect qemu:///system \
|
||||
--boot loader=/usr/share/ovmf/OVMF.fd \
|
||||
--machine q35 \
|
||||
--name apt-ostree \
|
||||
--ram 8096 \
|
||||
--vcpus 4 \
|
||||
--os-variant debiantesting \
|
||||
--disk path=$dir/debian-ostree-qemu-uefi-amd64.img \
|
||||
--noautoconsole \
|
||||
--check path_in_use=off \
|
||||
--import
|
Loading…
x
Reference in New Issue
Block a user