Skip to content

Commit b945109

Browse files
Replace remaining uses of xs-tools.iso name_label
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
1 parent 890633a commit b945109

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

ocaml/xapi/cancel_tests.ml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,19 @@ let _ =
411411
| [ v ] ->
412412
let net = Client.Network.get_by_name_label ~rpc ~session_id ~label:"Host internal management network" in
413413
if List.length net = 0 then failwith "Failed to find the host internal management network";
414-
let vdi = Client.VDI.get_by_name_label ~rpc ~session_id ~label:"xs-tools.iso" in
415-
if List.length vdi = 0 then failwith "Failed to find the xs-tools.iso";
414+
let vdi =
415+
let tools_iso_filter = "field \"is_tools_iso\"=\"true\"" in
416+
begin match Client.VDI.get_all_records_where !rpc session_id tools_iso_filter with
417+
| (vdi, _)::_ -> vdi
418+
| [] -> failwith "Failed to find the tools ISO";
419+
end
420+
in
416421
let env = {
417422
session_id = session_id;
418423
vm = v;
419424
id = Client.VM.get_uuid ~rpc ~session_id ~self:v;
420425
net = List.hd net;
421-
vdi = List.hd vdi;
426+
vdi;
422427
} in
423428
run env
424429
| _ ->

ocaml/xe-cli/rt/tests.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ let cd_guest_verified (cli : Util.t_cli) vmid =
233233
log Info "Test: VM NAME='%s'" domainname;
234234
log Info "Test: Testing CD operations";
235235
ensure_vm_down cli vmid 0;
236-
let cd1 = ("xs-tools.iso",get_vdi_uuid_from_name cli "xs-tools.iso","2","xenlegacy.exe") in
237-
let cd2 = ("xs-tools.iso",get_vdi_uuid_from_name cli "xs-tools.iso","3","xenlegacy.exe") in
236+
let cd1 = ("guest-tools.iso",get_vdi_uuid_from_name cli "guest-tools.iso","2","xenlegacy.exe") in
237+
let cd2 = ("guest-tools.iso",get_vdi_uuid_from_name cli "guest-tools.iso","3","xenlegacy.exe") in
238238

239239
let checkcdset cdset =
240240
let missingcds = List.filter (fun (name,uuid,device,file) -> uuid="") cdset in

scripts/scalability-tests/provision-vm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
if [ $# -le 1 ]; then
1111
echo "Usage: ${0} vm_per_host host1 [host2 ... hostN]"
1212
echo "${0} provisions <vm_per_host> debiant-etch VMs on each host and installs them on a local VHD disk. Moreover, all the hosts join a common pool."
13-
echo "if PROVISION_VM_WITH_CD is set to 1, then attach xs-tools.iso CD-ROM to the initial Debian Etch VM before cloning it."
13+
echo "if PROVISION_VM_WITH_CD is set to 1, then attach guest tools ISO CD-ROM to the initial Debian Etch VM before cloning it."
1414
exit 1
1515
fi
1616

@@ -68,9 +68,10 @@ install () {
6868
echo "[${HOST}] Set."
6969

7070
if [ "${PROVISION_VM_WITH_CD}" == "1" ]; then
71-
echo "[${HOST}] Attaching a CD-ROM."
72-
${XE} vm-cd-add vm=${DEB} cd-name=xs-tools.iso device=3
73-
echo "[${HOST}] Attached."
71+
echo "[${HOST}] Attaching a CD-ROM."
72+
TOOLS_ISO=`${XE} vdi-list is-tools-iso=ture params=name-label --minimal`
73+
${XE} vm-cd-add vm=${DEB} cd-name=${TOOLS_ISO} device=3
74+
echo "[${HOST}] Attached."
7475
fi
7576

7677
}

0 commit comments

Comments
 (0)