Re: [pve-devel] [PATCH v2 qemu] init: daemonize: defuse PID file resolve error to warning
On 27/10/2022 10:13, Fiona Ebner wrote: > When proxmox-file-restore invokes QEMU, the PID file is a (temporary) > file that's already unlinked, so resolving the absolute path here > failed. > > It should not be a critical error when the PID file unlink handler > can't be registered, because the path can't be resolved for whatever > reason. Just turn it into a warning instead. thx for the patch! > > Reported-by: Dominik Csapak > Suggested-by: Thomas Lamprecht > Signed-off-by: Fiona Ebner > --- > > Changes from v1: > * Added R-b and S-b tags. > > softmmu/vl.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/softmmu/vl.c b/softmmu/vl.c > index 0d233d55f3..1fa992ab09 100644 > --- a/softmmu/vl.c > +++ b/softmmu/vl.c > @@ -2445,10 +2445,9 @@ static void qemu_maybe_daemonize(const char *pid_file) > > pid_file_realpath = g_malloc0(PATH_MAX); > if (!realpath(pid_file, pid_file_realpath)) { > -error_report("cannot resolve PID file path: %s: %s", > - pid_file, strerror(errno)); > -unlink(pid_file); > -exit(1); > +warn_report("not removing PID file on exit: cannot resolve path: > " > +"%s: %s", pid_file, strerror(errno)); As my reply to the upstream patch at Daniel's query w.r.t. to warn, I'd also like to drop the warning here, at least for ENOENT, which would cover our, and IMO most other, use cases. > +return; > } > > qemu_unlink_pidfile_notifier = (struct UnlinkPidfileNotifier) { ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH v3 qemu] init: daemonize: defuse PID file resolve error
When proxmox-file-restore invokes QEMU, the PID file is a (temporary) file that's already unlinked, so resolving the absolute path here failed. It should not be a critical error when the PID file unlink handler can't be registered, because the path can't be resolved for whatever reason. If the file is already gone from QEMU's perspective (i.e. errno is ENOENT), silently ignore the error. Otherwise, print a warning. Reported-by: Dominik Csapak Suggested-by: Thomas Lamprecht Signed-off-by: Fiona Ebner --- Changes from v2: * Be quiet when error is ENOENT. softmmu/vl.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 0d233d55f3..f71421f80a 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2445,10 +2445,11 @@ static void qemu_maybe_daemonize(const char *pid_file) pid_file_realpath = g_malloc0(PATH_MAX); if (!realpath(pid_file, pid_file_realpath)) { -error_report("cannot resolve PID file path: %s: %s", - pid_file, strerror(errno)); -unlink(pid_file); -exit(1); +if (errno != ENOENT) { +warn_report("not removing PID file on exit: cannot resolve PID " +"file path: %s: %s", pid_file, strerror(errno)); +} +return; } qemu_unlink_pidfile_notifier = (struct UnlinkPidfileNotifier) { -- 2.30.2 ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] applied: [PATCH v2 qemu-server] fix #4099: disable io_uring for virtual disks on CIFS storages
On 27/10/2022 09:13, Fiona Ebner wrote: > Since kernel 5.15, there is an issue with io_uring when used in > combination with CIFS [0]. Unfortunately, the kernel developers did > not suggest any way to resolve the issue and didn't comment on my > proposed one. So for now, just disable io_uring when the storage is > CIFS, like is done for other storage types that had problematic > interactions. > > It is rather easy to reproduce when writing large amounts of data > within the VM. I used > dd if=/dev/urandom of=file bs=1M count=1000 > to reproduce it consistently, but your mileage may vary. > > Some forum reports about users running into the issue [1][2][3]. > > [0]: https://www.spinics.net/lists/linux-cifs/msg26734.html > [1]: https://forum.proxmox.com/threads/109848/ > [2]: https://forum.proxmox.com/threads/110464/ > [3]: https://forum.proxmox.com/threads/111382/ > > Signed-off-by: Fiona Ebner > --- > > Changes from v1: > * Add 'fix #4099'-prefix to commit title. > > PVE/QemuServer.pm | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > really unfortunate indeed though, a kernel fix would be nicer, but there's only so much time we can spent waiting on progress there, so ... applied, thanks! ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH v3 manager 1/3 follow-up] api ceph osd: add OSD index, metadata and lv-info
with this follow up, consider this series Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] applied: [PATCH v3 qemu] init: daemonize: defuse PID file resolve error
On 28/10/2022 10:09, Fiona Ebner wrote: > When proxmox-file-restore invokes QEMU, the PID file is a (temporary) > file that's already unlinked, so resolving the absolute path here > failed. > > It should not be a critical error when the PID file unlink handler > can't be registered, because the path can't be resolved for whatever > reason. If the file is already gone from QEMU's perspective (i.e. > errno is ENOENT), silently ignore the error. Otherwise, print a > warning. > > Reported-by: Dominik Csapak > Suggested-by: Thomas Lamprecht > Signed-off-by: Fiona Ebner > --- > > Changes from v2: > * Be quiet when error is ENOENT. > > softmmu/vl.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > applied, thanks! ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH pve-firewall] allow non zero ip address host bits
Some issue due to weird and unmentioned dependence on $noerr and while at it some small comment and commit message style nits that I might have either ignored or "fixed" up myself other way. On 25/10/2022 16:31, Stefan Hrdlicka wrote: > They can already be set directly via the cluster.fw file. Net::IP is just a > bit more picky with what it allows: nit: Would suggest: ... what it allows, for example: > For example: > error: 192.168.1.155/24 fails ... > correct: 192.168.1.0/24 succeeds: ... (as for us both are obviously correct, so we just want to show when Net::IP fails or succeeds) > > also improves #3554 > > Signed-off-by: Stefan Hrdlicka > --- > src/PVE/Firewall.pm | 8 > 1 file changed, 8 insertions(+) > > diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm > index e6d6802..25e2fd0 100644 > --- a/src/PVE/Firewall.pm > +++ b/src/PVE/Firewall.pm > @@ -69,6 +69,14 @@ sub pve_verify_ip_or_cidr { > if ($cidr =~ m!^(?:$IPV6RE|$IPV4RE)(/(\d+))?$!) { > return $cidr if Net::IP->new($cidr); > return undef if $noerr; > + > + # Error 171 in Net::IP comes up if the host part of the IP address isn't > + # zero. > + # for example: > + # error: 192.168.1.155/24 > + # correct: 192.168.1.0/24 A comment for such a thing _is_ great, but it still should be somewhat concise w.r.t. (line) space usage to avoid "bloat". E.g., the following would still fit in the 100c upper limit # Net::IP sets Error `171` if the masked CIDR part isn't zero, e.g., `192.168.1.155/24` # fails but `192.168.1.0/24` succeeds. We allow non-zero though, so ignore. > + return $cidr if Net::IP::Errno() == 171; > + now for a actual non-nit: why only return the $cidr in that case if $noerr is falsy? Seems odd to have that flag control the behavior. Also, any details on that errno being restricted to really only that? I only found some info in the actual code[0], and they don't seem to have constant (or any management for assigner err#, meh), so just some hint about that with a link to the source in the commit message. Or did you find better sources? It seems that we're also lucky that the check for this is basically the last one in the `set` method the `new` constructor calls, so at least in the current version we can assume that it'd be indeed a valid CIDR otherwise, but still, feels a bit brittle. Could another option be that we normalize CIDRs on entry, i.e., mask out the end? I mean,. would not help existing setups, but at least future proof it a bit for new systems if there's another call site that will trip on this (maybe normalizing here in case of 171 could be an option too). I don't want to shove you in that direction, just wondering if that was considered. [0]: https://metacpan.org/release/MANU/Net-IP-1.26/source/IP.pm#L1811 [1]: https://metacpan.org/release/MANU/Net-IP-1.26/source/IP.pm#L199 > die Net::IP::Error() . "\n"; > } > return undef if $noerr; ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH qemu-server/novnc/manager/docs v3 0/6] Feature noVNC-Clipboard
This patch-series adds a parameter to vga_fmt, that enables the noVNC-Clipboard and replaces the default SPICE-Clipboard if SPICE is used. changes v3: * added hint to make clearer that the spice guest tools are required for the noVNC-clipboard * Checkbox changes to ComboBox when a spice device is selected to make clear that only one clipboard can be used at a time. * added 2 test-cases changes v2: * added pci address to virtio-serial-pci proxmox-backup: Markus Frank (3): enable clipboard parameter in vga_fmt added clipboard variable to return at status/current test cases for clipboard spice & std PVE/API2/Qemu.pm| 6 + PVE/QemuServer.pm | 19 ++- PVE/QemuServer/PCI.pm | 3 ++- test/cfg2cmd/noVNC-clipboard-spice.conf | 1 + test/cfg2cmd/noVNC-clipboard-spice.conf.cmd | 27 + test/cfg2cmd/noVNC-clipboard-std.conf | 1 + test/cfg2cmd/noVNC-clipboard-std.conf.cmd | 27 + 7 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 test/cfg2cmd/noVNC-clipboard-spice.conf create mode 100644 test/cfg2cmd/noVNC-clipboard-spice.conf.cmd create mode 100644 test/cfg2cmd/noVNC-clipboard-std.conf create mode 100644 test/cfg2cmd/noVNC-clipboard-std.conf.cmd novnc-pve: Markus Frank (1): added show clipboard button patch to series .../patches/0019-show-clipboard-button.patch | 31 +++ debian/patches/series | 1 + 2 files changed, 32 insertions(+) create mode 100644 debian/patches/0019-show-clipboard-button.patch pve-manager: Markus Frank (1): added clipboard checkbox & combobox to DisplayEdit www/manager6/qemu/DisplayEdit.js | 62 +++- 1 file changed, 61 insertions(+), 1 deletion(-) pve-docs: Markus Frank (1): added noVNC clipboard documentation qm.adoc | 11 +++ 1 file changed, 11 insertions(+) -- 2.30.2 ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH qemu-server v3 1/6] enable clipboard parameter in vga_fmt
added option to use the qemu vdagent implementation to enable the noVNC clipboard. When enabled with SPICE the spice-vdagent gets replaced with the qemu implementation. This patch does not solve #1406, but does allow copy and paste with a running X-session, when spice-vdagent is installed on the guest. Signed-off-by: Markus Frank --- PVE/QemuServer.pm | 19 ++- PVE/QemuServer/PCI.pm | 3 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index c706653..333afc2 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -190,6 +190,12 @@ my $vga_fmt = { minimum => 4, maximum => 512, }, +clipboard => { + description => "enable clipboard (requires spice-vdagent)", + type => 'boolean', + optional => 1, + default => 0 +} }; my $ivshmem_fmt = { @@ -3836,6 +3842,13 @@ sub config_to_command { } } +if ($vga->{clipboard} && $vga->{type} =~ /^std|^cirrus|^vmware/) { + push @$devices, '-chardev', 'qemu-vdagent,id=vdagent,name=vdagent,clipboard=on'; + my $pciaddr = print_pci_addr("clipboard", $bridges, $arch, $machine_type); + push @$devices, '-device', "virtio-serial-pci$pciaddr"; + push @$devices, '-device', 'virtserialport,chardev=vdagent,name=com.redhat.spice.0'; +} + my $rng = $conf->{rng0} ? parse_rng($conf->{rng0}) : undef; if ($rng && $version_guard->(4, 1, 2)) { check_rng_source($rng->{source}); @@ -3880,7 +3893,11 @@ sub config_to_command { die "failed to get an ip address of type $pfamily for 'localhost'\n" if !@nodeaddrs; push @$devices, '-device', "virtio-serial,id=spice$pciaddr"; - push @$devices, '-chardev', "spicevmc,id=vdagent,name=vdagent"; + if ($vga->{clipboard}) { + push @$devices, '-chardev', 'qemu-vdagent,id=vdagent,name=vdagent,clipboard=on'; + } else { + push @$devices, '-chardev', 'spicevmc,id=vdagent,name=vdagent'; + } push @$devices, '-device', "virtserialport,chardev=vdagent,name=com.redhat.spice.0"; my $localhost = PVE::Network::addr_to_ip($nodeaddrs[0]->{addr}); diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm index 3d0e70e..7ddabe0 100644 --- a/PVE/QemuServer/PCI.pm +++ b/PVE/QemuServer/PCI.pm @@ -138,7 +138,8 @@ sub get_pci_addr_map { scsihw1 => { bus => 0, addr => 6 }, ahci0 => { bus => 0, addr => 7 }, qga0 => { bus => 0, addr => 8 }, - spice => { bus => 0, addr => 9 }, + spice => { bus => 0, addr => 9, conflict_ok => qw(clipboard) }, + clipboard => { bus => 0, addr => 9, conflict_ok => qw(spice) }, # clipboard is used if spice is not running virtio0 => { bus => 0, addr => 10 }, virtio1 => { bus => 0, addr => 11 }, virtio2 => { bus => 0, addr => 12 }, -- 2.30.2 ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH qemu-server v3 2/6] added clipboard variable to return at status/current
By that noVNC is able to check if clipboard is active. Signed-off-by: Markus Frank --- PVE/API2/Qemu.pm | 6 ++ 1 file changed, 6 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 99b426e..25f3a1d 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -2428,6 +2428,11 @@ __PACKAGE__->register_method({ type => 'boolean', optional => 1, }, + clipboard => { + description => "Qemu clipboard enabled in config.", + type => 'boolean', + optional => 1, + }, }, }, code => sub { @@ -2446,6 +2451,7 @@ __PACKAGE__->register_method({ my $spice = defined($vga->{type}) && $vga->{type} =~ /^virtio/; $spice ||= PVE::QemuServer::vga_conf_has_spice($conf->{vga}); $status->{spice} = 1 if $spice; + $status->{clipboard} = $vga->{clipboard}; } $status->{agent} = 1 if PVE::QemuServer::get_qga_key($conf, 'enabled'); -- 2.30.2 ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH novnc v3 4/6] added show clipboard button patch to series
Signed-off-by: Markus Frank --- .../patches/0019-show-clipboard-button.patch | 31 +++ debian/patches/series | 1 + 2 files changed, 32 insertions(+) create mode 100644 debian/patches/0019-show-clipboard-button.patch diff --git a/debian/patches/0019-show-clipboard-button.patch b/debian/patches/0019-show-clipboard-button.patch new file mode 100644 index 000..9075f4b --- /dev/null +++ b/debian/patches/0019-show-clipboard-button.patch @@ -0,0 +1,31 @@ +From 338b94a5d7b3ec65ce3f4b9a91420ee5f155077e Mon Sep 17 00:00:00 2001 +From: Markus Frank +Date: Fri, 28 Oct 2022 13:57:57 +0200 +Subject: [PATCH] show clipboard button + +show button when clipboard at status/current is true + +Signed-off-by: Markus Frank +--- + app/pve.js | 5 + + 1 file changed, 5 insertions(+) + +diff --git a/app/pve.js b/app/pve.js +index 287615f..639e598 100644 +--- a/app/pve.js b/app/pve.js +@@ -411,6 +411,11 @@ PVEUI.prototype = { + document.getElementById('pve_start_dlg') + .classList.add("noVNC_open"); + } ++ let clipboard = result.data.clipboard; ++ if (clipboard) { ++ document.getElementById('noVNC_clipboard_button') ++ .classList.remove('pve_hidden'); ++ } + }, + failure: function(msg, code) { + if (code === 403) { +-- +2.36.1 + diff --git a/debian/patches/series b/debian/patches/series index ef9e9df..1eb50db 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -17,3 +17,4 @@ extra/0001-Ignore-ResizeObserver-errors.patch 0016-hide-fullscreen-button-on-isFullscreen-get-variable.patch 0017-make-error-hideable.patch 0018-show-start-button-on-not-running-vm-ct.patch +0019-show-clipboard-button.patch -- 2.36.1 ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH manager v3 5/6] added clipboard checkbox & combobox to DisplayEdit
If display is set to spice the checkbox gets replaced by a combobox to show the available clipboard options. Signed-off-by: Markus Frank --- www/manager6/qemu/DisplayEdit.js | 62 +++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js index 9bb1763e..2cef5ad2 100644 --- a/www/manager6/qemu/DisplayEdit.js +++ b/www/manager6/qemu/DisplayEdit.js @@ -33,22 +33,54 @@ Ext.define('PVE.qemu.DisplayInputPanel', { return; } let memoryfield = this.up('panel').down('field[name=memory]'); + let clipboardBox = this.up('panel').down('field[itemId=clipboardBox]'); + let clipboardDrop = this.up('panel').down('field[itemId=clipboardDrop]'); + let vdagentHint = this.up('panel').down('field[name=vdagentHint]'); let disableMemoryField = false; + let spice = false; + let showClipboardAndHint = true; if (val === "cirrus") { memoryfield.setEmptyText("4"); - } else if (val === "std" || val.match(/^qxl\d?$/) || val === "vmware") { + } else if (val === "std" || val === "vmware") { memoryfield.setEmptyText("16"); + } else if (val.match(/^qxl\d?$/)) { + memoryfield.setEmptyText("16"); + spice = true; } else if (val.match(/^virtio/)) { memoryfield.setEmptyText("256"); + spice = true; } else if (val.match(/^(serial\d|none)$/)) { memoryfield.setEmptyText("N/A"); disableMemoryField = true; + showClipboardAndHint = false; } else { console.debug("unexpected display type", val); memoryfield.setEmptyText(Proxmox.Utils.defaultText); } memoryfield.setDisabled(disableMemoryField); + vdagentHint.setVisible(showClipboardAndHint); + if (showClipboardAndHint) { + // switch from Checkbox to ComboBox and vice versa + clipboardBox.setDisabled(spice); + clipboardDrop.setDisabled(!spice); + clipboardBox.setVisible(!spice); + clipboardDrop.setVisible(spice); + // reset value when changing to spice, + // so that you have to actively change to noVNC Clipboard + if (spice) { + clipboardDrop.setValue('__default__'); + } + } else { + // reset to default + clipboardBox.setValue(false); + clipboardDrop.setValue('__default__'); + // show only the disabled Checkbox + clipboardBox.setDisabled(true); + clipboardDrop.setDisabled(true); + clipboardBox.setVisible(true); + clipboardDrop.setVisible(false); + } }, }, }, @@ -60,6 +92,34 @@ Ext.define('PVE.qemu.DisplayInputPanel', { maxValue: 512, step: 4, name: 'memory', +}, +{ + xtype: 'proxmoxcheckbox', + fieldLabel: gettext('noVNC Clipboard'), + name: 'clipboard', + itemId: 'clipboardBox', +}, +{ + name: 'clipboard', + itemId: 'clipboardDrop', + xtype: 'proxmoxKVComboBox', + value: '__default__', + deleteEmpty: false, + fieldLabel: gettext('Clipboard'), + comboItems: [ + ['__default__', 'SPICE-Clipboard'], + ['1', 'noVNC-Clipboard'], + ], + disabled: true, + hidden: true, +}, +{ + itemId: 'vdagentHint', + name: 'vdagentHint', + xtype: 'displayfield', + userCls: 'pmx-hint', + value: 'Clipboard for noVNC requires spice-tools installed and ' + + 'enabled in the Guest-VM.', }], }); -- 2.30.2 ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH qemu-server v3 3/6] test cases for clipboard spice & std
added one test case for a spice display and one for std Signed-off-by: Markus Frank --- test/cfg2cmd/noVNC-clipboard-spice.conf | 1 + test/cfg2cmd/noVNC-clipboard-spice.conf.cmd | 27 + test/cfg2cmd/noVNC-clipboard-std.conf | 1 + test/cfg2cmd/noVNC-clipboard-std.conf.cmd | 27 + 4 files changed, 56 insertions(+) create mode 100644 test/cfg2cmd/noVNC-clipboard-spice.conf create mode 100644 test/cfg2cmd/noVNC-clipboard-spice.conf.cmd create mode 100644 test/cfg2cmd/noVNC-clipboard-std.conf create mode 100644 test/cfg2cmd/noVNC-clipboard-std.conf.cmd diff --git a/test/cfg2cmd/noVNC-clipboard-spice.conf b/test/cfg2cmd/noVNC-clipboard-spice.conf new file mode 100644 index 000..d9d933d --- /dev/null +++ b/test/cfg2cmd/noVNC-clipboard-spice.conf @@ -0,0 +1 @@ +vga: qxl,clipboard=1 diff --git a/test/cfg2cmd/noVNC-clipboard-spice.conf.cmd b/test/cfg2cmd/noVNC-clipboard-spice.conf.cmd new file mode 100644 index 000..f24cc7f --- /dev/null +++ b/test/cfg2cmd/noVNC-clipboard-spice.conf.cmd @@ -0,0 +1,27 @@ +/usr/bin/kvm \ + -id 8006 \ + -name 'vm8006,debug-threads=on' \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -mon 'chardev=qmp,mode=control' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ + -mon 'chardev=qmp-event,mode=control' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smp '1,sockets=1,cores=1,maxcpus=1' \ + -nodefaults \ + -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ + -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 512 \ + -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \ + -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \ + -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \ + -device 'qxl-vga,id=vga,max_outputs=4,bus=pci.0,addr=0x2' \ + -device 'virtio-serial,id=spice,bus=pci.0,addr=0x9' \ + -chardev 'qemu-vdagent,id=vdagent,name=vdagent,clipboard=on' \ + -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0' \ + -spice 'tls-port=61000,addr=127.0.0.1,tls-ciphers=HIGH,seamless-migration=on' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -machine 'type=pc+pve0' diff --git a/test/cfg2cmd/noVNC-clipboard-std.conf b/test/cfg2cmd/noVNC-clipboard-std.conf new file mode 100644 index 000..ec84637 --- /dev/null +++ b/test/cfg2cmd/noVNC-clipboard-std.conf @@ -0,0 +1 @@ +vga: std,clipboard=1 diff --git a/test/cfg2cmd/noVNC-clipboard-std.conf.cmd b/test/cfg2cmd/noVNC-clipboard-std.conf.cmd new file mode 100644 index 000..2a7e3f4 --- /dev/null +++ b/test/cfg2cmd/noVNC-clipboard-std.conf.cmd @@ -0,0 +1,27 @@ +/usr/bin/kvm \ + -id 8006 \ + -name 'vm8006,debug-threads=on' \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -mon 'chardev=qmp,mode=control' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ + -mon 'chardev=qmp-event,mode=control' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smp '1,sockets=1,cores=1,maxcpus=1' \ + -nodefaults \ + -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ + -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 512 \ + -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \ + -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \ + -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \ + -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \ + -device 'VGA,id=vga,bus=pci.0,addr=0x2' \ + -chardev 'qemu-vdagent,id=vdagent,name=vdagent,clipboard=on' \ + -device 'virtio-serial-pci,bus=pci.0,addr=0x9' \ + -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -machine 'type=pc+pve0' -- 2.30.2 ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH docs v3 6/6] added noVNC clipboard documentation
Signed-off-by: Markus Frank --- qm.adoc | 11 +++ 1 file changed, 11 insertions(+) diff --git a/qm.adoc b/qm.adoc index 4d0c7c4..3a575bc 100644 --- a/qm.adoc +++ b/qm.adoc @@ -693,6 +693,17 @@ Selecting `serialX` as display 'type' disables the VGA output, and redirects the Web Console to the selected serial port. A configured display 'memory' setting will be ignored in that case. +You can enable the noVNC clipboard by setting 'clipboard' to 1. +To use this, you need to install and enable spice-vdagent on the VM Guest: +`apt install spice-vdagent` + +Doing this will give you the ability to use the clipboard button of the novnc +console. However, when using SPICE, you have to decide which clipboard you want +to use, because the default SPICE clipboard implementation will be replaced by +the qemu-vdagent implementation, which is used by noVNC. +This means you cannot simply copy and paste into a SPICE session and instead +need to use the noVNC button, when using SPICE with noVNC-clipboard. + [[qm_usb_passthrough]] USB Passthrough ~~~ -- 2.30.2 ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel