Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ public String toString() {
graphicBuilder.append(" listen=''");
}
if (_passwd != null) {
graphicBuilder.append(" passwd='" + _passwd + "'");
graphicBuilder.append(" passwd='" + StringUtils.truncate(_passwd, 8) + "'");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that @weizhouapache ? Does this fix/address any libvirt limitation or user reported issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohityadavcloud
this aims to fix an issue with ubuntu 22.04 (to be released soon) and libvirt 8.
the issue is raised in mailing list: https://lists.apache.org/thread/zk4fyggjqk1zphk4dfg1m596yrd15d9b

from many years ago, libvirt accepts vnc password with more than 8 chars. but only the first 8 chars in vnc password are used in vnc console verification (the other chars are dropped).
In recent libvirt, only vnc password with 8 chars is permitted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

} else if (_keyMap != null) {
graphicBuilder.append(" _keymap='" + _keyMap + "'");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import org.apache.cloudstack.utils.linux.MemStat;
import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat;
import org.apache.commons.lang.SystemUtils;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.Duration;
import org.junit.Assert;
import org.junit.Before;
Expand Down Expand Up @@ -774,7 +775,7 @@ private void verifyGraphicsDevices(VirtualMachineTO to, Document domainDoc, Stri
assertXpath(domainDoc, prefix + "/graphics/@type", "vnc");
assertXpath(domainDoc, prefix + "/graphics/@listen", to.getVncAddr());
assertXpath(domainDoc, prefix + "/graphics/@autoport", "yes");
assertXpath(domainDoc, prefix + "/graphics/@passwd", to.getVncPassword());
assertXpath(domainDoc, prefix + "/graphics/@passwd", StringUtils.truncate(to.getVncPassword(), 8));
}

private void verifySerialDevices(Document domainDoc, String prefix) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.