projects
/
lttng-ci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jjb: lttng-modules: set baseline to v4.4 for master
[lttng-ci.git]
/
lava
/
kvm
/
generate_kvm_virsh.sh
diff --git
a/lava/kvm/generate_kvm_virsh.sh
b/lava/kvm/generate_kvm_virsh.sh
index ab5511bd63490332503144c4050dce167708f934..07cb91e012c97473d061e91e2551b64e96d7966d 100755
(executable)
--- a/
lava/kvm/generate_kvm_virsh.sh
+++ b/
lava/kvm/generate_kvm_virsh.sh
@@
-15,17
+15,27
@@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+export LIBVIRT_DEFAULT_URI="qemu:///system"
+
tmp=$(mktemp)
tmp=$(mktemp)
+name=$1
+virsh vol-create-as --pool default --name "${name}.raw" --capacity 2G --format raw
+data_disk_path="$(virsh vol-path ${name}.raw --pool default)"
+sudo mkfs.ext4 "$data_disk_path"
virt-install --print-xml \
virt-install --print-xml \
- --name "$
1
" \
+ --name "$
name
" \
--memory 2096\
--disk /var/lib/libvirt/images/ipxe.iso,device=cdrom \
--boot cdrom \
--memory 2096\
--disk /var/lib/libvirt/images/ipxe.iso,device=cdrom \
--boot cdrom \
+ --disk "$data_disk_path,format=raw" \
--vcpus 2 \
--cpu host \
--serial pty \
--graphics none \
--vcpus 2 \
--cpu host \
--serial pty \
--graphics none \
+ --autostart \
+ --network bridge=br0 \
--check path_in_use=off > "$tmp"
virsh define --validate "$tmp"
--check path_in_use=off > "$tmp"
virsh define --validate "$tmp"
+virsh start "$name"
rm -rf "$tmp"
rm -rf "$tmp"
This page took
0.022539 seconds
and
4
git commands to generate.