Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ make_xml(){
xml ed --inplace --update "/domain/@type" -v "$3" "$xml"
xml ed --inplace --update "/domain/os/kernel" -v "$5" "$xml"
xml ed --inplace --update "/domain/os/initrd" -v "$6" "$xml"
IFS='|' read -ra vdefs <<<"$7"
xml ed --inplace --update "/domain/devices/serial/log/@file" -v "$7" "$xml"
IFS='|' read -ra vdefs <<<"$8"
local vidx=1
local sidx=1
for vdef in "${vdefs[@]}"; do
Expand Down Expand Up @@ -425,7 +426,7 @@ make_xml(){
fi
done

IFS='|' read -ra idefs <<<"$8"
IFS='|' read -ra idefs <<<"$9"
local ifix=0
for idef in "${idefs[@]}"; do
IFS=':' read -ra i <<<"$idef"
Expand Down Expand Up @@ -686,13 +687,16 @@ else
DOM_TYPE=qemu
fi

SERIAL_LOG='/tmp/'$VMNAME'.log'

notify "Prepare VM config"
XML_NAME=$(make_xml "$VMNAME" \
"$HV_ARCH" \
"$DOM_TYPE" \
"$POOL" \
"$KERNEL_PATH" \
"$INITRAMFS_PATH" \
"$SERIAL_LOG" \
"$(join_by '|' "${VOLUMES[@]}")" \
"$(join_by '|' "${IFACES[@]}")" \
"${KOPT[@]}")
Expand Down Expand Up @@ -782,7 +786,9 @@ else
sleep 1
state=$(virsh domstate "$VMNAME")
done
ssh $HOST -C "cat $SERIAL_LOG"
fi
ssh $HOST -C "rm $SERIAL_LOG"
ktest::lock
log virsh vol-download $PORT_LIST_VOL "$TAKEN_PORTS" $POOL
sed -i -- "/$CHANNEL_PORT/d" $TAKEN_PORTS
Expand Down
1 change: 1 addition & 0 deletions vm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<devices>
<serial type='pty'>
<target port='0'/>
<log file="/tmp/serial.log" append="off"/>
</serial>
<channel type="tcp">
<source mode="bind" host="0.0.0.0" service="TBD"/>
Expand Down