SetVmSoundType

API Request

URLs
PUT zstack/v1/vm-instances/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "setVmSoundType": {
    "soundType": "ac97"
  },
  "systemTags": [],
  "userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"setVmSoundType":{"soundType":"ac97"}}' http://localhost:8080/zstack/v1/vm-instances/0ae1191601f430d88e1707716d24ff39/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The VM instance UUID. 3.7.0
soundType String body (contained in the setVmSoundType structure) The virtual sound card type. Default type: ICH6.
  • ac97
  • ich6
3.7.0
systemTags List body Optional. The system tags. 3.7.0
userTags List body Optional. The user tags. 3.7.0
Note:
  • When you create a VM instance in ZStack Cloud, you can set the virtual sound card type by adding the soundType option to SystemTags. The SystemTag is passed by using the soundType parameter.
    • Format of the soundType option: soundType::type
    • Example: soundType::ac97
    • Note: The system compatibility varies depending on different Windows versions. Windows XP only supports the AC97 driver. In Windows 10, ICH6 is driver-free. Windows 7 supports both AC97 and ICH6 drivers.

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,
{
	"error": {
		"code": "SYS.1001",
		"description": "A message or a operation timeout",
		"details": "Create VM on KVM timeout after 300s"
	}
}

SDK Sample

Java SDK
SetVmSoundTypeAction action = new SetVmSoundTypeAction();
action.uuid = "0ae1191601f430d88e1707716d24ff39";
action.soundType = "ac97";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SetVmSoundTypeAction.Result res = action.call();
Python SDK
SetVmSoundTypeAction action = SetVmSoundTypeAction()
action.uuid = "0ae1191601f430d88e1707716d24ff39"
action.soundType = "ac97"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SetVmSoundTypeAction.Result res = action.call()