echo === Duplicate ID ===
echo
-run_qemu <<EOF
+run_qemu -drive driver=$IMGFMT,id=disk,node-name=test-node,file="$TEST_IMG" <<EOF
{ "execute": "qmp_capabilities" }
{ "execute": "blockdev-add",
"arguments": {
"options": {
"driver": "$IMGFMT",
- "id": "disk",
- "node-name": "test-node",
- "file": {
- "driver": "file",
- "filename": "$TEST_IMG"
- }
- }
- }
- }
-{ "execute": "blockdev-add",
- "arguments": {
- "options": {
- "driver": "$IMGFMT",
- "id": "disk",
- "file": {
- "driver": "file",
- "filename": "$TEST_IMG"
- }
- }
- }
- }
-{ "execute": "blockdev-add",
- "arguments": {
- "options": {
- "driver": "$IMGFMT",
- "id": "test-node",
- "file": {
- "driver": "file",
- "filename": "$TEST_IMG"
- }
- }
- }
- }
-{ "execute": "blockdev-add",
- "arguments": {
- "options": {
- "driver": "$IMGFMT",
- "id": "disk2",
"node-name": "disk",
"file": {
"driver": "file",
"arguments": {
"options": {
"driver": "$IMGFMT",
- "id": "disk2",
"node-name": "test-node",
"file": {
"driver": "file",
}
}
}
-{ "execute": "blockdev-add",
- "arguments": {
- "options": {
- "driver": "$IMGFMT",
- "id": "disk3",
- "node-name": "disk3",
- "file": {
- "driver": "file",
- "filename": "$TEST_IMG"
- }
- }
- }
- }
{ "execute": "quit" }
EOF
"arguments": {
"options": {
"driver": "$IMGFMT",
- "id": "disk",
+ "node-name": "disk",
"aio": "native",
"file": {
"driver": "file",
"arguments": {
"options": {
"driver": "$IMGFMT",
- "id": "disk",
+ "node-name": "disk",
"file": {
"driver": "file",
"filename": "$TEST_IMG"
"arguments": {
"options": {
"driver": "$IMGFMT",
- "id": "disk",
+ "node-name": "disk",
"file": {
"driver": "file",
"filename": "$TEST_IMG"
{ "execute": "blockdev-add",
"arguments": {
"options": {
- "id": "disk"
+ "node-name": "disk"
}
}
}
=== Duplicate ID ===
-Testing:
+Testing: -drive driver=IMGFMT,id=disk,node-name=test-node,file=TEST_DIR/t.IMGFMT
QMP_VERSION
{"return": {}}
-{"return": {}}
-{"error": {"class": "GenericError", "desc": "Device with id 'disk' already exists"}}
-{"error": {"class": "GenericError", "desc": "Device name 'test-node' conflicts with an existing node name"}}
{"error": {"class": "GenericError", "desc": "node-name=disk is conflicting with a device id"}}
{"error": {"class": "GenericError", "desc": "Duplicate node name"}}
-{"error": {"class": "GenericError", "desc": "Device name 'disk3' conflicts with an existing node name"}}
{"return": {}}
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}