summarylogtreecommitdiffstats
path: root/virtctl_create_domain_symlinks
blob: 2f0761970a5f1c94df2f46588441dfec4419ffcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/bash

BASE_DIR="/etc/libvirt/qemu"
DEST="/srv/kvm"

sudo mkdir -p $DEST

for domain_xml in $BASE_DIR/*.xml; do
    BASE_NAME=$(basename ${domain_xml%.*})
    sudo mkdir -p /srv/kvm/$BASE_NAME
    sudo ln -svf $domain_xml /srv/kvm/$BASE_NAME/kvm$BASE_NAME.xml
done