[pve-devel] [PATCH qemu-server] Fix #2343 Add USB3 support for Spice USB redirection

2019-08-28 Thread Aaron Lauterer
If USB3 is enabled for a USB port of host type spice add a USB3
controller and use it.

To not break live migration this is only enabled for qemu 4.1 and
higher.

Signed-off-by: Aaron Lauterer 
---
 PVE/QemuServer.pm |  4 ++--
 PVE/QemuServer/USB.pm | 22 --
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6e3b19e..375a34b 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3701,7 +3701,7 @@ sub config_to_command {
 }
 
 # add usb controllers
-my @usbcontrollers = PVE::QemuServer::USB::get_usb_controllers($conf, 
$bridges, $arch, $machine_type, $usbdesc->{format}, $MAX_USB_DEVICES);
+my @usbcontrollers = PVE::QemuServer::USB::get_usb_controllers($conf, 
$bridges, $arch, $machine_type, $kvmver, $usbdesc->{format}, $MAX_USB_DEVICES);
 push @$devices, @usbcontrollers if @usbcontrollers;
 my $vga = parse_vga($conf->{vga});
 
@@ -3808,7 +3808,7 @@ sub config_to_command {
 }
 
 # usb devices
-my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES);
+my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES, $machine_type, $kvmver);
 push @$devices, @usbdevices if @usbdevices;
 # serial devices
 for (my $i = 0; $i < $MAX_SERIAL_PORTS; $i++)  {
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index a2097b9..316eb09 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -3,6 +3,7 @@ package PVE::QemuServer::USB;
 use strict;
 use warnings;
 use PVE::QemuServer::PCI qw(print_pci_addr);
+use PVE::QemuServer;
 use PVE::JSONSchema;
 use base 'Exporter';
 
@@ -34,7 +35,7 @@ sub parse_usb_device {
 }
 
 sub get_usb_controllers {
-my ($conf, $bridges, $arch, $machine, $format, $max_usb_devices) = @_;
+my ($conf, $bridges, $arch, $machine, $kvmver, $format, $max_usb_devices) 
= @_;
 
 my $devices = [];
 my $pciaddr = "";
@@ -50,7 +51,10 @@ sub get_usb_controllers {
for (my $i = 0; $i < $max_usb_devices; $i++)  {
next if !$conf->{"usb$i"};
my $d = eval { 
PVE::JSONSchema::parse_property_string($format,$conf->{"usb$i"}) };
-   next if !$d || $d->{usb3}; # do not add usb2 controller if we have 
only usb3 devices
+
+   # don't add usb2 controller if usb3 device unless it's for spice and
+   # qemu version < 4.1 - for live migration
+   next if !$d || ($d->{usb3} && ($d->{host} ne "spice" || 
PVE::QemuServer::qemu_machine_feature_enabled($machine, $kvmver, 4, 1)));
$use_usb2 = 1;
}
# include usb device config
@@ -63,7 +67,10 @@ sub get_usb_controllers {
 for (my $i = 0; $i < $max_usb_devices; $i++)  {
next if !$conf->{"usb$i"};
my $d = eval { 
PVE::JSONSchema::parse_property_string($format,$conf->{"usb$i"}) };
-   next if !$d || !$d->{usb3};
+
+   # don't add usb3 controller if usb3 device is for spice and qemu version
+   # < 4.1 - for live migrations
+   next if !$d || !$d->{usb3} || ($d->{host} eq 'spice' && 
!PVE::QemuServer::qemu_machine_feature_enabled($machine, $kvmver, 4, 1));
$use_usb3 = 1;
 }
 
@@ -74,7 +81,7 @@ sub get_usb_controllers {
 }
 
 sub get_usb_devices {
-my ($conf, $format, $max_usb_devices) = @_;
+my ($conf, $format, $max_usb_devices, $machine, $kvmver) = @_;
 
 my $devices = [];
 
@@ -87,9 +94,12 @@ sub get_usb_devices {
my $hostdevice = parse_usb_device($d->{host});
$hostdevice->{usb3} = $d->{usb3};
if (defined($hostdevice->{spice}) && $hostdevice->{spice}) {
-   # usb redir support for spice, currently no usb3
+   # usb redir support for spice, usb3 available with qemu 4.1
+   my $bus = 'ehci';
+   $bus = 'xhci' if 
PVE::QemuServer::qemu_machine_feature_enabled($machine, $kvmver, 4, 1) && 
$hostdevice->{usb3};
+
push @$devices, '-chardev', 
"spicevmc,id=usbredirchardev$i,name=usbredir";
-   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
+   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=$bus.0";
} else {
push @$devices, '-device', print_usbdevice_full($conf, "usb$i", 
$hostdevice);
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH qemu-server] Fix #2343 Add USB3 support for Spice USB redirection

2019-08-28 Thread Aaron Lauterer
In a discussion with Stefan we came to the conclusion / realization that 
all the checks for $kvmver and $machine may not be necessary.


This patch is most likely not correct the way it is now. More feedback 
is welcome :)



On 8/28/19 4:26 PM, Aaron Lauterer wrote:

If USB3 is enabled for a USB port of host type spice add a USB3
controller and use it.

To not break live migration this is only enabled for qemu 4.1 and
higher.

Signed-off-by: Aaron Lauterer 
---
  PVE/QemuServer.pm |  4 ++--
  PVE/QemuServer/USB.pm | 22 --
  2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6e3b19e..375a34b 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3701,7 +3701,7 @@ sub config_to_command {
  }
  
  # add usb controllers

-my @usbcontrollers = PVE::QemuServer::USB::get_usb_controllers($conf, 
$bridges, $arch, $machine_type, $usbdesc->{format}, $MAX_USB_DEVICES);
+my @usbcontrollers = PVE::QemuServer::USB::get_usb_controllers($conf, 
$bridges, $arch, $machine_type, $kvmver, $usbdesc->{format}, $MAX_USB_DEVICES);
  push @$devices, @usbcontrollers if @usbcontrollers;
  my $vga = parse_vga($conf->{vga});
  
@@ -3808,7 +3808,7 @@ sub config_to_command {

  }
  
  # usb devices

-my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES);
+my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES, $machine_type, $kvmver);
  push @$devices, @usbdevices if @usbdevices;
  # serial devices
  for (my $i = 0; $i < $MAX_SERIAL_PORTS; $i++)  {
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index a2097b9..316eb09 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -3,6 +3,7 @@ package PVE::QemuServer::USB;
  use strict;
  use warnings;
  use PVE::QemuServer::PCI qw(print_pci_addr);
+use PVE::QemuServer;
  use PVE::JSONSchema;
  use base 'Exporter';
  
@@ -34,7 +35,7 @@ sub parse_usb_device {

  }
  
  sub get_usb_controllers {

-my ($conf, $bridges, $arch, $machine, $format, $max_usb_devices) = @_;
+my ($conf, $bridges, $arch, $machine, $kvmver, $format, $max_usb_devices) 
= @_;
  
  my $devices = [];

  my $pciaddr = "";
@@ -50,7 +51,10 @@ sub get_usb_controllers {
for (my $i = 0; $i < $max_usb_devices; $i++)  {
next if !$conf->{"usb$i"};
my $d = eval { 
PVE::JSONSchema::parse_property_string($format,$conf->{"usb$i"}) };
-   next if !$d || $d->{usb3}; # do not add usb2 controller if we have 
only usb3 devices
+
+   # don't add usb2 controller if usb3 device unless it's for spice and
+   # qemu version < 4.1 - for live migration
+   next if !$d || ($d->{usb3} && ($d->{host} ne "spice" || 
PVE::QemuServer::qemu_machine_feature_enabled($machine, $kvmver, 4, 1)));
$use_usb2 = 1;
}
# include usb device config
@@ -63,7 +67,10 @@ sub get_usb_controllers {
  for (my $i = 0; $i < $max_usb_devices; $i++)  {
next if !$conf->{"usb$i"};
my $d = eval { 
PVE::JSONSchema::parse_property_string($format,$conf->{"usb$i"}) };
-   next if !$d || !$d->{usb3};
+
+   # don't add usb3 controller if usb3 device is for spice and qemu version
+   # < 4.1 - for live migrations
+   next if !$d || !$d->{usb3} || ($d->{host} eq 'spice' && 
!PVE::QemuServer::qemu_machine_feature_enabled($machine, $kvmver, 4, 1));
$use_usb3 = 1;
  }
  
@@ -74,7 +81,7 @@ sub get_usb_controllers {

  }
  
  sub get_usb_devices {

-my ($conf, $format, $max_usb_devices) = @_;
+my ($conf, $format, $max_usb_devices, $machine, $kvmver) = @_;
  
  my $devices = [];
  
@@ -87,9 +94,12 @@ sub get_usb_devices {

my $hostdevice = parse_usb_device($d->{host});
$hostdevice->{usb3} = $d->{usb3};
if (defined($hostdevice->{spice}) && $hostdevice->{spice}) {
-   # usb redir support for spice, currently no usb3
+   # usb redir support for spice, usb3 available with qemu 4.1
+   my $bus = 'ehci';
+   $bus = 'xhci' if PVE::QemuServer::qemu_machine_feature_enabled($machine, 
$kvmver, 4, 1) && $hostdevice->{usb3};
+
push @$devices, '-chardev', 
"spicevmc,id=usbredirchardev$i,name=usbredir";
-   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
+   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=$bus.0";
} else {
push @$devices, '-device', print_usbdevice_full($conf, "usb$i", 
$hostdevice);
}



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager] Add USB3 support for Spice USB redirection

2019-08-30 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/qemu/USBEdit.js | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js
index 8fc95c99..20c30fe6 100644
--- a/www/manager6/qemu/USBEdit.js
+++ b/www/manager6/qemu/USBEdit.js
@@ -18,8 +18,6 @@ Ext.define('PVE.qemu.USBInputPanel', {
hwidfield.setDisabled(!newValue);
} else if(field.inputValue === 'port') {
portfield.setDisabled(!newValue);
-   } else if(field.inputValue === 'spice') {
-   usb3field.setDisabled(newValue);
}
}
},
@@ -62,7 +60,11 @@ Ext.define('PVE.qemu.USBInputPanel', {
var type = me.down('radiofield').getGroupValue();
switch (type) {
case 'spice':
-   val = 'spice'; break;
+   val = 'spice';
+   if (!/usb3/.test(val) && me.down('field[name=usb3]').getValue() 
=== true) {
+   val += ',usb3=1';
+   }
+   break;
case 'hostdevice':
case 'port':
val = me.down('pveUSBSelector[name=' + type + 
']').getUSBValue();
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH qemu-server 1/2] Add USB3 support to Spice USB redirection

2019-08-30 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 PVE/QemuServer/USB.pm | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index a2097b9..05c78cf 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -87,9 +87,12 @@ sub get_usb_devices {
my $hostdevice = parse_usb_device($d->{host});
$hostdevice->{usb3} = $d->{usb3};
if (defined($hostdevice->{spice}) && $hostdevice->{spice}) {
-   # usb redir support for spice, currently no usb3
+   # usb redir support for spice
+   my $bus = 'ehci';
+   $bus = 'xhci' if $hostdevice->{usb3};
+
push @$devices, '-chardev', 
"spicevmc,id=usbredirchardev$i,name=usbredir";
-   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
+   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=$bus.0";
} else {
push @$devices, '-device', print_usbdevice_full($conf, "usb$i", 
$hostdevice);
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH qemu-server 2/2] Fix local resources check for USB3 Spice devices

2019-08-30 Thread Aaron Lauterer
The check relied on the fact, that spice usb devices could not be usb3
in the past.

Signed-off-by: Aaron Lauterer 
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6e3b19e..0a0fda7 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2903,7 +2903,7 @@ sub check_local_resources {
 push @loc_res, "ivshmem" if $conf->{ivshmem};
 
 foreach my $k (keys %$conf) {
-   next if $k =~ m/^usb/ && ($conf->{$k} eq 'spice');
+   next if $k =~ m/^usb/ && ($conf->{$k} =~ m/spice/);
# sockets are safe: they will recreated be on the target side 
post-migrate
next if $k =~ m/^serial/ && ($conf->{$k} eq 'socket');
push @loc_res, $k if $k =~ m/^(usb|hostpci|serial|parallel)\d+$/;
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v2 qemu-server 0/2 pve-manager 0/1] Fix #2343 Spice USB3 support

2019-08-30 Thread Aaron Lauterer
This patch series enables USB3 for the passthrough / redirection of USB
devices via the Spice client.

AFAIU there is no need for special checks regarding live migration due
to the following reasons:
* USB3 for Spice was disabled in the GUI
* Setting `usb3=1` via the API or manually in the config file was
  ignored
  - hardcoded ehci bus
  - xhci controller added
  - if not needed by another USB device no ehci controller added -> VM
couldn't start
* Live migration with `usb3=1` set is not possible with older versions
  because it got recognized as a local resource.

v1[0] -> v2:
* no qemu version checks
* fix local resource check on migration
* add GUI support

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-August/038672.html

Aaron Lauterer (2):
  Add USB3 support to Spice USB redirection
  Fix local resources check for USB3 Spice devices
  Add USB3 support for Spice USB redirection

 (qemu-server) PVE/QemuServer.pm| 2 +-
 (qemu-server) PVE/QemuServer/USB.pm| 7 +--
 (pve-manager) www/manager6/qemu/USBEdit.js | 8 +---
 2 files changed, 6 insertions(+), 3 deletions(-)

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager] Add support for up to 10 PCI devices

2019-09-02 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/qemu/HardwareView.js | 4 ++--
 www/manager6/qemu/PCIEdit.js  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/manager6/qemu/HardwareView.js 
b/www/manager6/qemu/HardwareView.js
index 606c66e5..28384d37 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -257,7 +257,7 @@ Ext.define('PVE.qemu.HardwareView', {
header: gettext('USB Device') + ' (' + confid + ')'
};
}
-   for (i = 0; i < 4; i++) {
+   for (i = 0; i < 10; i++) {
confid = "hostpci" + i.toString();
rows[confid] = {
group: 30,
@@ -578,7 +578,7 @@ Ext.define('PVE.qemu.HardwareView', {
var noVMConfigHWTypePerm = !caps.vms['VM.Config.HWType'];
 
me.down('#addusb').setDisabled(noSysConsolePerm || (usbcount >= 5));
-   me.down('#addpci').setDisabled(noSysConsolePerm || (pcicount >= 4));
+   me.down('#addpci').setDisabled(noSysConsolePerm || (pcicount >= 
10));
me.down('#addaudio').setDisabled(noVMConfigHWTypePerm || 
(audiocount >= 1));
me.down('#addci').setDisabled(noSysConsolePerm || hasCloudInit);
 
diff --git a/www/manager6/qemu/PCIEdit.js b/www/manager6/qemu/PCIEdit.js
index 85d1f4ce..27646df6 100644
--- a/www/manager6/qemu/PCIEdit.js
+++ b/www/manager6/qemu/PCIEdit.js
@@ -36,7 +36,7 @@ Ext.define('PVE.qemu.PCIInputPanel', {
var ret = {};
if(!me.confid) {
var i;
-   for (i = 0; i < 5; i++) {
+   for (i = 0; i < 10; i++) {
if (!me.vmconfig['hostpci' +  i.toString()]) {
me.confid = 'hostpci' + i.toString();
break;
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH qemu-server 0/1 pve-manager 0/1] Fix #2347 Support 10 PCI(e) devices

2019-09-02 Thread Aaron Lauterer
This patch series adds support for up to 10 PCI(e) devices.

I tried to not spread out the needed pci addresses.

A few things regarding the file `pve-q35-4.0.cfg`:

* Some consideration and feedback is probably needed for
  `ich9-pcie-port-{9,10}` and their `addr` field.

* Adding the PCI root ports here is probably a bad idea and we need
  to create a new `pve-q35-4.1.cfg` file? But this would mean that
  the other changes could only be available once we ship Qemu 4.1?

Aaron Lauterer (1):
  Add support for up to 10 PCI(e) devices

qemu-server:

 PVE/QemuServer.pm |  2 +-
 PVE/QemuServer/PCI.pm | 18 +
 pve-q35-4.0.cfg   | 60 +++
 3 files changed, 79 insertions(+), 1 deletion(-)

pve-manager:

 www/manager6/qemu/HardwareView.js | 4 ++--
 www/manager6/qemu/PCIEdit.js  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH qemu-server 1/1] Add support for up to 10 PCI(e) devices

2019-09-02 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 PVE/QemuServer.pm |  2 +-
 PVE/QemuServer/PCI.pm | 18 +
 pve-q35-4.0.cfg   | 60 +++
 3 files changed, 79 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6e3b19e..451fcda 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -769,7 +769,7 @@ my $MAX_SATA_DISKS = 6;
 my $MAX_USB_DEVICES = 5;
 my $MAX_NETS = 32;
 my $MAX_UNUSED_DISKS = 256;
-my $MAX_HOSTPCI_DEVICES = 4;
+my $MAX_HOSTPCI_DEVICES = 10;
 my $MAX_SERIAL_PORTS = 4;
 my $MAX_PARALLEL_PORTS = 3;
 my $MAX_NUMA = 8;
diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm
index 9c72f3a..abfa462 100644
--- a/PVE/QemuServer/PCI.pm
+++ b/PVE/QemuServer/PCI.pm
@@ -80,6 +80,12 @@ my $devices = {
 'virtio15' => { bus => 2, addr => 10 },
 'ivshmem' => { bus => 2, addr => 11 },
 'audio0' => { bus => 2, addr => 12 },
+hostpci4 => { bus => 2, addr => 13 },
+hostpci5 => { bus => 2, addr => 14 },
+hostpci6 => { bus => 2, addr => 15 },
+hostpci7 => { bus => 2, addr => 16 },
+hostpci8 => { bus => 2, addr => 17 },
+hostpci9 => { bus => 2, addr => 18 },
 'virtioscsi0' => { bus => 3, addr => 1 },
 'virtioscsi1' => { bus => 3, addr => 2 },
 'virtioscsi2' => { bus => 3, addr => 3 },
@@ -147,12 +153,24 @@ sub print_pcie_addr {
hostpci1 => { bus => "ich9-pcie-port-2", addr => 0 },
hostpci2 => { bus => "ich9-pcie-port-3", addr => 0 },
hostpci3 => { bus => "ich9-pcie-port-4", addr => 0 },
+   hostpci4 => { bus => "ich9-pcie-port-5", addr => 0 },
+   hostpci5 => { bus => "ich9-pcie-port-6", addr => 0 },
+   hostpci6 => { bus => "ich9-pcie-port-7", addr => 0 },
+   hostpci7 => { bus => "ich9-pcie-port-8", addr => 0 },
+   hostpci8 => { bus => "ich9-pcie-port-9", addr => 0 },
+   hostpci9 => { bus => "ich9-pcie-port-10", addr => 0 },
# win7 is picky about pcie assignments
hostpci0bus0 => { bus => "pcie.0", addr => 16 },
hostpci1bus0 => { bus => "pcie.0", addr => 17 },
hostpci2bus0 => { bus => "pcie.0", addr => 18 },
hostpci3bus0 => { bus => "pcie.0", addr => 19 },
ivshmem => { bus => 'pcie.0', addr => 20 },
+   hostpci4bus0 => { bus => "pcie.0", addr => 21 },
+   hostpci5bus0 => { bus => "pcie.0", addr => 22 },
+   hostpci6bus0 => { bus => "pcie.0", addr => 23 },
+   hostpci7bus0 => { bus => "pcie.0", addr => 24 },
+   hostpci8bus0 => { bus => "pcie.0", addr => 25 },
+   hostpci9bus0 => { bus => "pcie.0", addr => 26 },
 };
 
 if (defined($devices->{$id}->{bus}) && defined($devices->{$id}->{addr})) {
diff --git a/pve-q35-4.0.cfg b/pve-q35-4.0.cfg
index c931417..307fd10 100644
--- a/pve-q35-4.0.cfg
+++ b/pve-q35-4.0.cfg
@@ -107,6 +107,66 @@
   port = "4"
   chassis = "4"
 
+[device "ich9-pcie-port-5"]
+  driver = "pcie-root-port"
+  x-speed = "16"
+  x-width = "32"
+  multifunction = "on"
+  bus = "pcie.0"
+  addr = "1c.4"
+  port = "5"
+  chassis = "5"
+
+[device "ich9-pcie-port-6"]
+  driver = "pcie-root-port"
+  x-speed = "16"
+  x-width = "32"
+  multifunction = "on"
+  bus = "pcie.0"
+  addr = "1c.5"
+  port = "6"
+  chassis = "6"
+
+[device "ich9-pcie-port-7"]
+  driver = "pcie-root-port"
+  x-speed = "16"
+  x-width = "32"
+  multifunction = "on"
+  bus = "pcie.0"
+  addr = "1c.6"
+  port = "7"
+  chassis = "7"
+
+[device "ich9-pcie-port-8"]
+  driver = "pcie-root-port"
+  x-speed = "16"
+  x-width = "32"
+  multifunction = "on"
+  bus = "pcie.0"
+  addr = "1c.7"
+  port = "8"
+  chassis = "8"
+
+[device "ich9-pcie-port-9"]
+  driver = "pcie-root-port"
+  x-speed = "16"
+  x-width = "32"
+  multifunction = "on"
+  bus = "pcie.0"
+  addr = "1d.4"
+  port = "9"
+  chassis = "9"
+
+[device "ich9-pcie-port-10"]
+  driver = "pcie-root-port"
+  x-speed = "16"
+  x-width = "32"
+  multifunction = "on"
+  bus = "pcie.0"
+  addr = "1d.5"
+  port = "10"
+  chassis = "10"
+
 ##
 # Example PCIe switch with two downstream ports
 #
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH qemu-server 1/2] Add USB3 support to Spice USB redirection

2019-09-02 Thread Aaron Lauterer




On 9/2/19 1:57 PM, Thomas Lamprecht wrote:

On 8/30/19 9:40 AM, Aaron Lauterer wrote:

Signed-off-by: Aaron Lauterer 
---
  PVE/QemuServer/USB.pm | 7 +--
  1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index a2097b9..05c78cf 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -87,9 +87,12 @@ sub get_usb_devices {
my $hostdevice = parse_usb_device($d->{host});
$hostdevice->{usb3} = $d->{usb3};
if (defined($hostdevice->{spice}) && $hostdevice->{spice}) {
-   # usb redir support for spice, currently no usb3
+   # usb redir support for spice
+   my $bus = 'ehci';
+   $bus = 'xhci' if $hostdevice->{usb3};
+
push @$devices, '-chardev', 
"spicevmc,id=usbredirchardev$i,name=usbredir";
-   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
+   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=$bus.0";
} else {
push @$devices, '-device', print_usbdevice_full($conf, "usb$i", 
$hostdevice);
}



what the commit message does not mentions:

One could have set an usb3 spice variant already, e.g., with:
# qm set 1000 --usb2 spice,usb3=1

and started it without issues, as we just ignored it.
Now, with your patch it will suddenly change the backing bus to
xhci, which (I assume) kills live migrations or restorations of
snapshot with RAM.

So this would need to be guarded somehow, e.g., with a qemu
machine version check.



As described in the cover letter this is only true if other USB2 devices 
are added. Because only then will there be a "ehci.0" bus.


Otherwise the start of the VM will fail with this error: "Bus 'ehci.0' 
not found".


I did not think about the snapshot restore situation. I will integrate a 
qemu machine version check to handle it.


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager] Add support for 16 PCI(e) devices

2019-09-05 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/qemu/HardwareView.js | 4 ++--
 www/manager6/qemu/PCIEdit.js  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/manager6/qemu/HardwareView.js 
b/www/manager6/qemu/HardwareView.js
index 606c66e5..cad29cc6 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -257,7 +257,7 @@ Ext.define('PVE.qemu.HardwareView', {
header: gettext('USB Device') + ' (' + confid + ')'
};
}
-   for (i = 0; i < 4; i++) {
+   for (i = 0; i < 16; i++) {
confid = "hostpci" + i.toString();
rows[confid] = {
group: 30,
@@ -578,7 +578,7 @@ Ext.define('PVE.qemu.HardwareView', {
var noVMConfigHWTypePerm = !caps.vms['VM.Config.HWType'];
 
me.down('#addusb').setDisabled(noSysConsolePerm || (usbcount >= 5));
-   me.down('#addpci').setDisabled(noSysConsolePerm || (pcicount >= 4));
+   me.down('#addpci').setDisabled(noSysConsolePerm || (pcicount >= 
16));
me.down('#addaudio').setDisabled(noVMConfigHWTypePerm || 
(audiocount >= 1));
me.down('#addci').setDisabled(noSysConsolePerm || hasCloudInit);
 
diff --git a/www/manager6/qemu/PCIEdit.js b/www/manager6/qemu/PCIEdit.js
index 85d1f4ce..438998a9 100644
--- a/www/manager6/qemu/PCIEdit.js
+++ b/www/manager6/qemu/PCIEdit.js
@@ -36,7 +36,7 @@ Ext.define('PVE.qemu.PCIInputPanel', {
var ret = {};
if(!me.confid) {
var i;
-   for (i = 0; i < 5; i++) {
+   for (i = 0; i < 16; i++) {
if (!me.vmconfig['hostpci' +  i.toString()]) {
me.confid = 'hostpci' + i.toString();
break;
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v2 qemu-server 1/1] Add support for up to 16 PCI(e) devices

2019-09-05 Thread Aaron Lauterer
For non pci express passthrough additional addresses are reserved.
For pcie passthrough pcie root ports are needed (unless guest is like
windows 7).

The first 4 pcie root ports are defined by default in the pve-q35*.cfg
files. If more than 4 pcie devices are passed through the needed root
ports are created on demand. This helps to keep live migration possible
without adding a new pve-q35*.cfg file.

For the windows 7 like guests additional addresses are reserved as well.

Signed-off-by: Aaron Lauterer 
---

I decided to move the creation of the device string for the additional
root ports to the `print_pcie_root_port` function in order to avoid
overly long code lines and not to bloat the config_to_command function
more than necessary.

For the addresses reserved: I looked for possible areas where to place
them that would not create address conflicts in my tests:
* win 10
* win 7
* ubuntu 19.04
all with machines types Q35 (pcie and non pcie) as well as i440fx (non
pcie)

I wasn't sure if I should put the `hostpciX` in quotes or not as the
PCI.pm file is a bit of a mess in that regard.

 PVE/QemuServer.pm |  8 +++--
 PVE/QemuServer/PCI.pm | 70 +++
 2 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6e3b19e..901cb2c 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -33,7 +33,7 @@ use PVE::QemuConfig;
 use PVE::QMPClient;
 use PVE::RPCEnvironment;
 use PVE::GuestHelpers;
-use PVE::QemuServer::PCI qw(print_pci_addr print_pcie_addr);
+use PVE::QemuServer::PCI qw(print_pci_addr print_pcie_addr 
print_pcie_root_port);
 use PVE::QemuServer::Memory;
 use PVE::QemuServer::USB qw(parse_usb_device);
 use PVE::QemuServer::Cloudinit;
@@ -769,7 +769,7 @@ my $MAX_SATA_DISKS = 6;
 my $MAX_USB_DEVICES = 5;
 my $MAX_NETS = 32;
 my $MAX_UNUSED_DISKS = 256;
-my $MAX_HOSTPCI_DEVICES = 4;
+my $MAX_HOSTPCI_DEVICES = 16;
 my $MAX_SERIAL_PORTS = 4;
 my $MAX_PARALLEL_PORTS = 3;
 my $MAX_NUMA = 8;
@@ -3750,6 +3750,10 @@ sub config_to_command {
if ($winversion == 7) {
$pciaddr = print_pcie_addr("hostpci${i}bus0");
} else {
+   # add more root ports if needed, 4 are present by default
+   if ($i > 3) {
+   push @$devices, '-device', print_pcie_root_port($i);
+   }
$pciaddr = print_pcie_addr("hostpci$i");
}
} else {
diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm
index 9c72f3a..728cde3 100644
--- a/PVE/QemuServer/PCI.pm
+++ b/PVE/QemuServer/PCI.pm
@@ -5,6 +5,7 @@ use base 'Exporter';
 our @EXPORT_OK = qw(
 print_pci_addr
 print_pcie_addr
+print_pcie_root_port
 );
 
 my $devices = {
@@ -80,6 +81,18 @@ my $devices = {
 'virtio15' => { bus => 2, addr => 10 },
 'ivshmem' => { bus => 2, addr => 11 },
 'audio0' => { bus => 2, addr => 12 },
+hostpci4 => { bus => 2, addr => 13 },
+hostpci5 => { bus => 2, addr => 14 },
+hostpci6 => { bus => 2, addr => 15 },
+hostpci7 => { bus => 2, addr => 16 },
+hostpci8 => { bus => 2, addr => 17 },
+hostpci9 => { bus => 2, addr => 18 },
+hostpci10 => { bus => 2, addr => 19 },
+hostpci11 => { bus => 2, addr => 20 },
+hostpci12 => { bus => 2, addr => 21 },
+hostpci13 => { bus => 2, addr => 22 },
+hostpci14 => { bus => 2, addr => 23 },
+hostpci15 => { bus => 2, addr => 24 },
 'virtioscsi0' => { bus => 3, addr => 1 },
 'virtioscsi1' => { bus => 3, addr => 2 },
 'virtioscsi2' => { bus => 3, addr => 3 },
@@ -147,12 +160,36 @@ sub print_pcie_addr {
hostpci1 => { bus => "ich9-pcie-port-2", addr => 0 },
hostpci2 => { bus => "ich9-pcie-port-3", addr => 0 },
hostpci3 => { bus => "ich9-pcie-port-4", addr => 0 },
+   hostpci4 => { bus => "ich9-pcie-port-5", addr => 0 },
+   hostpci5 => { bus => "ich9-pcie-port-6", addr => 0 },
+   hostpci6 => { bus => "ich9-pcie-port-7", addr => 0 },
+   hostpci7 => { bus => "ich9-pcie-port-8", addr => 0 },
+   hostpci8 => { bus => "ich9-pcie-port-9", addr => 0 },
+   hostpci9 => { bus => "ich9-pcie-port-10", addr => 0 },
+   hostpci10 => { bus => "ich9-pcie-port-11", addr => 0 },
+   hostpci11 => { bus => "ich9-pcie-port-12", addr => 0 },
+   hostpci12 => { bus => "ich9-pcie-port-13", addr => 0 },
+   hostpci13 => { bus => "ich9-pcie-port-14", addr => 0 },
+   hostpci14 => { bus => "ich9-

[pve-devel] [PATCH v2 qemu-server 0/1 pve-manager 0/1] Fix #2347 Support 16 PCI(e) devices

2019-09-05 Thread Aaron Lauterer
This patch series adds support to pass through up to 16 pci(e) devices.

v1[0] -> v2:
* support 16 and not 10 pci devs
* create additional pcie root ports on demand, thanks to Dominik for
  the suggestion
* change pci address reservations as larger spaces are needed

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/038743.html

Aaron Lauterer (2):
  Add support for up to 16 PCI(e) devices

qemu-server:

 PVE/QemuServer.pm |  8 +++--
 PVE/QemuServer/PCI.pm | 70 +++
 2 files changed, 76 insertions(+), 2 deletions(-)

pve-manager:

 www/manager6/qemu/HardwareView.js | 4 ++--
 www/manager6/qemu/PCIEdit.js  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH v2 qemu-server 1/1] Add support for up to 16 PCI(e) devices

2019-09-06 Thread Aaron Lauterer



On 9/6/19 2:45 PM, Dominik Csapak wrote:

looks mostly ok, one (important) comment inline


  # win7 is picky about pcie assignments
  hostpci0bus0 => { bus => "pcie.0", addr => 16 },
  hostpci1bus0 => { bus => "pcie.0", addr => 17 },
  hostpci2bus0 => { bus => "pcie.0", addr => 18 },
  hostpci3bus0 => { bus => "pcie.0", addr => 19 },
  ivshmem => { bus => 'pcie.0', addr => 20 },
+    hostpci4bus0 => { bus => "pcie.0", addr => 9 },
+    hostpci5bus0 => { bus => "pcie.0", addr => 10 },
+    hostpci6bus0 => { bus => "pcie.0", addr => 11 },
+    hostpci7bus0 => { bus => "pcie.0", addr => 12 },
+    hostpci8bus0 => { bus => "pcie.0", addr => 13 },
+    hostpci9bus0 => { bus => "pcie.0", addr => 14 },
+    hostpci10bus0 => { bus => "pcie.0", addr => 15 },
+    hostpci11bus0 => { bus => "pcie.0", addr => 20 },


addr 20 is already used by ivshmem

i would prefer to have the list in order of the addresses, so that this
will be more obvious and does not happen. also thomas mentioned offlist 
that it would be nice to have a test that automatically checks this, and 
i agree, but no one had time to do this (for now)




Thanks for catching that one!

___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v3 qemu-server 2/3] Fix local resource check of Spice USB devices

2019-09-06 Thread Aaron Lauterer
The check relied on the fact that in a regular use case a usb device of
type spice would not have any other settings like `usb3=1`. An exact
match worked fine for this.

This patch changes the behaviour and makes it possible to migrate VMs
with Spice USB devices that have additional usb options set.

Signed-off-by: Aaron Lauterer 
---

The proposed[0] /^spice(,)?$/ regex does not match the `usb3=1` part and
fails. I opted for the simpler regex that checks if `spice` is that the
beginning.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/038749.html

 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 0489b27..5334cad 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2925,7 +2925,7 @@ sub check_local_resources {
 push @loc_res, "ivshmem" if $conf->{ivshmem};
 
 foreach my $k (keys %$conf) {
-   next if $k =~ m/^usb/ && ($conf->{$k} eq 'spice');
+   next if $k =~ m/^usb/ && ($conf->{$k} =~ m/^spice/);
# sockets are safe: they will recreated be on the target side 
post-migrate
next if $k =~ m/^serial/ && ($conf->{$k} eq 'socket');
push @loc_res, $k if $k =~ m/^(usb|hostpci|serial|parallel)\d+$/;
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v3 qemu-server pve-manager 0/3] Fix #2343 Spice USB3 support

2019-09-06 Thread Aaron Lauterer
This patch series enables USB3 for the passthrough / redirection of USB
devices via the Spice client.

v2 -> v3:
* don't modify current behavior
* fix local resource check
* fix and cleanup GUI code

v1 -> v2:
* no qemu version checks
* fix local resource check on migration
* add GUI support

Aaron Lauterer (3):
  (qemu-server) Add USB3 capablities to Spice USB devices
  (qemu-server) Fix local resource check of Spice USB devices
  (pve-manager) Enable USB3 for Spice USB passthrough

qemu-server:

 PVE/QemuServer.pm |  4 ++--
 PVE/QemuServer/USB.pm | 10 +++---
 2 files changed, 9 insertions(+), 5 deletions(-)

pve-manager:

 www/manager6/qemu/USBEdit.js | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v3 manager 3/3] Enable USB3 for Spice USB passthrough

2019-09-06 Thread Aaron Lauterer
Instead of having two times the check if the USB3 setting needs to be
added to the config string it is now checked at one place only.

If USB3 is checked for a non USB3 device it will be attached to the USB2
root hub of the xhci controller.

Signed-off-by: Aaron Lauterer 
---

@Thomas: I hope I understood correctly what you suggested[0] cleaning
this a bit up.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/038758.html
 www/manager6/qemu/USBEdit.js | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js
index 8fc95c99..776908a2 100644
--- a/www/manager6/qemu/USBEdit.js
+++ b/www/manager6/qemu/USBEdit.js
@@ -19,7 +19,7 @@ Ext.define('PVE.qemu.USBInputPanel', {
} else if(field.inputValue === 'port') {
portfield.setDisabled(!newValue);
} else if(field.inputValue === 'spice') {
-   usb3field.setDisabled(newValue);
+   usb3field.setDisabled(!newValue);
}
}
},
@@ -66,14 +66,15 @@ Ext.define('PVE.qemu.USBInputPanel', {
case 'hostdevice':
case 'port':
val = me.down('pveUSBSelector[name=' + type + 
']').getUSBValue();
-   if (!/usb3/.test(val) && me.down('field[name=usb3]').getValue() 
=== true) {
-   val += ',usb3=1';
-   }
break;
default:
throw "invalid type selected";
}
 
+   if (values.usb3) {
+   delete values.usb3;
+   val += ',usb3=1';
+   }
values[me.confid] = val;
return values;
 },
@@ -131,7 +132,7 @@ Ext.define('PVE.qemu.USBInputPanel', {
{
xtype: 'checkbox',
name: 'usb3',
-   submitValue: false,
+   inputValue: true,
reference: 'usb3',
fieldLabel: gettext('Use USB3')
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v3 qemu-server 1/3] Add USB3 capablities to Spice USB devices

2019-09-06 Thread Aaron Lauterer
To not change current behaviour and thus breaking live migration USB3
for a Spice USB device requires Qemu v4.1.

The old behavior was that even though technically it was possible to
the set `usb3=1` setting, it was ignored. The bus was hardcoded to
ehci. If another USB2 device was added or the machine type was set to
Q35 an ehci controller was present and the VM was able to boot.

With this patch the behaviour is changing and the bus is set to xhci if
USB3 is set for the Spice USB device and the VM is running under Qemu
v4.1.

Signed-off-by: Aaron Lauterer 
---

I use the `qemu_machine_feature_enabled` function from QemuServer.pm to
check against Qemu v4.1


 PVE/QemuServer.pm |  2 +-
 PVE/QemuServer/USB.pm | 10 +++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a424720..0489b27 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3830,7 +3830,7 @@ sub config_to_command {
 }
 
 # usb devices
-my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES);
+my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES, $machine_type, $kvmver);
 push @$devices, @usbdevices if @usbdevices;
 # serial devices
 for (my $i = 0; $i < $MAX_SERIAL_PORTS; $i++)  {
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index a2097b9..af24636 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -3,6 +3,7 @@ package PVE::QemuServer::USB;
 use strict;
 use warnings;
 use PVE::QemuServer::PCI qw(print_pci_addr);
+use PVE::QemuServer;
 use PVE::JSONSchema;
 use base 'Exporter';
 
@@ -74,7 +75,7 @@ sub get_usb_controllers {
 }
 
 sub get_usb_devices {
-my ($conf, $format, $max_usb_devices) = @_;
+my ($conf, $format, $max_usb_devices, $machine, $kvmver) = @_;
 
 my $devices = [];
 
@@ -87,9 +88,12 @@ sub get_usb_devices {
my $hostdevice = parse_usb_device($d->{host});
$hostdevice->{usb3} = $d->{usb3};
if (defined($hostdevice->{spice}) && $hostdevice->{spice}) {
-   # usb redir support for spice, currently no usb3
+   # usb redir support for spice
+   my $bus = 'ehci';
+   $bus = 'xhci' if $hostdevice->{usb3} && 
PVE::QemuServer::qemu_machine_feature_enabled($machine, $kvmver, 4, 1);
+
push @$devices, '-chardev', 
"spicevmc,id=usbredirchardev$i,name=usbredir";
-   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
+   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=$bus.0";
} else {
push @$devices, '-device', print_usbdevice_full($conf, "usb$i", 
$hostdevice);
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs 2/9] Rewrite Improve PVE Docs

2019-09-10 Thread Aaron Lauterer
Polished phrasing

Signed-off-by: Aaron Lauterer 
---
 howto-improve-pve-docs.adoc | 42 +
 1 file changed, 19 insertions(+), 23 deletions(-)

diff --git a/howto-improve-pve-docs.adoc b/howto-improve-pve-docs.adoc
index c0d277e..940e050 100644
--- a/howto-improve-pve-docs.adoc
+++ b/howto-improve-pve-docs.adoc
@@ -5,32 +5,28 @@ ifdef::wiki[]
 :pve-toplevel:
 endif::wiki[]
 
-Depending on which issue you want to improve, you can use a variety of
-communication mediums to reach the developers.
+Contributions and improvements to the {pve} documentation are always welcome.
+There are several ways to contribute.
 
-If you notice an error in the current documentation, use the
-http://bugzilla.proxmox.com[Proxmox bug tracker] and propose an
-alternate text/wording.
+If you find errors or other room for improvement in this documentation, please
+file a bug at the https://bugzilla.proxmox.com/[Proxmox bug tracker] to propose
+a correction.
 
-If you want to propose new content, it depends on what you want to
-document:
+If you want to propose new content, choose one of the following options:
 
-* if the content is specific to your setup, a wiki article is the best
-option. For instance if you want to document specific options for guest
-systems, like which combination of Qemu drivers work best with a less popular
-OS, this is a perfect fit for a wiki article.
+* The wiki: For specific setups, how-to guides, or tutorials the wiki   is the
+right option to contribute.
 
-* if you think the content is generic enough to be of interest for all users,
-then you should try to get it into the reference documentation. The reference
-documentation is written in the easy to use 'asciidoc' document format.
-Editing the official documentation requires to clone the git repository at
-`git://git.proxmox.com/git/pve-docs.git` and then follow the
-https://git.proxmox.com/?p=pve-docs.git;a=blob_plain;f=README.adoc;hb=HEAD[README.adoc]
 document.
-
-Improving the documentation is just as easy as editing a Wikipedia
-article and is an interesting foray in the development of a large
-opensource project.
+* The reference documentation: For general content that will be   helpful to 
all
+  users please propose your contribution for the   reference documentation. 
This
+  includes all information about how to install, configure, use, and
+  troubleshoot {pve} features. The reference documentation is written in the
+  https://en.wikipedia.org/wiki/AsciiDoc[asciidoc format]. To edit the
+  documentation you need to clone the git repository at
+  `git://git.proxmox.com/git/pve-docs.git`; then follow the
+  
https://git.proxmox.com/?p=pve-docs.git;a=blob_plain;f=README.adoc;hb=HEAD[README.adoc]
+  document.
 
 NOTE: If you are interested in working on the {pve} codebase, the
-{webwiki-url}Developer_Documentation[Developer Documentation] wiki
-article will show you where to start.
+{webwiki-url}Developer_Documentation[Developer Documentation] wiki article will
+show you where to start.
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs 6/9] Rewrite Install from USB flash drive

2019-09-10 Thread Aaron Lauterer
Polished the phrasing, aligned different names for a USB flash drive,
renamed OS X to macOS, changed primary recommendation for Windows to
Rufus, removed mention of os forensics.

Rufus now supports `dd` mode and is a much smaller download than
etcher.

Signed-off-by: Aaron Lauterer 
---
 pve-usbstick.adoc | 109 +++---
 1 file changed, 54 insertions(+), 55 deletions(-)

diff --git a/pve-usbstick.adoc b/pve-usbstick.adoc
index 5eb9132..d83b7a6 100644
--- a/pve-usbstick.adoc
+++ b/pve-usbstick.adoc
@@ -1,121 +1,120 @@
-Install from USB Stick
---
+Install from a USB flash drive
+--
 ifdef::wiki[]
 :pve-toplevel:
 endif::wiki[]
 
-The {pve} installation media is a hybrid ISO image, working in two ways:
+The {pve} installation media is a hybrid ISO image. It works in two ways:
 
-* An ISO image file ready to burn on CD
+* An ISO image file ready to burn to a CD or DVD.
 
-* A raw sector (IMG) image file ready to directly copy to flash media
-  (USB Stick)
+* A raw sector (IMG) image file ready to copy to a USB flash drive (USB stick).
 
-Using USB sticks is faster and more environmental friendly and
-therefore the recommended way to install {pve}.
+Using a USB flash drive to install {pve} is the recommended way as it is the
+faster option.
 
+Prepare a USB flash drive as installation medium
+
 
-Prepare a USB flash drive as install medium
-~~~
-
-In order to boot the installation media, copy the ISO image to a USB
-media.
-
-First download the ISO image from
+Download the installer ISO image from:
 https://www.proxmox.com/en/downloads/category/iso-images-pve
 
-You need at least a 1 GB USB media.
+The flash drive needs to have at least 1GB of storage available.
 
-NOTE: Using UNetbootin or Rufus does not work.
+NOTE: Do not use UNetbootin. It does not work with the {pve} installation 
image.
 
-IMPORTANT: Make sure that the USB media is not mounted and does not
+IMPORTANT: Make sure that the USB flash drive is not mounted and does not
 contain any important data.
 
 
 Instructions for GNU/Linux
 ~~
 
-You can simply use `dd` on UNIX like systems. First download the ISO
-image, then plug in the USB stick. You need to find out what device
-name gets assigned to the USB stick (see below). Then run:
+On Unix-like operating system use the `dd` command to copy the ISO image to the
+USB flash drive. First find the correct device name of the USB flash drive (see
+below). Then run the `dd` command.
 
 
-dd if=proxmox-ve_*.iso of=/dev/XYZ bs=1M
+# dd if=proxmox-ve_*.iso of=/dev/XYZ bs=1M
 
 
 NOTE: Be sure to replace /dev/XYZ with the correct device name.
 
-CAUTION: Be very careful, and do not overwrite the hard disk!
+CAUTION: Be very careful, and do not overwrite the wrong disk!
 
 
-Find Correct USB Device Name
-
-
-You can compare the last lines of 'dmesg' command before and after the
-insertion, or use the 'lsblk' command. Open a terminal and run:
+Find the correct USB device name
+
+There are two ways to find out the name of the USB flash drive. The first one 
is
+to compare the last lines of the `dmesg` command output before and after
+plugging in the flash drive. The second way is to compare the output of the
+`lsblk` command. Open a terminal and run:
 
 
- lsblk
+# lsblk
 
 
-Then plug in your USB media and run the command again:
+Then plug in your USB flash drive and run the command again:
 
 
- lsblk
+# lsblk
 
 
-A new device will appear, and this is the USB device you want to use.
+A new device will appear. This is the one you want to use. To be on the extra
+safe side check if the reported size matches your USB flash drive.
 
 
-Instructions for OSX
-
+Instructions for macOS
+~~
 
 Open the terminal (query Terminal in Spotlight).
 
-Convert the .iso file to .img using the convert option of hdiutil for example.
+Convert the .iso file to .img using the convert option of `hdiutil` for 
example.
 
 
-hdiutil convert -format UDRW -o proxmox-ve_*.dmg proxmox-ve_*.iso
+# hdiutil convert -format UDRW -o proxmox-ve_*.dmg proxmox-ve_*.iso
 
 
-TIP: OS X tends to put the .dmg ending on the output file automatically.
+TIP: macOS tends to automatically add '.dmg' to the output file name.
 
-To get the current list of devices run the command again:
+To get the current list of devices run the command:
 
 
-diskutil list
+# diskutil list
 
 
-Now insert your USB flash media and run this command again to
-determine the device node assigned to your flash media
-(e.g. /dev/diskX).
+Now insert the USB flash drive and run this command again to determine which
+device node has been assigned to it. (e.g., /dev/diskX).
 
 
-diskutil list
-
-diskutil unmountDi

[pve-devel] [PATCH docs 4/9] Rewrite Installation

2019-09-10 Thread Aaron Lauterer
Polished phrasing, added mentions of the EULA and summary page in the
installer, unified style of cli commands.

Signed-off-by: Aaron Lauterer 
---
 pve-installation.adoc | 278 --
 1 file changed, 134 insertions(+), 144 deletions(-)

diff --git a/pve-installation.adoc b/pve-installation.adoc
index c07e1fb..cb5f2d1 100644
--- a/pve-installation.adoc
+++ b/pve-installation.adoc
@@ -1,5 +1,5 @@
-Installing Proxmox VE
-=
+Installing {pve}
+
 ifndef::manvolnum[]
 :pve-toplevel:
 endif::manvolnum[]
@@ -7,19 +7,19 @@ ifdef::wiki[]
 :title: Installation
 endif::wiki[]
 
-{pve} is based on Debian, therefore the disk image (ISO file) provided
-by us includes a complete Debian system ("stretch" for version 5.x) as
-well as all necessary {pve} packages.
+{pve} is based on Debian. This is why the install disk images (ISO files)
+provided by Proxmox include a complete Debian system (Debian 9 "stretch" for
+{pve} version 5.x) as well as all necessary {pve} packages.
 
-Using the installer will guide you through the setup, allowing
-you to partition the local disk(s), apply basic system configurations
-(e.g. timezone, language, network) and install all required packages.
-Using the provided ISO will get you started in just a few minutes,
-that's why we recommend this method for new and existing users.
+The installer will guide through the setup, allowing you to partition the local
+disk(s), apply basic system configurations (e.g. timezone, language, network)
+and install all required packages. This process should not take more than a few
+minutes. Installing with the provided ISO is the recommended method for new and
+existing users.
 
-Alternatively, {pve} can be installed on top of an existing Debian
-system. This option is only recommended for advanced users since
-detailed knowledge about {pve} is necessary.
+Alternatively, {pve} can be installed on top of an existing Debian system. This
+option is only recommended for advanced users as detailed knowledge about {pve}
+is required.
 
 ifndef::wiki[]
 
@@ -31,103 +31,102 @@ endif::wiki[]
 Using the {pve} Installer
 -
 
-You can download the ISO from {website}en/downloads.
-It includes the following:
+Download the installer ISO at {website}en/downloads. It includes the following:
 
 * Complete operating system (Debian Linux, 64-bit)
 
-* The {pve} installer, which partitions the local disk(s) with ext4,
-  ext3, xfs or ZFS and installs the operating system.
+* The {pve} installer, which partitions the local disk(s) with ext4, ext3, xfs
+  or ZFS and installs the operating system.
 
-* {pve} kernel (Linux) with LXC and KVM support
+* {pve} kernel (Linux) with KVM and LXC support
 
-* Complete toolset for administering virtual machines, containers and
-  all necessary resources
+* Complete toolset for administering virtual machines, containers, and all
+  necessary resources
 
-* Web based management interface for using the toolset
+* Web-based management interface
 
-NOTE: During the installation process, the complete server
-is used by default and all existing data is removed.
+NOTE: All existing data on the server will be removed during the installation
+process.
 
-Please insert the installation media (e.g. USB stick, CD-ROM) and boot
+Please insert the installation media (e.g. USB flash drive, CD-ROM) and boot
 from it.
 
 [thumbnail="screenshot/pve-grub-menu.png"]
 
-After choosing the correct entry (e.g. Boot from USB) the {pve} menu
-will be displayed, you can now select one of the following options:
+After choosing the correct entry (e.g. Boot from USB) the {pve} menu will be
+displayed and one of the following options can be selected:
 
-Install Proxmox VE::
+Install {pve}::
 
-Start normal installation.
+Starts the normal installation.
 
-TIP: It is possible to only use the keyboard to progress through the
-installation wizard. Buttons can be pressed by pressing down the `ALT`
-key, combined with the underlined character from the respective Button.
-For example, `ALT + N` to press a `Next` button.
+TIP: It's possible to use the installation wizard with a keyboard only. Buttons
+can be clicked by pressing the `ALT` key combined with the underlined character
+from the respective button. For example, `ALT + N` to press a `Next` button.
 
-Install Proxmox VE (Debug mode)::
+Install {pve} (Debug mode)::
 
-Start installation in debug mode. It opens a shell console at several
-installation steps, so that you can debug things if something goes
-wrong. Please press `CTRL-D` to exit those debug consoles and continue
-installation. This option is mostly for developers and not meant for
-general use.
+Starts the installation in debug mode. A console will be opened at several
+installation steps. This helps to debug the situation if something goes wrong.
+To exit a debug console, press `CTRL-D`. This options is primarily for
+dev

[pve-devel] [PATCH docs 1/9] Rewrite Getting Help

2019-09-10 Thread Aaron Lauterer
Polished phrasing

Signed-off-by: Aaron Lauterer 
---
 getting-help.adoc | 42 --
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/getting-help.adoc b/getting-help.adoc
index 850d7a3..49d9085 100644
--- a/getting-help.adoc
+++ b/getting-help.adoc
@@ -16,45 +16,43 @@ documentation with user contributed content.
 Community Support Forum
 ~~~
 
-{pve} itself is fully open source, so we always encourage our users to
-discuss and share their knowledge using the {forum}. The forum is fully
-moderated by the Proxmox support team, and has a quite large user base
-around the whole world. Needless to say that such a large forum is a
+We always encourage our users to discuss and share their knowledge using the
+{forum}. The forum is moderated by the Proxmox support team. The large user 
base
+is spread out all over the world. Needless to say that such a large forum is a
 great place to get information.
 
 Mailing Lists
 ~
 
-This is a fast way to communicate via email with the Proxmox VE
-community
+This is a fast way to communicate via email with the Proxmox VE community
 
 * Mailing list for users:
-  http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user[PVE User
-  List]
+  http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user[PVE User  List]
 
 The primary communication channel for developers is:
 
-* Mailing list for developer:
-  http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel[PVE
-  development discussion]
+* Mailing list for developers:
+  http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel[PVE  development
+  discussion]
 
 
 Commercial Support
 ~~
 
-{proxmoxGmbh} also offers commercial 
-https://www.proxmox.com/en/proxmox-ve/pricing[{pve} Subscription Service
-Plans]. System Administrators with a standard subscription plan can access a 
-dedicated support portal with guaranteed response time, where {pve}
-developers help them should an issue appear.
-Please contact the mailto:off...@proxmox.com[Proxmox sales
-team] for more information or volume discounts.
+{proxmoxGmbh} also offers enterprise support available as
+https://www.proxmox.com/en/proxmox-ve/pricing[{pve} Subscription Service 
Plans].
+All users with a subscription get access to the {pve} Enterprise Repository,
+and--with a Basic, Standard or Premium subscription--also to the Proxmox
+Customer Portal. The customer portal provides help and support with guaranteed
+response times from the {pve} developers.
+
+For more information, please contact
+mailto:off...@proxmox.com[off...@proxmox.com].
 
 
 Bug Tracker
 ~~~
 
-We also run a public bug tracker at
-https://bugzilla.proxmox.com. If you ever detect an issue, you can
-file a bug report there. This makes it easy to track its status, and
-you will get notified as soon as the problem is fixed.
+{pve} runs a public bug tracker at https://bugzilla.proxmox.com. If an issue
+appears, file your bug report there. The bug tracker helps to keep track of the
+bug and will send a notification once the issue has been solved.
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs 7/9] Rewrite Sysadmin

2019-09-10 Thread Aaron Lauterer
Polished phrasing

Signed-off-by: Aaron Lauterer 
---
 sysadmin.adoc | 40 +++-
 1 file changed, 15 insertions(+), 25 deletions(-)

diff --git a/sysadmin.adoc b/sysadmin.adoc
index e045610..9592c4a 100644
--- a/sysadmin.adoc
+++ b/sysadmin.adoc
@@ -5,31 +5,21 @@ ifndef::manvolnum[]
 :pve-toplevel:
 endif::manvolnum[]
 
-{pve} is based on the famous https://www.debian.org/[Debian] Linux
-distribution. That means that you have access to the whole world of
-Debian packages, and the base system is well documented. The
+The following sections will focus on common virtualization tasks and explain 
the
+{pve} specifics regarding the administration and management of the host 
machine.
+
+{pve} is based on https://www.debian.org/[Debian] GNU/Linux with additional
+repositories to provides the {pve} related packages. This means that the full
+range of Debian packages is available as well as security updates and bug 
fixes.
+{pve} provides it's own Linux kernel based on the Ubuntu kernel. It has all the
+necessary virtualization and container featues enabled and includes
+https://zfsonlinux.org[ZFS] and serveral extra hardware drivers.
+
+For other topics not included in the following sections, please refer to the
+Debian documentation. The
 https://debian-handbook.info/download/stable/debian-handbook.pdf[Debian
-Administrator\'s Handbook] is available online, and provides a
-comprehensive introduction to the Debian operating system (see
-xref:Hertzog13[]).
-
-A standard {pve} installation uses the default repositories from
-Debian, so you get bug fixes and security updates through that
-channel. In addition, we provide our own package repository to roll
-out all {pve} related packages. This includes updates to some
-Debian packages when necessary.
-
-We also deliver a specially optimized Linux kernel, where we enable all
-required virtualization and container features. That kernel includes
-drivers for http://zfsonlinux.org/[ZFS], and several hardware drivers.
-For example, we ship Intel network card drivers to support their
-newest hardware.
-
-The following sections will concentrate on virtualization related
-topics. They either explain things which are different on {pve}, or
-tasks which are commonly used on {pve}. For other topics, please refer
-to the standard Debian documentation.
-
+Administrator\'s Handbook] is available online, and provides a comprehensive
+introduction to the Debian operating system (see xref:Hertzog13[]).
 
 ifdef::wiki[]
 
@@ -38,7 +28,7 @@ See Also
 
 * link:/wiki/Package_Repositories[Package Repositories]
 
-* link:/wiki/Network_Configuration[Network Configuration] 
+* link:/wiki/Network_Configuration[Network Configuration]
 
 * link:/wiki/System_Software_Updates[System Software Updates]
 
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs 0/9] Documentation overhaul chapt. 1.9 to 3.2

2019-09-10 Thread Aaron Lauterer
This is the first patch series aimed to overhaul our documentation. The
main goal is to make it easier to understand and more consistent.
Therefore the phrasing is changed in a lot of places, sometimes the
ordering of content as well. I tried to align the source to the 80
characters per line wherever possible.

Even though it was agreed with Fabian for him to proof read it on a
technical level everyone please give feedback if you find technical
errors or outdated information and of course typos :).

The reason why this first patch series doesn't start at the very
beginning is because we are not yet happy with few things there.

Aaron Lauterer (9):
  Rewrite Getting Help
  Rewrite Improve PVE Docs
  Rewrite Translation
  Rewrite Installation
  Rewrite System Requirements
  Rewrite Install from USB flash drive
  Rewrite Sysadmin
  Rewrite Package Repositories
  Rewrite System Software Updates

 getting-help.adoc|  42 +++---
 howto-improve-pve-docs.adoc  |  42 +++---
 pve-installation.adoc| 278 +--
 pve-package-repos.adoc   | 154 +--
 pve-system-requirements.adoc |  69 -
 pve-usbstick.adoc| 109 +++---
 sysadmin.adoc|  40 ++---
 system-software-updates.adoc |  25 ++--
 translation.adoc |  38 ++---
 9 files changed, 388 insertions(+), 407 deletions(-)

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs 3/9] Rewrite Translation

2019-09-10 Thread Aaron Lauterer
Polished phrasing

Signed-off-by: Aaron Lauterer 
---
 translation.adoc | 38 --
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/translation.adoc b/translation.adoc
index ff99296..21dd1eb 100644
--- a/translation.adoc
+++ b/translation.adoc
@@ -6,24 +6,26 @@ ifdef::wiki[]
 endif::wiki[]
 
 
-A lot of users speak a language other than English and we depend on 
contributions
-to make {pve} available to users all over the world.
-We are always happy to welcome new localizers and invite you to help shape
-{pve}.
+The {pve} user interface is in English by default. Thanks to contributions by
+the community, translations to other languages are available. Translations for
+new languages and new features as well as improvements to incomplete or
+inconsistent translations are always needed. Translators are always very 
welcome
+to help improve and shape {pve}.
 
-Our language files are available as 
https://git.proxmox.com/?p=proxmox-i18n.git[git repository].
-If you are familiar with git we would be glad to see your contribution 
according
-to our {webwiki-url}Developer_Documentation[Developer Documentation].
+The language files are available as a
+https://git.proxmox.com/?p=proxmox-i18n.git[git repository]. If you are 
familiar
+with git, please contribute according to our
+{webwiki-url}Developer_Documentation[Developer Documentation].
 
-Nonetheless, translating does not require special technical skills.
-You can get the language files without setting up a development environment
-https://git.proxmox.com/?p=proxmox-i18n.git;a=tree[here].
-Right click on the "raw" link of your language and choose "Save Link As...".
-Do not hesitate to send your translation directly to office(at)proxmox.com with
-your signed 
{webwiki-url}Developer_Documentation#Software_License_and_Copyright[contributor 
license agreement].
+Even if you are not familiar with git, you can help with translating {pve}.
+Download the language files
+https://git.proxmox.com/?p=proxmox-i18n.git;a=tree[here]. Then choose the
+language you want to improve. Right click on the "raw" link of this language
+file, and select 'Save Link As…​'. Make your changes to the file, and then
+send your final translation directly to office(at)proxmox.com together with a
+signed
+{webwiki-url}Developer_Documentation#Software_License_and_Copyright[contributor
 license agreement].
 
-We use https://www.gnu.org/software/gettext/[gettext] to translate {pve}.
-As a result, the actual translation task is to write a translation of the
-`msgid` into the `msgstr` below it.
-Tools like https://poedit.net/[Poedit] make this process more convenient,
-especially for contributors who are not programmers.
+We use https://www.gnu.org/software/gettext/[gettext] for the management of the
+translation files. Tools like https://poedit.net/[Poedit] offer a nice user
+interface to edit the translation files.
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs 5/9] Rewrite System Requirements

2019-09-10 Thread Aaron Lauterer
Polished phrasing and restructured the requirements list a little bit

Signed-off-by: Aaron Lauterer 
---
 pve-system-requirements.adoc | 69 +++-
 1 file changed, 36 insertions(+), 33 deletions(-)

diff --git a/pve-system-requirements.adoc b/pve-system-requirements.adoc
index 0a4ba6c..c61c000 100644
--- a/pve-system-requirements.adoc
+++ b/pve-system-requirements.adoc
@@ -4,22 +4,23 @@ ifdef::wiki[]
 :pve-toplevel:
 endif::wiki[]
 
-For production servers, high quality server equipment is needed. Keep
-in mind, if you run 10 Virtual Servers on one machine and you then
-experience a hardware failure, 10 services are lost. {pve}
-supports clustering, this means that multiple {pve} installations
-can be centrally managed thanks to the included cluster functionality.
+We recommend to use high quality server hardware when running {pve} in
+production. To further decrease the impact of a failed host you can run {pve} 
in
+a cluster with highly available (HA) virtual machines and containers.
 
-{pve} can use local storage (DAS), SAN, NAS and also distributed
-storage (Ceph RBD). For details see xref:chapter_storage[chapter storage].
+{pve} can use local storage (DAS), SAN, NAS, and also distributed storage like
+Ceph RBD. For details see xref:chapter_storage[chapter storage].
 
 [[install_minimal_requirements]]
 Minimum Requirements, for Evaluation
 
 
+These minimum requirements are for evaluation purposes only and should not be
+used in production.
+
 * CPU: 64bit (Intel EMT64 or AMD64)
 
-* Intel VT/AMD-V capable CPU/Mainboard for KVM Full Virtualization support
+* Intel VT/AMD-V capable CPU/Mainboard for KVM full virtualization support
 
 * RAM: 1 GB RAM, plus additional RAM used for guests
 
@@ -34,44 +35,46 @@ Recommended System Requirements
 
 * Intel EMT64 or AMD64 with Intel VT/AMD-V CPU flag.
 
-* Memory, minimum 2 GB for OS and Proxmox VE services. Plus designated memory
-  for guests. For Ceph or ZFS additional memory is required, approximately 1 GB
-  memory for every TB used storage.
+* Memory, minimum 2 GB for the OS and {pve} services. Plus designated memory 
for
+  guests. For Ceph and ZFS additional memory is required; approximately 1GB of
+  memory for every TB of used storage.
 
-* Fast and redundant storage, best results with SSD disks.
+* Fast and redundant storage, best results are achieved with SSDs.
 
-* OS storage: Hardware RAID with batteries protected write cache (``BBU'') or
-  non-RAID with ZFS and SSD cache.
+* OS storage: Use a hardware RAID with battery protected write cache (``BBU'')
+  or non-RAID with ZFS and SSD cache.
 
-* VM storage: For local storage use a hardware RAID with battery backed
-  write cache (BBU) or non-RAID for ZFS. Neither ZFS nor Ceph are compatible
-  with a hardware RAID controller. Shared and distributed storage is also
-  possible.
+* VM storage:
+** For local storage use either a hardware RAID with battery backed write cache
+  (BBU) or non-RAID for ZFS and Ceph. Neither ZFS nor Ceph are compatible with 
a
+  hardware RAID controller.
+** Shared and distributed storage is possible.
 
 * Redundant Gbit NICs, additional NICs depending on the preferred storage
-  technology and cluster setup – 10 Gbit and higher is also supported.
+  technology and cluster setup (10 Gbit and higher) are supported.
 
-* For PCI passthrough a CPU with VT-d/AMD-d CPU flag is needed.
+* For PCI(e) passthrough the CPU needs to support the VT-d/AMD-d flag.
 
 
-Simple Performance Overview
+Simple performance overview
 ~~~
 
-On an installed {pve} system, you can run the included `pveperf` script
-to obtain an overview of the CPU and hard disk performance.
+To get an overview of the CPU and hard disk performance on an installed {pve}
+sytstem, run the included `pveperf` tool.
 
-NOTE: this is just a very quick and general benchmark. More detailed tests
-are recommended, especially regarding the I/O performance of your system.
+NOTE: this is just a very quick and general benchmark. More detailed tests are
+recommended, especially regarding the I/O performance of your system.
 
 Supported web browsers for accessing the web interface
 ~~
-To use the web interface you need a modern browser, this includes:
 
-* Firefox, a release from the current year, or the latest Extended
-Support Release
-* Chrome, a release from the current year
-* Microsofts currently supported version of Edge
-* Safari, a release from the current year
+To access the web-based user interface one of the following browsers is
+recommended:
+
+* Firefox, a release of the current year, or the latest Extended Support 
Release
+* Chrome, a release of the current year
+* Microsoft's currently supported version of Edge
+* Safari, a release of the current year
 
-If {pve} detects you're connecting from a mobile device, you will be
-redirected t

[pve-devel] [PATCH docs 9/9] Rewrite System Software Updates

2019-09-10 Thread Aaron Lauterer
Polished phrasing and aligned cli command styling

Signed-off-by: Aaron Lauterer 
---
 system-software-updates.adoc | 25 ++---
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/system-software-updates.adoc b/system-software-updates.adoc
index 04c17f3..bd5ff30 100644
--- a/system-software-updates.adoc
+++ b/system-software-updates.adoc
@@ -4,21 +4,16 @@ ifdef::wiki[]
 :pve-toplevel:
 endif::wiki[]
 
-We provide regular package updates on all repositories. You can
-install those update using the GUI, or you can directly run the CLI
-command `apt-get`:
+{pve} provides updates on a regular basis for all repositories. To install
+updates  use the web-based GUI or the following CLI commands:
 
- apt-get update
- apt-get dist-upgrade
+
+# apt-get update
+# apt-get dist-upgrade
+
 
-NOTE: The `apt` package management system is extremely flexible and
-provides countless of feature - see `man apt-get` or <> for
-additional information.
+NOTE: The APT package management system is very flexible and provides many
+features, see `man apt-get`, or <> for additional information.
 
-You should do such updates at regular intervals, or when we release
-versions with security related fixes. Major system upgrades are
-announced at the {forum}. Those announcement also contain detailed
-upgrade instructions.
-
-TIP: We recommend to run regular upgrades, because it is important to
-get the latest security updates.
+TIP: Regular updates are essential to get the latest patches and security
+related fixes. Major system upgrades are announced in the {forum}.
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs 8/9] Rewrite Package Repositories

2019-09-10 Thread Aaron Lauterer
Polished phrasing, aligned cli command styling and line width

Signed-off-by: Aaron Lauterer 
---
 pve-package-repos.adoc | 154 +
 1 file changed, 79 insertions(+), 75 deletions(-)

diff --git a/pve-package-repos.adoc b/pve-package-repos.adoc
index 06d1b2f..4befcf1 100644
--- a/pve-package-repos.adoc
+++ b/pve-package-repos.adoc
@@ -5,18 +5,16 @@ ifdef::wiki[]
 :pve-toplevel:
 endif::wiki[]
 
-All Debian based systems use
-http://en.wikipedia.org/wiki/Advanced_Packaging_Tool[APT] as package
-management tool. The list of repositories is defined in
-`/etc/apt/sources.list` and `.list` files found inside
-`/etc/apt/sources.d/`. Updates can be installed directly using
-`apt-get`, or via the GUI.
-
-Apt `sources.list` files list one package repository per line, with
-the most preferred source listed first. Empty lines are ignored, and a
-`#` character anywhere on a line marks the remainder of that line as a
-comment. The information available from the configured sources is
-acquired by `apt-get update`.
+{pve} uses http://en.wikipedia.org/wiki/Advanced_Packaging_Tool[APT] as package
+management tool like any other Debian-based system. Repositories are defined in
+the file `/etc/apt/sources.list` and in `.list` files placed in
+`/etc/apt/sources.list.d/`.
+
+Each line defines a package repository. The preferred source must come first.
+Empty lines are ignored. A `#` character anywhere on a line marks the remainder
+of that line as a comment. The available packages from a repository are 
acquired
+by running `apt-get update`. Updates can be installed directly using `apt-get`,
+or via the GUI.
 
 .File `/etc/apt/sources.list`
 
@@ -27,43 +25,38 @@ deb http://ftp.debian.org/debian buster-updates main contrib
 deb http://security.debian.org buster/updates main contrib
 
 
-In addition, {pve} provides three different package repositories.
+{pve} additionally provides three different package repositories.
 
 {pve} Enterprise Repository
 ~~~
 
-This is the default, stable and recommended repository, available for
-all {pve} subscription users. It contains the most stable packages,
-and is suitable for production use. The `pve-enterprise` repository is
-enabled by default:
+This is the default, stable, and recommended repository, available for all 
{pve}
+subscription users. It contains the most stable packages and is suitable for
+production use. The `pve-enterprise` repository is enabled by default:
 
 .File `/etc/apt/sources.list.d/pve-enterprise.list`
 
 deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
 
 
-As soon as updates are available, the `root@pam` user is notified via
-email about the available new packages. On the GUI, the change-log of
-each package can be viewed (if available), showing all details of the
-update. So you will never miss important security fixes.
-
-Please note that you need a valid subscription key to access this
-repository. We offer different support levels, and you can find further
-details at https://www.proxmox.com/en/proxmox-ve/pricing.
+The `root@pam` user is notified via email about available updates. Click the
+'Changelog' button in the GUI to see more details about the selected update.
 
-NOTE: You can disable this repository by commenting out the above line
-using a `#` (at the start of the line). This prevents error messages
-if you do not have a subscription key. Please configure the
-`pve-no-subscription` repository in that case.
+You need a valid subscription key to access the `pve-enterprise` repository.
+Different support levels are available. Further details can be found at
+https://www.proxmox.com/en/proxmox-ve/pricing.
 
+NOTE: You can disable this repository by commenting out the above line using a
+`#` (at the start of the line). This prevents error messages if you do not have
+a subscription key. Please configure the `pve-no-subscription` repository in
+that case.
 
 {pve} No-Subscription Repository
 
 
-As the name suggests, you do not need a subscription key to access
-this repository. It can be used for testing and non-production
-use. Its not recommended to run on production servers, as these
-packages are not always heavily tested and validated.
+This is the recommended repository for testing and non-production use. The
+packages are not headily tested and validated. You don't need a subscription 
key
+to access the `pve-no-subscription` repository.
 
 We recommend to configure this repository in `/etc/apt/sources.list`.
 
@@ -84,26 +77,25 @@ deb http://security.debian.org buster/updates main contrib
 {pve} Test Repository
 ~~
 
-Finally, there is a repository called `pvetest`. This one contains the
-latest packages and is heavily used by developers to test new
-features. As usual, you can configure this using
-`/etc/apt/sources.list` by adding the following line:
+This repository contains the late

Re: [pve-devel] [PATCH v3 qemu-server 1/3] Add USB3 capablities to Spice USB devices

2019-09-10 Thread Aaron Lauterer



On 9/10/19 10:46 AM, Thomas Lamprecht wrote:

On 06.09.19 15:26, Aaron Lauterer wrote:

To not change current behaviour and thus breaking live migration USB3
for a Spice USB device requires Qemu v4.1.

The old behavior was that even though technically it was possible to
the set `usb3=1` setting, it was ignored. The bus was hardcoded to
ehci. If another USB2 device was added or the machine type was set to
Q35 an ehci controller was present and the VM was able to boot.

With this patch the behaviour is changing and the bus is set to xhci if
USB3 is set for the Spice USB device and the VM is running under Qemu
v4.1.

Signed-off-by: Aaron Lauterer 
---

I use the `qemu_machine_feature_enabled` function from QemuServer.pm to
check against Qemu v4.1


  PVE/QemuServer.pm |  2 +-
  PVE/QemuServer/USB.pm | 10 +++---
  2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a424720..0489b27 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3830,7 +3830,7 @@ sub config_to_command {
  }
  
  # usb devices

-my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES);
+my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES, $machine_type, $kvmver);
  push @$devices, @usbdevices if @usbdevices;
  # serial devices
  for (my $i = 0; $i < $MAX_SERIAL_PORTS; $i++)  {
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index a2097b9..af24636 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -3,6 +3,7 @@ package PVE::QemuServer::USB;
  use strict;
  use warnings;
  use PVE::QemuServer::PCI qw(print_pci_addr);
+use PVE::QemuServer;


this adds a cyclic module dependency:

PVE::QemuServer -> QemuServer::USB -> PVE::QemuServer

While it's intra-package, and thus not as harmful as cross package, I'd still
like to avoid that if anyhow possible..


Yeah, that was one of the things where I wasn't sure if it would fly.



  use PVE::JSONSchema;
  use base 'Exporter';
  
@@ -74,7 +75,7 @@ sub get_usb_controllers {

  }
  
  sub get_usb_devices {

-my ($conf, $format, $max_usb_devices) = @_;
+my ($conf, $format, $max_usb_devices, $machine, $kvmver) = @_;


instead off adding those two you could also just add a single feature flag?
Maybe a hash? alà

my ($conf, $format, $max_usb_devices, $features) = @_;

where $features includes a "spice_usb3 => 1" entry if it should be used?
as an idea..


I will move the qemu_machine_feature_check to the QemuServer.pm and try 
something like this.




  
  my $devices = [];
  
@@ -87,9 +88,12 @@ sub get_usb_devices {

my $hostdevice = parse_usb_device($d->{host});
$hostdevice->{usb3} = $d->{usb3};
if (defined($hostdevice->{spice}) && $hostdevice->{spice}) {


while you do not touch above, it's still redundant,
if ($hostdevice->{spice})
would be enough...


Should I clean this up with the next version? Maybe as a separate commit?




-   # usb redir support for spice, currently no usb3
+   # usb redir support for spice
+   my $bus = 'ehci';
+   $bus = 'xhci' if $hostdevice->{usb3} && 
PVE::QemuServer::qemu_machine_feature_enabled($machine, $kvmver, 4, 1);
+
push @$devices, '-chardev', 
"spicevmc,id=usbredirchardev$i,name=usbredir";
-   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
+   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=$bus.0";
} else {
push @$devices, '-device', print_usbdevice_full($conf, "usb$i", 
$hostdevice);
}






___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH v3 qemu-server 2/3] Fix local resource check of Spice USB devices

2019-09-10 Thread Aaron Lauterer




On 9/10/19 11:03 AM, Thomas Lamprecht wrote:

On 06.09.19 15:26, Aaron Lauterer wrote:

The check relied on the fact that in a regular use case a usb device of
type spice would not have any other settings like `usb3=1`. An exact
match worked fine for this.

This patch changes the behaviour and makes it possible to migrate VMs
with Spice USB devices that have additional usb options set.

Signed-off-by: Aaron Lauterer 
---

The proposed[0] /^spice(,)?$/ regex does not match the `usb3=1` part and
fails. I opted for the simpler regex that checks if `spice` is that the
beginning.


Then still the same applies as in my previous review:
Still not really future proof.. The /spice(,)?/ was just a not-much-thought-out
suggestion to highlight the direction one could go, so instead of going back may
try the now full-thought-out-and-tested:

/^spice(?![^,])/

Iow, matches a string starting with spice which, if it isn't finished, may not
be followed by anything else as a comma, check `perldoc perlre` for
"negative lookahead"



Thanks for the explanation, now I got it what you were trying to do.



[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/038749.html

  PVE/QemuServer.pm | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 0489b27..5334cad 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2925,7 +2925,7 @@ sub check_local_resources {
  push @loc_res, "ivshmem" if $conf->{ivshmem};
  
  foreach my $k (keys %$conf) {

-   next if $k =~ m/^usb/ && ($conf->{$k} eq 'spice');
+   next if $k =~ m/^usb/ && ($conf->{$k} =~ m/^spice/);
# sockets are safe: they will recreated be on the target side 
post-migrate
next if $k =~ m/^serial/ && ($conf->{$k} eq 'socket');
push @loc_res, $k if $k =~ m/^(usb|hostpci|serial|parallel)\d+$/;





___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v4 qemu-server 2/4] usb: Add USB3 capabilities to Spice USB devices

2019-09-11 Thread Aaron Lauterer
To not change current behaviour and thus breaking live migration USB3
for a Spice USB device requires Qemu v4.1.

The old behavior was that even though technically it was possible to
the set `usb3=1` setting, it was ignored. The bus was hardcoded to
ehci. If another USB2 device was added or the machine type was set to
Q35 an ehci controller was present and the VM was able to boot.

With this patch the behaviour is changing and the bus is set to xhci if
USB3 is set for the Spice USB device and the VM is running under Qemu
v4.1.

Signed-off-by: Aaron Lauterer 
---

I created the new `usb_dev_features` hash which is used to store the
flag if spice is allowed to use usb3 and pass that to the usb module to
avoid cyclic dependencies as suggested by thomas.

 PVE/QemuServer.pm | 5 -
 PVE/QemuServer/USB.pm | 9 ++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 7128723..78ccf8c 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3829,7 +3829,10 @@ sub config_to_command {
 }
 
 # usb devices
-my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES);
+my $usb_dev_features = {};
+$usb_dev_features->{spice_usb3} = 1 if 
qemu_machine_feature_enabled($machine_type, $kvmver, 4, 1);
+
+my @usbdevices = PVE::QemuServer::USB::get_usb_devices($conf, 
$usbdesc->{format}, $MAX_USB_DEVICES, $usb_dev_features);
 push @$devices, @usbdevices if @usbdevices;
 # serial devices
 for (my $i = 0; $i < $MAX_SERIAL_PORTS; $i++)  {
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index 2c09490..d328148 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -74,7 +74,7 @@ sub get_usb_controllers {
 }
 
 sub get_usb_devices {
-my ($conf, $format, $max_usb_devices) = @_;
+my ($conf, $format, $max_usb_devices, $features) = @_;
 
 my $devices = [];
 
@@ -87,9 +87,12 @@ sub get_usb_devices {
my $hostdevice = parse_usb_device($d->{host});
$hostdevice->{usb3} = $d->{usb3};
if ($hostdevice->{spice}) {
-   # usb redir support for spice, currently no usb3
+   # usb redir support for spice
+   my $bus = 'ehci';
+   $bus = 'xhci' if $hostdevice->{usb3} && $features->{spice_usb3};
+
push @$devices, '-chardev', 
"spicevmc,id=usbredirchardev$i,name=usbredir";
-   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
+   push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=$bus.0";
} else {
push @$devices, '-device', print_usbdevice_full($conf, "usb$i", 
$hostdevice);
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v4 qemu-server 3/4] usb: Fix local resource check of Spice USB devices

2019-09-11 Thread Aaron Lauterer
The check relied on the fact that in a regular use case a usb device of
type spice would not have any other settings like `usb3=1`. An exact
match worked fine for this.

This patch changes the behaviour and makes it possible to migrate VMs
with Spice USB devices that have additional usb options set.

Signed-off-by: Aaron Lauterer 
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 78ccf8c..05f0ab5 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2925,7 +2925,7 @@ sub check_local_resources {
 push @loc_res, "ivshmem" if $conf->{ivshmem};
 
 foreach my $k (keys %$conf) {
-   next if $k =~ m/^usb/ && ($conf->{$k} eq 'spice');
+   next if $k =~ m/^usb/ && ($conf->{$k} =~ m/^spice(?![^,])/);
# sockets are safe: they will recreated be on the target side 
post-migrate
next if $k =~ m/^serial/ && ($conf->{$k} eq 'socket');
push @loc_res, $k if $k =~ m/^(usb|hostpci|serial|parallel)\d+$/;
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v4 qemu-server 1/4] usb: Cleanup redundant if condition

2019-09-11 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 PVE/QemuServer/USB.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index a2097b9..2c09490 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -86,7 +86,7 @@ sub get_usb_devices {
if (defined($d->{host})) {
my $hostdevice = parse_usb_device($d->{host});
$hostdevice->{usb3} = $d->{usb3};
-   if (defined($hostdevice->{spice}) && $hostdevice->{spice}) {
+   if ($hostdevice->{spice}) {
# usb redir support for spice, currently no usb3
push @$devices, '-chardev', 
"spicevmc,id=usbredirchardev$i,name=usbredir";
push @$devices, '-device', 
"usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v4 0/4] Fix #2343 Spice USB3 support

2019-09-11 Thread Aaron Lauterer
This patch series enables USB3 for the passthrough / redirection of USB
devices via the Spice client.

v3 -> v4:
* cleanup of redundant if condition
* avoiding cyclic module dependency from USB.pm to QemuServer.pm
* fixing regex check for migration to match if spice is at beginning
  alone or with a following comma. Thanks Thomas for pointing out how to
  make it future proof

v2 -> v3:
* don't modify current behavior
* fix local resource check
* fix and cleanup GUI code

v1 -> v2:
* no qemu version checks
* fix local resource check on migration
* add GUI support

Aaron Lauterer (4):

qemu-server:
  usb: Cleanup redundant if condition
  usb: Add USB3 capabilities to Spice USB devices
  usb: Fix local resource check of Spice USB devices

 PVE/QemuServer.pm |  7 +--
 PVE/QemuServer/USB.pm | 11 +++
 2 files changed, 12 insertions(+), 6 deletions(-)

pve-manager:
  usb: Enable USB3 for Spice USB passthrough

 www/manager6/qemu/USBEdit.js | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v4 manager 4/4] usb: Enable USB3 for Spice USB passthrough

2019-09-11 Thread Aaron Lauterer
Instead of having two times the check if the USB3 setting needs to be
added to the config string it is now checked at one place only.

If USB3 is checked for a non USB3 device it will be attached to the USB2
root hub of the xhci controller.

Signed-off-by: Aaron Lauterer 
---
 www/manager6/qemu/USBEdit.js | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js
index 8fc95c99..776908a2 100644
--- a/www/manager6/qemu/USBEdit.js
+++ b/www/manager6/qemu/USBEdit.js
@@ -19,7 +19,7 @@ Ext.define('PVE.qemu.USBInputPanel', {
} else if(field.inputValue === 'port') {
portfield.setDisabled(!newValue);
} else if(field.inputValue === 'spice') {
-   usb3field.setDisabled(newValue);
+   usb3field.setDisabled(!newValue);
}
}
},
@@ -66,14 +66,15 @@ Ext.define('PVE.qemu.USBInputPanel', {
case 'hostdevice':
case 'port':
val = me.down('pveUSBSelector[name=' + type + 
']').getUSBValue();
-   if (!/usb3/.test(val) && me.down('field[name=usb3]').getValue() 
=== true) {
-   val += ',usb3=1';
-   }
break;
default:
throw "invalid type selected";
}
 
+   if (values.usb3) {
+   delete values.usb3;
+   val += ',usb3=1';
+   }
values[me.confid] = val;
return values;
 },
@@ -131,7 +132,7 @@ Ext.define('PVE.qemu.USBInputPanel', {
{
xtype: 'checkbox',
name: 'usb3',
-   submitValue: false,
+   inputValue: true,
reference: 'usb3',
fieldLabel: gettext('Use USB3')
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 2/4] spice: Add enhancements form component

2019-09-13 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/Makefile |  1 +
 www/manager6/form/SpiceEnhancementSelector.js | 66 +++
 2 files changed, 67 insertions(+)
 create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 82e25c79..aa460c3b 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -66,6 +66,7 @@ JSSRC=
\
form/CalendarEvent.js   \
form/CephPoolSelector.js\
form/PermPathSelector.js\
+   form/SpiceEnhancementSelector.js\
dc/Tasks.js \
dc/Log.js   \
panel/StatusPanel.js\
diff --git a/www/manager6/form/SpiceEnhancementSelector.js 
b/www/manager6/form/SpiceEnhancementSelector.js
new file mode 100644
index ..5457c8d5
--- /dev/null
+++ b/www/manager6/form/SpiceEnhancementSelector.js
@@ -0,0 +1,66 @@
+Ext.define('PVE.form.SpiceEnhancementSelector', {
+extend: 'Proxmox.panel.InputPanel',
+alias: 'widget.pveSpiceEnhancementSelector',
+
+initComponent: function() {
+   var me = this;
+   me.items= [
+   {
+   xtype: 'proxmoxcheckbox',
+   itemId: 'foldersharing',
+   name: 'foldersharing',
+   submitValue: false,
+   fieldLabel: gettext('Folder sharing'),
+   uncheckedValue: 0,
+   },
+   {
+   xtype: 'proxmoxKVComboBox',
+   itemId: 'videostreaming',
+   name: 'videostreaming',
+   submitValue: false,
+   value: 'off',
+   fieldLabel: gettext('Video streaming'),
+   comboItems: [
+   ['off', 'off'],
+   ['all', 'all'],
+   ['filter', 'filter'],
+   ],
+   },
+   ];
+   me.callParent();
+},
+
+// handle submitted values manually to work in the VM create wizard as 
well.
+// without submitValue = false the fields would be added to the config
+onGetValues: function() {
+   var me = this;
+
+   if (me.disabled) {
+   return
+   }
+
+   var values = {};
+   var foldersharing = me.down('field[name=foldersharing]').getValue();
+   var videostreaming= me.down('field[name=videostreaming]').getValue();
+
+   if (videostreaming !== "off") {
+   values.videostreaming = videostreaming;
+   }
+   if (foldersharing) {
+   values.foldersharing = 1;
+   }
+   if (Ext.Object.isEmpty(values)) {
+   return { 'delete': 'spice_enhancements' };
+   }
+   var enhancements = PVE.Parser.printPropertyString(values);
+   return { spice_enhancements: enhancements };
+},
+
+setValues: function(values) {
+   var enhancements = values.spice_enhancements || '';
+   if (enhancements) {
+   var res = PVE.Parser.parsePropertyString(enhancements);
+   this.callParent([res]);
+   }
+},
+});
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 3/4] spice: Add enhancements to VM Options panel

2019-09-13 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/Utils.js| 18 ++
 www/manager6/qemu/Options.js | 13 +
 2 files changed, 31 insertions(+)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 6a489e7e..139200c3 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -334,6 +334,24 @@ Ext.define('PVE.Utils', { utilities: {
}
 },
 
+render_spice_enhancements: function(value) {
+   if (!value) {
+   return Proxmox.Utils.disabledText;
+   }
+   var props = PVE.Parser.parsePropertyString(value);
+   if (Ext.Object.isEmpty(props)) {
+   return Proxmox.Utils.disabledText;
+   }
+   var ret = [];
+   if (props.foldersharing === "1") {
+   ret.push("Folder sharing enabled");
+   }
+   if (props.videostreaming === "all" || props.videostreaming === 
"filter") {
+   ret.push("Video Streaming: " + props.videostreaming);
+   }
+   return ret.join(", ");
+},
+
 // fixme: auto-generate this
 // for now, please keep in sync with PVE::Tools::kvmkeymaps
 kvm_keymaps: {
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index e1580060..96eb0499 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -281,6 +281,19 @@ Ext.define('PVE.qemu.Options', {
}
} : undefined
},
+   spice_enhancements: {
+   header: gettext('Spice Enhancements'),
+   defaultValue: false,
+   renderer:  PVE.Utils.render_spice_enhancements,
+   editor: caps.vms['VM.Config.Options'] ? {
+   xtype: 'proxmoxWindowEdit',
+   subject: gettext('Spice Enhancements'),
+   items: {
+   xtype: 'pveSpiceEnhancementSelector',
+   name: 'spice_enhancements',
+   }
+   } : undefined
+   },
hookscript: {
header: gettext('Hookscript')
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 1/4] Cleanup: align backslashes in manager6 Makefile

2019-09-13 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/Makefile | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 7ee7cd40..82e25c79 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -14,7 +14,7 @@ JSSRC=
\
lxc/CmdMenu.js  \
node/CmdMenu.js \
VNCConsole.js   \
-   data/PermPathStore.js   \
+   data/PermPathStore.js   \
data/ResourceStore.js   \
data/model/Realm.js \
data/model/RRDModels.js \
@@ -60,12 +60,12 @@ JSSRC=  
\
form/FirewallPolicySelector.js  \
form/GlobalSearchField.js   \
form/QemuBiosSelector.js\
-   form/VMSelector.js  \
+   form/VMSelector.js  \
form/VMCPUFlagSelector.js   \
form/USBSelector.js \
form/CalendarEvent.js   \
-   form/CephPoolSelector.js\
-   form/PermPathSelector.js\
+   form/CephPoolSelector.js\
+   form/PermPathSelector.js\
dc/Tasks.js \
dc/Log.js   \
panel/StatusPanel.js\
@@ -108,7 +108,7 @@ JSSRC=  
\
ceph/Services.js\
ceph/Config.js  \
ceph/Log.js \
-   ceph/CephInstallWizard.js   \
+   ceph/CephInstallWizard.js   \
node/Disks.js   \
node/LVM.js \
node/LVMThin.js \
@@ -149,7 +149,7 @@ JSSRC=  
\
qemu/CreateWizard.js\
qemu/USBEdit.js \
qemu/PCIEdit.js \
-   qemu/SerialEdit.js  \
+   qemu/SerialEdit.js  \
qemu/AgentIPView.js \
qemu/CloudInit.js   \
qemu/CIDriveEdit.js \
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 4/4] spice: Add enhancements to VM Creation wizard

2019-09-13 Thread Aaron Lauterer
enabled if qxl/spice display selected

Signed-off-by: Aaron Lauterer 
---
 www/manager6/qemu/SystemEdit.js | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/www/manager6/qemu/SystemEdit.js b/www/manager6/qemu/SystemEdit.js
index 846baa73..15ae9a73 100644
--- a/www/manager6/qemu/SystemEdit.js
+++ b/www/manager6/qemu/SystemEdit.js
@@ -79,7 +79,18 @@ Ext.define('PVE.qemu.SystemInputPanel', {
deleteEmpty: false,
fieldLabel: gettext('Graphic card'),
name: 'vga',
-   comboItems: PVE.Utils.kvm_vga_driver_array()
+   comboItems: PVE.Utils.kvm_vga_driver_array(),
+   listeners: {
+   change: function(f, value, old) {
+   var sef = this.up().down('pveSpiceEnhancementSelector');
+   if (/^(qxl)(\d?)$/.test(value)) {
+   console.log("matched ", value);
+   sef.setDisabled(false);
+   } else {
+   sef.setDisabled(true);
+   }
+   }
+   }
},
{
xtype: 'proxmoxcheckbox',
@@ -88,6 +99,11 @@ Ext.define('PVE.qemu.SystemInputPanel', {
defaultValue: 0,
deleteDefaultValue: true,
fieldLabel: gettext('Qemu Agent')
+   },
+   {
+   xtype: 'pveSpiceEnhancementSelector',
+   name: 'spice_enhancements',
+   disabled: true,
}
 ],
 
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 0/4] Fix #2041, #2272 GUI for Spice Enhancements

2019-09-13 Thread Aaron Lauterer
With the server side patches applied[0] the GUI part for this was
missing.

This patch series adds the two current SPICE enhancements (folder
sharing, video streaming) to the Options panel of a VM and to the VM
creation wizard.

Updates to the documentation will follow.

Things I am not too happy about/appreciate feedback for:
* the phrasing in the options panel
* right now with this implementation the System tab in the VM creation
  wizard looks a bit unbalanced.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/038799.html

Aaron Lauterer (4):
  Cleanup: align backslashes in manager6 Makefile
  spice: Add enhancements form component
  spice: Add enhancements to VM Options panel
  spice: Add enhancements to VM Creation wizard

 www/manager6/Makefile | 13 ++--
 www/manager6/Utils.js | 18 +
 www/manager6/form/SpiceEnhancementSelector.js | 66 +++
 www/manager6/qemu/Options.js  | 13 
 www/manager6/qemu/SystemEdit.js   | 18 -
 5 files changed, 121 insertions(+), 7 deletions(-)
 create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH manager 2/4] spice: Add enhancements form component

2019-09-17 Thread Aaron Lauterer



On 9/16/19 2:44 PM, Stefan Reiter wrote:

Tried my hand at a proper code review, I like the patches in general.

On 9/13/19 3:16 PM, Aaron Lauterer wrote:

Signed-off-by: Aaron Lauterer 
---
  www/manager6/Makefile |  1 +
  www/manager6/form/SpiceEnhancementSelector.js | 66 +++
  2 files changed, 67 insertions(+)
  create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 82e25c79..aa460c3b 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -66,6 +66,7 @@ JSSRC=  \
  form/CalendarEvent.js    \
  form/CephPoolSelector.js    \
  form/PermPathSelector.js    \
+    form/SpiceEnhancementSelector.js    \
  dc/Tasks.js    \
  dc/Log.js    \
  panel/StatusPanel.js    \
diff --git a/www/manager6/form/SpiceEnhancementSelector.js 
b/www/manager6/form/SpiceEnhancementSelector.js

new file mode 100644
index ..5457c8d5
--- /dev/null
+++ b/www/manager6/form/SpiceEnhancementSelector.js
@@ -0,0 +1,66 @@
+Ext.define('PVE.form.SpiceEnhancementSelector', {
+    extend: 'Proxmox.panel.InputPanel',
+    alias: 'widget.pveSpiceEnhancementSelector',
+
+    initComponent: function() {
+    var me = this;
+    me.items= [
+    {
+    xtype: 'proxmoxcheckbox',
+    itemId: 'foldersharing',
+    name: 'foldersharing',
+    submitValue: false,
+    fieldLabel: gettext('Folder sharing'),
+    uncheckedValue: 0,
+    },
+    {
+    xtype: 'proxmoxKVComboBox',
+    itemId: 'videostreaming',
+    name: 'videostreaming',
+    submitValue: false,
+    value: 'off',
+    fieldLabel: gettext('Video streaming'),
+    comboItems: [
+    ['off', 'off'],
+    ['all', 'all'],
+    ['filter', 'filter'],
+    ],
+    },
+    ];


Why not just set the items array on the object directly? Then you 
wouldn't have to override initComponent.



+    me.callParent();
+    },
+
+    // handle submitted values manually to work in the VM create 
wizard as well.
+    // without submitValue = false the fields would be added to the 
config

+    onGetValues: function() {
+    var me = this;
+
+    if (me.disabled) {
+    return


Missing ;


Thx for seeing this



+    }
+
+    var values = {};
+    var foldersharing = me.down('field[name=foldersharing]').getValue();
+    var videostreaming= 
me.down('field[name=videostreaming]').getValue();


Missing space before =


Thx



+
+    if (videostreaming !== "off") {
+    values.videostreaming = videostreaming;
+    }
+    if (foldersharing) {
+    values.foldersharing = 1;
+    }
+    if (Ext.Object.isEmpty(values)) {
+    return { 'delete': 'spice_enhancements' };
+    }
+    var enhancements = PVE.Parser.printPropertyString(values);
+    return { spice_enhancements: enhancements };
+    },
+
+    setValues: function(values) {
+    var enhancements = values.spice_enhancements || '';
+    if (enhancements) {
+    var res = PVE.Parser.parsePropertyString(enhancements);


Same as in 3/4, foldersharing would need to be converted to a true 
boolean here (from potentially "on", "yes", ...).


Good point.



+    this.callParent([res]);
+    }
+    },
+});



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH manager 3/4] spice: Add enhancements to VM Options panel

2019-09-17 Thread Aaron Lauterer



On 9/16/19 2:44 PM, Stefan Reiter wrote:

On 9/13/19 3:16 PM, Aaron Lauterer wrote:

Signed-off-by: Aaron Lauterer 
---
  www/manager6/Utils.js    | 18 ++
  www/manager6/qemu/Options.js | 13 +
  2 files changed, 31 insertions(+)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 6a489e7e..139200c3 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -334,6 +334,24 @@ Ext.define('PVE.Utils', { utilities: {
  }
  },
+    render_spice_enhancements: function(value) {
+    if (!value) {
+    return Proxmox.Utils.disabledText;
+    }
+    var props = PVE.Parser.parsePropertyString(value);
+    if (Ext.Object.isEmpty(props)) {
+    return Proxmox.Utils.disabledText;
+    }
+    var ret = [];
+    if (props.foldersharing === "1") {


I don't think '=== "1"' catches all cases here, USBEdit.js for example 
contains a check like this:


   if (/^usb3=(1|on|true)$/.test(data[i])) {
 ...
   }

while our JSONSchema parser even accepts "yes" in addition to the ones 
above.


Maybe a common Regex/helper like "parse_boolean" in JSONSchema.pm would 
be useful in JS too?




+    ret.push("Folder sharing enabled");


These...

Yes you are right



+    }
+    if (props.videostreaming === "all" || props.videostreaming === 
"filter") {

+    ret.push("Video Streaming: " + props.videostreaming);


...need localization (gettext), since not language independent.


Here I am not sure but it does not cost much to do it.



+    } > +    return ret.join(", ");
+    },
+
  // fixme: auto-generate this
  // for now, please keep in sync with PVE::Tools::kvmkeymaps
  kvm_keymaps: {
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index e1580060..96eb0499 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -281,6 +281,19 @@ Ext.define('PVE.qemu.Options', {
  }
  } : undefined
  },
+    spice_enhancements: {
+    header: gettext('Spice Enhancements'),
+    defaultValue: false,
+    renderer:  PVE.Utils.render_spice_enhancements,
+    editor: caps.vms['VM.Config.Options'] ? {
+    xtype: 'proxmoxWindowEdit',
+    subject: gettext('Spice Enhancements'),


Just as a note, SPICE enhancements currently don't have a documentation 
available, but once they do, an "onlineHelp" would be useful here.


Once the docs are written this will be added.




+    items: {
+    xtype: 'pveSpiceEnhancementSelector',
+    name: 'spice_enhancements',
+    }
+    } : undefined
+    },


Maybe disable this if VGA is not QXL (see also my note in 4/4).


I don't think this is a good idea. It is clearly named and I don't want 
to have to set the VGA to Spice first in order to change any of the 
enhancements in the options.


If I want to enable Spice with all this and I am in the options panel I 
would need to change to the hardware panel first and then come back to 
the options. If I am disabling Spice and forgot to disable the 
enhancements before setting VGA to something else I need to go back and 
temporarily enable it again.


Either way is too much of a hassle.




  hookscript: {
  header: gettext('Hookscript')
  }



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH manager 3/4] spice: Add enhancements to VM Options panel

2019-09-17 Thread Aaron Lauterer




On 9/16/19 2:56 PM, Christian Ebner wrote:



On September 16, 2019 2:44 PM Stefan Reiter  wrote:

  

+render_spice_enhancements: function(value) {
+   if (!value) {
+   return Proxmox.Utils.disabledText;
+   }
+   var props = PVE.Parser.parsePropertyString(value);
+   if (Ext.Object.isEmpty(props)) {
+   return Proxmox.Utils.disabledText;
+   }
+   var ret = [];
+   if (props.foldersharing === "1") {


I don't think '=== "1"' catches all cases here, USBEdit.js for example
contains a check like this:

if (/^usb3=(1|on|true)$/.test(data[i])) {
...
}

while our JSONSchema parser even accepts "yes" in addition to the ones
above.

Maybe a common Regex/helper like "parse_boolean" in JSONSchema.pm would
be useful in JS too?


we have parseBoolean in Parser.js for that which checks for 1|yes|on|true and 
makes sure upper/lower case is taken into account too.



Thanks for the hint :)

___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH manager 4/4] spice: Add enhancements to VM Creation wizard

2019-09-17 Thread Aaron Lauterer



On 9/16/19 2:44 PM, Stefan Reiter wrote:
Akin to what you mentioned on the cover, there's a connection missing 
between the "Graphic card" field and the SPICE ones - there is no clear 
indication of *why* they are disabled by default in a new VM.


Maybe make it a section of some sort titled "SPICE"?


Yeah, the next version of this series will contain a different layout of 
that panel that should make it clearer.




On 9/13/19 3:16 PM, Aaron Lauterer wrote:

enabled if qxl/spice display selected

Signed-off-by: Aaron Lauterer 
---
  www/manager6/qemu/SystemEdit.js | 18 +-
  1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/www/manager6/qemu/SystemEdit.js 
b/www/manager6/qemu/SystemEdit.js

index 846baa73..15ae9a73 100644
--- a/www/manager6/qemu/SystemEdit.js
+++ b/www/manager6/qemu/SystemEdit.js
@@ -79,7 +79,18 @@ Ext.define('PVE.qemu.SystemInputPanel', {
  deleteEmpty: false,
  fieldLabel: gettext('Graphic card'),
  name: 'vga',
-    comboItems: PVE.Utils.kvm_vga_driver_array()
+    comboItems: PVE.Utils.kvm_vga_driver_array(),
+    listeners: {
+    change: function(f, value, old) {
+    var sef = this.up().down('pveSpiceEnhancementSelector');
+    if (/^(qxl)(\d?)$/.test(value)) {
+    console.log("matched ", value);


Leftover debug print?

Also, while this disables the enhancements in the VM creation wizard, 
there's nothing stopping a user to just enable them afterwards in the 
Options dialog - with no effect of course. There should be check there 
too, I think.


See the discussion in 3/4



+    sef.setDisabled(false);
+    } else {
+    sef.setDisabled(true);
+    }
+    }
+    }
  },
  {
  xtype: 'proxmoxcheckbox',
@@ -88,6 +99,11 @@ Ext.define('PVE.qemu.SystemInputPanel', {
  defaultValue: 0,
  deleteDefaultValue: true,
  fieldLabel: gettext('Qemu Agent')
+    },
+    {
+    xtype: 'pveSpiceEnhancementSelector',
+    name: 'spice_enhancements',
+    disabled: true,
  }
  ],



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager v2 3/4] spice: Add enhanecements to VM Options panel

2019-09-17 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/Utils.js| 18 ++
 www/manager6/qemu/Options.js | 13 +
 2 files changed, 31 insertions(+)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 6a489e7e..a9adb382 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -334,6 +334,24 @@ Ext.define('PVE.Utils', { utilities: {
}
 },
 
+render_spice_enhancements: function(values) {
+   if (!values) {
+   return Proxmox.Utils.disabledText;
+   }
+   var props = PVE.Parser.parsePropertyString(values);
+   if (Ext.Object.isEmpty(props)) {
+   return Proxmox.Utils.disabledText;
+   }
+   var output = [];
+   if (PVE.Parser.parseBoolean(props.foldersharing)) {
+   output.push(gettext("Folder sharing enabled"));
+   }
+   if (props.videostreaming === "all" || props.videostreaming === 
"filter") {
+   output.push(gettext("Video Streaming") + ": " + 
props.videostreaming);
+   }
+   return output.join(", ");
+},
+
 // fixme: auto-generate this
 // for now, please keep in sync with PVE::Tools::kvmkeymaps
 kvm_keymaps: {
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index e1580060..96eb0499 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -281,6 +281,19 @@ Ext.define('PVE.qemu.Options', {
}
} : undefined
},
+   spice_enhancements: {
+   header: gettext('Spice Enhancements'),
+   defaultValue: false,
+   renderer:  PVE.Utils.render_spice_enhancements,
+   editor: caps.vms['VM.Config.Options'] ? {
+   xtype: 'proxmoxWindowEdit',
+   subject: gettext('Spice Enhancements'),
+   items: {
+   xtype: 'pveSpiceEnhancementSelector',
+   name: 'spice_enhancements',
+   }
+   } : undefined
+   },
hookscript: {
header: gettext('Hookscript')
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager v2 1/4] Cleanup: align backslashes in manager6 Makefile

2019-09-17 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/Makefile | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 7ee7cd40..82e25c79 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -14,7 +14,7 @@ JSSRC=
\
lxc/CmdMenu.js  \
node/CmdMenu.js \
VNCConsole.js   \
-   data/PermPathStore.js   \
+   data/PermPathStore.js   \
data/ResourceStore.js   \
data/model/Realm.js \
data/model/RRDModels.js \
@@ -60,12 +60,12 @@ JSSRC=  
\
form/FirewallPolicySelector.js  \
form/GlobalSearchField.js   \
form/QemuBiosSelector.js\
-   form/VMSelector.js  \
+   form/VMSelector.js  \
form/VMCPUFlagSelector.js   \
form/USBSelector.js \
form/CalendarEvent.js   \
-   form/CephPoolSelector.js\
-   form/PermPathSelector.js\
+   form/CephPoolSelector.js\
+   form/PermPathSelector.js\
dc/Tasks.js \
dc/Log.js   \
panel/StatusPanel.js\
@@ -108,7 +108,7 @@ JSSRC=  
\
ceph/Services.js\
ceph/Config.js  \
ceph/Log.js \
-   ceph/CephInstallWizard.js   \
+   ceph/CephInstallWizard.js   \
node/Disks.js   \
node/LVM.js \
node/LVMThin.js \
@@ -149,7 +149,7 @@ JSSRC=  
\
qemu/CreateWizard.js\
qemu/USBEdit.js \
qemu/PCIEdit.js \
-   qemu/SerialEdit.js  \
+   qemu/SerialEdit.js  \
qemu/AgentIPView.js \
qemu/CloudInit.js   \
qemu/CIDriveEdit.js \
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager v2 2/4] spice: Add enhancements form component

2019-09-17 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/Makefile |  1 +
 www/manager6/form/SpiceEnhancementSelector.js | 72 +++
 2 files changed, 73 insertions(+)
 create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 82e25c79..aa460c3b 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -66,6 +66,7 @@ JSSRC=
\
form/CalendarEvent.js   \
form/CephPoolSelector.js\
form/PermPathSelector.js\
+   form/SpiceEnhancementSelector.js\
dc/Tasks.js \
dc/Log.js   \
panel/StatusPanel.js\
diff --git a/www/manager6/form/SpiceEnhancementSelector.js 
b/www/manager6/form/SpiceEnhancementSelector.js
new file mode 100644
index ..cbafd502
--- /dev/null
+++ b/www/manager6/form/SpiceEnhancementSelector.js
@@ -0,0 +1,72 @@
+Ext.define('PVE.form.SpiceEnhancementSelector', {
+extend: 'Proxmox.panel.InputPanel',
+alias: 'widget.pveSpiceEnhancementSelector',
+insideWizard: false,
+
+initComponent: function() {
+   var me = this;
+me.items = [
+   {
+   xtype: 'displayfield',
+   value: gettext('Spice enhancements') + ':',
+   hidden: !me.insideWizard
+   },
+   {
+   xtype: 'proxmoxcheckbox',
+   itemId: 'foldersharing',
+   name: 'foldersharing',
+   submitValue: false,
+   fieldLabel: gettext('Folder sharing'),
+   uncheckedValue: 0,
+   },
+   {
+   xtype: 'proxmoxKVComboBox',
+   itemId: 'videostreaming',
+   name: 'videostreaming',
+   submitValue: false,
+   value: 'off',
+   fieldLabel: gettext('Video streaming'),
+   comboItems: [
+   ['off', 'off'],
+   ['all', 'all'],
+   ['filter', 'filter'],
+   ],
+   },
+   ];
+
+   me.callParent();
+},
+
+// handle submitted values manually to work in the VM create wizard as 
well.
+// without submitValue = false the fields would be added to the config
+onGetValues: function() {
+   var me = this;
+   if (me.disabled) {
+   return;
+   }
+
+   var values = {};
+   var foldersharing = me.down('field[name=foldersharing]').getValue();
+   var videostreaming = me.down('field[name=videostreaming]').getValue();
+
+   if (videostreaming !== "off") {
+   values.videostreaming = videostreaming;
+   }
+   if (foldersharing) {
+   values.foldersharing = 1;
+   }
+   if (Ext.Object.isEmpty(values)) {
+   return { 'delete': 'spice_enhancements' };
+   }
+   var enhancements = PVE.Parser.printPropertyString(values);
+   return { spice_enhancements: enhancements };
+},
+
+setValues: function(values) {
+   if (values.spice_enhancements) {
+   var enhancements = 
PVE.Parser.parsePropertyString(values.spice_enhancements);
+   enhancements['foldersharing'] = 
PVE.Parser.parseBoolean(enhancements['foldersharing'], 0);
+   this.callParent([enhancements]);
+   }
+},
+});
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager v2 4/4] spice: Add enhancements to VM Creation wizard

2019-09-17 Thread Aaron Lauterer
For a cleaner UI the SCSI Controller (pveScsiHwSelector) is moved to the
left column below the VGA selector. The new Spice enhancements
components is placed in the right column and enabled if qxl/spice is
selected in the VGA selector.

Signed-off-by: Aaron Lauterer 
---
 www/manager6/qemu/SystemEdit.js | 34 -
 1 file changed, 25 insertions(+), 9 deletions(-)

diff --git a/www/manager6/qemu/SystemEdit.js b/www/manager6/qemu/SystemEdit.js
index 846baa73..dac0cc04 100644
--- a/www/manager6/qemu/SystemEdit.js
+++ b/www/manager6/qemu/SystemEdit.js
@@ -79,7 +79,26 @@ Ext.define('PVE.qemu.SystemInputPanel', {
deleteEmpty: false,
fieldLabel: gettext('Graphic card'),
name: 'vga',
-   comboItems: PVE.Utils.kvm_vga_driver_array()
+   comboItems: PVE.Utils.kvm_vga_driver_array(),
+   listeners: {
+   change: function(f, value, old) {
+   var sef = 
this.up('pveQemuSystemPanel').down('pveSpiceEnhancementSelector');
+   if (/^(qxl)(\d?)$/.test(value)) {
+   sef.setDisabled(false);
+   } else {
+   sef.setDisabled(true);
+   }
+   }
+   }
+   },
+   {
+   xtype: 'pveScsiHwSelector',
+   name: 'scsihw',
+   value: '__default__',
+   bind: {
+   value: '{current.scsihw}'
+   },
+   fieldLabel: gettext('SCSI Controller')
},
{
xtype: 'proxmoxcheckbox',
@@ -88,18 +107,15 @@ Ext.define('PVE.qemu.SystemInputPanel', {
defaultValue: 0,
deleteDefaultValue: true,
fieldLabel: gettext('Qemu Agent')
-   }
+   },
 ],
 
 column2: [
{
-   xtype: 'pveScsiHwSelector',
-   name: 'scsihw',
-   value: '__default__',
-   bind: {
-   value: '{current.scsihw}'
-   },
-   fieldLabel: gettext('SCSI Controller')
+   xtype: 'pveSpiceEnhancementSelector',
+   name: 'spice_enhancements',
+   insideWizard: true,
+   disabled: true,
}
 ],
 
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager v2 0/4] Fix #2041, #2272 GUI for Spice Enhancements

2019-09-17 Thread Aaron Lauterer
With the server side patches applied[0] the GUI part for this was
missing.

This patch series adds the two current SPICE enhancements (folder
sharing, video streaming) to the Options panel of a VM and to the VM
creation wizard.

Updates to the documentation and links in the GUI will follow.

v1 -> v2:
* code cleanup / improvement
* rearranged the System panel in the VM creation wizard for a cleaner
  and easier to understand UI

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/038799.html

Aaron Lauterer (4):
  Cleanup: align backslashes in manager6 Makefile
  spice: Add enhancements form component
  spice: Add enhanecements to VM Options panel
  spice: Add enhancements to VM Creation wizard

 www/manager6/Makefile | 13 ++--
 www/manager6/Utils.js | 18 +
 www/manager6/form/SpiceEnhancementSelector.js | 72 +++
 www/manager6/qemu/Options.js  | 13 
 www/manager6/qemu/SystemEdit.js   | 34 ++---
 5 files changed, 135 insertions(+), 15 deletions(-)
 create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH qemu-server] Whitespace cleanup

2019-09-17 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 PVE/CLI/qmrestore.pm | 18 +-
 PVE/QMPClient.pm | 38 +++---
 PVE/QemuConfig.pm|  2 +-
 PVE/QemuServer/Memory.pm |  2 +-
 PVE/VZDump/QemuServer.pm |  2 +-
 5 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/PVE/CLI/qmrestore.pm b/PVE/CLI/qmrestore.pm
index 9ec0051..cb5c122 100755
--- a/PVE/CLI/qmrestore.pm
+++ b/PVE/CLI/qmrestore.pm
@@ -19,8 +19,8 @@ sub setup_environment {
 }
 
 __PACKAGE__->register_method({
-name => 'qmrestore', 
-path => 'qmrestore', 
+name => 'qmrestore',
+path => 'qmrestore',
 method => 'POST',
 description => "Restore QemuServer vzdump backups.",
 parameters => {
@@ -29,7 +29,7 @@ __PACKAGE__->register_method({
vmid => get_standard_option('pve-vmid', { completion => 
\&PVE::Cluster::complete_next_vmid }),
archive => {
description => "The backup file. You can pass '-' to read from 
standard input.",
-   type => 'string', 
+   type => 'string',
maxLength => 255,
completion => \&PVE::QemuServer::complete_backup_archives,
},
@@ -39,16 +39,16 @@ __PACKAGE__->register_method({
completion => \&PVE::QemuServer::complete_storage,
}),
force => {
-   optional => 1, 
+   optional => 1,
type => 'boolean',
description => "Allow to overwrite existing VM.",
},
unique => {
-   optional => 1, 
+   optional => 1,
type => 'boolean',
description => "Assign a unique random ethernet address.",
},
-   pool => { 
+   pool => {
optional => 1,
type => 'string', format => 'pve-poolid',
description => "Add the VM to the specified pool.",
@@ -61,7 +61,7 @@ __PACKAGE__->register_method({
}
},
 },
-returns => { 
+returns => {
type => 'string',
 },
 code => sub {
@@ -70,9 +70,9 @@ __PACKAGE__->register_method({
$param->{node} = PVE::INotify::nodename();
 
return PVE::API2::Qemu->create_vm($param);
-}});
+}});
 
-our $cmddef = [ __PACKAGE__, 'qmrestore', ['archive', 'vmid'], undef, 
+our $cmddef = [ __PACKAGE__, 'qmrestore', ['archive', 'vmid'], undef,
sub {
my $upid = shift;
my $status = PVE::Tools::upid_read_status($upid);
diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index 6be4a41..570dba2 100755
--- a/PVE/QMPClient.pm
+++ b/PVE/QMPClient.pm
@@ -57,10 +57,10 @@ my $push_cmd_to_queue = sub {
 my $execute = $cmd->{execute} || die "no command name specified";
 
 my $qga = ($execute =~ /^guest\-+/) ? 1 : 0;
- 
+
 my $sname = PVE::QemuServer::qmp_socket($vmid, $qga);
 
-$self->{queue_info}->{$sname} = { qga => $qga, vmid => $vmid, sname => 
$sname, cmds => [] } 
+$self->{queue_info}->{$sname} = { qga => $qga, vmid => $vmid, sname => 
$sname, cmds => [] }
 if !$self->{queue_info}->{$sname};
 
 push @{$self->{queue_info}->{$sname}->{cmds}}, $cmd;
@@ -124,7 +124,7 @@ sub cmd {
 $cmd->{execute} eq 'block-job-complete' ||
 $cmd->{execute} eq 'backup-cancel' ||
 $cmd->{execute} eq 'query-savevm' ||
-$cmd->{execute} eq 'delete-drive-snapshot' || 
+$cmd->{execute} eq 'delete-drive-snapshot' ||
 $cmd->{execute} eq 'guest-shutdown' ||
 $cmd->{execute} eq 'blockdev-snapshot-internal-sync' ||
 $cmd->{execute} eq 'blockdev-snapshot-delete-internal-sync' ||
@@ -161,7 +161,7 @@ my $next_cmdid = sub {
 my $lookup_queue_info = sub {
 my ($self, $fh, $noerr) = @_;
 
-my $queue_info = $self->{queue_lookup}->{$fh};
+my $queue_info = $self->{queue_lookup}->{$fh};
 if (!$queue_info) {
warn "internal error - unable to lookup queue info" if !$noerr;
return undef;
@@ -175,7 +175,7 @@ my $close_connection = sub {
 if (my $fh = delete $queue_info->{fh}) {
delete $self->{queue_lookup}->{$fh};
$self->{mux}->close($fh);
-} 
+}
 };
 
 my $open_connection = sub {
@@ -262,7 +262,7 @@ my $check_queue = sub {
 
 

[pve-devel] [PATCH manager 2/2] Add online help to VM bios settings

2019-09-18 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/qemu/QemuBiosEdit.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/manager6/qemu/QemuBiosEdit.js 
b/www/manager6/qemu/QemuBiosEdit.js
index a0fad159..7283df74 100644
--- a/www/manager6/qemu/QemuBiosEdit.js
+++ b/www/manager6/qemu/QemuBiosEdit.js
@@ -1,6 +1,7 @@
 Ext.define('PVE.qemu.BiosEdit', {
 extend: 'Proxmox.window.Edit',
 alias: 'widget.pveQemuBiosEdit',
+onlineHelp: 'qm_bios_and_uefi',
 
 initComponent : function() {
var me = this;
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 1/2] Add online help to VM display settings

2019-09-18 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/qemu/DisplayEdit.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js
index e5af00aa..8c54b7a7 100644
--- a/www/manager6/qemu/DisplayEdit.js
+++ b/www/manager6/qemu/DisplayEdit.js
@@ -1,6 +1,7 @@
 Ext.define('PVE.qemu.DisplayInputPanel', {
 extend: 'Proxmox.panel.InputPanel',
 xtype: 'pveDisplayInputPanel',
+onlineHelp: 'qm_display',
 
 onGetValues: function(values) {
var ret = PVE.Parser.printPropertyString(values, 'type');
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 0/2] Add online help links where missing

2019-09-18 Thread Aaron Lauterer
I found two spots where documentation is available but the help button
was missing.

Aaron Lauterer (2):
  Add online help to VM display settings
  Add online help to VM bios settings

 www/manager6/qemu/DisplayEdit.js  | 1 +
 www/manager6/qemu/QemuBiosEdit.js | 1 +
 2 files changed, 2 insertions(+)

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH manager v2 2/4] spice: Add enhancements form component

2019-09-18 Thread Aaron Lauterer



On 9/18/19 12:11 PM, Dominik Csapak wrote:

On 9/17/19 11:35 AM, Aaron Lauterer wrote:

Signed-off-by: Aaron Lauterer 
---
  www/manager6/Makefile |  1 +
  www/manager6/form/SpiceEnhancementSelector.js | 72 +++
  2 files changed, 73 insertions(+)
  create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 82e25c79..aa460c3b 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -66,6 +66,7 @@ JSSRC=  \
  form/CalendarEvent.js    \
  form/CephPoolSelector.js    \
  form/PermPathSelector.js    \
+    form/SpiceEnhancementSelector.js    \
  dc/Tasks.js    \
  dc/Log.js    \
  panel/StatusPanel.js    \
diff --git a/www/manager6/form/SpiceEnhancementSelector.js 
b/www/manager6/form/SpiceEnhancementSelector.js

new file mode 100644
index ..cbafd502
--- /dev/null
+++ b/www/manager6/form/SpiceEnhancementSelector.js
@@ -0,0 +1,72 @@
+Ext.define('PVE.form.SpiceEnhancementSelector', {
+    extend: 'Proxmox.panel.InputPanel',
+    alias: 'widget.pveSpiceEnhancementSelector',
+    insideWizard: false,
+
+    initComponent: function() {
+    var me = this;
+    me.items = [
+    {
+    xtype: 'displayfield',
+    value: gettext('Spice enhancements') + ':',
+    hidden: !me.insideWizard
+    },
+    {
+    xtype: 'proxmoxcheckbox',
+    itemId: 'foldersharing',
+    name: 'foldersharing',
+    submitValue: false,
+    fieldLabel: gettext('Folder sharing'),
+    uncheckedValue: 0,
+    },
+    {
+    xtype: 'proxmoxKVComboBox',
+    itemId: 'videostreaming',
+    name: 'videostreaming',
+    submitValue: false,
+    value: 'off',
+    fieldLabel: gettext('Video streaming'),
+    comboItems: [
+    ['off', 'off'],
+    ['all', 'all'],
+    ['filter', 'filter'],
+    ],
+    },
+    ];
+


like stefan already mentioned, i would also like to see the items 
declared directly on the class isntead of in the initcomponent


if (as i guess) you had problems with the '!me.insideWizard',
look at our 'cbind' mixin and what it can do

may result in a little more intial work on your side, but
should result in cleaner code


Thanks for the hint with cbind!



+    me.callParent();
+    },
+
+    // handle submitted values manually to work in the VM create 
wizard as well.
+    // without submitValue = false the fields would be added to the 
config

+    onGetValues: function() {
+    var me = this;
+    if (me.disabled) {
+    return;
+    }
+
+    var values = {};
+    var foldersharing = me.down('field[name=foldersharing]').getValue();
+    var videostreaming = 
me.down('field[name=videostreaming]').getValue();


i am very certain that if you defined items with an 'itemId' you can do
me.getComponent('itemId-of-component') which is a bit nicer and should 
be much faster




As discussed in person this is unfortunately not possible because there 
is another container component in in which the item items are and 
getComponent only goes one level deep.


As this is only called when collecting the values on a submit or similar 
actions like opening the summary tab in the VM creation wizard the 
performance impact is negligible.



+
+    if (videostreaming !== "off") {
+    values.videostreaming = videostreaming;
+    }
+    if (foldersharing) {
+    values.foldersharing = 1;
+    }
+    if (Ext.Object.isEmpty(values)) {
+    return { 'delete': 'spice_enhancements' };
+    }
+    var enhancements = PVE.Parser.printPropertyString(values);
+    return { spice_enhancements: enhancements };
+    },
+
+    setValues: function(values) {
+    if (values.spice_enhancements) {
+    var enhancements = 
PVE.Parser.parsePropertyString(values.spice_enhancements);
+    enhancements['foldersharing'] = 
PVE.Parser.parseBoolean(enhancements['foldersharing'], 0);

+    this.callParent([enhancements]);
+    }
+    },
+});




___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH manager v2 3/4] spice: Add enhanecements to VM Options panel

2019-09-18 Thread Aaron Lauterer



On 9/18/19 12:12 PM, Dominik Csapak wrote:

On 9/17/19 11:35 AM, Aaron Lauterer wrote:

Signed-off-by: Aaron Lauterer 
---
  www/manager6/Utils.js    | 18 ++
  www/manager6/qemu/Options.js | 13 +
  2 files changed, 31 insertions(+)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 6a489e7e..a9adb382 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -334,6 +334,24 @@ Ext.define('PVE.Utils', { utilities: {
  }
  },
+    render_spice_enhancements: function(values) {
+    if (!values) {
+    return Proxmox.Utils.disabledText;
+    }
+    var props = PVE.Parser.parsePropertyString(values);
+    if (Ext.Object.isEmpty(props)) {
+    return Proxmox.Utils.disabledText;
+    }


you can combine those cases with:

let props = PVE.Parser.parsePropertyString(values || {});


I tried it but unfortunately parsePropertyString does not take an empty 
object, or empty string, without defining a default key. Since all 
options for now are optional we cannot define a default key.


My approach for now would be to define the disabled return text once at 
the beginning and then use that variable as the return value in both if 
statements.



+    var output = [];
+    if (PVE.Parser.parseBoolean(props.foldersharing)) {
+    output.push(gettext("Folder sharing enabled"));
+    }
+    if (props.videostreaming === "all" || props.videostreaming === 
"filter") {
+    output.push(gettext("Video Streaming") + ": " + 
props.videostreaming);

+    }
+    return output.join(", ");
+    },
+
  // fixme: auto-generate this
  // for now, please keep in sync with PVE::Tools::kvmkeymaps
  kvm_keymaps: {
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index e1580060..96eb0499 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -281,6 +281,19 @@ Ext.define('PVE.qemu.Options', {
  }
  } : undefined
  },
+    spice_enhancements: {
+    header: gettext('Spice Enhancements'),
+    defaultValue: false,
+    renderer:  PVE.Utils.render_spice_enhancements,
+    editor: caps.vms['VM.Config.Options'] ? {
+    xtype: 'proxmoxWindowEdit',
+    subject: gettext('Spice Enhancements'),
+    items: {
+    xtype: 'pveSpiceEnhancementSelector',
+    name: 'spice_enhancements',
+    }
+    } : undefined
+    },
  hookscript: {
  header: gettext('Hookscript')
  }




___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH widget-toolkit] Cleanup whitespace

2019-09-18 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 button/Button.js  |  4 ++--
 data/DiffStore.js |  4 ++--
 data/reader/JsonObject.js | 14 +++---
 mixin/CBind.js| 14 +++---
 node/TimeView.js  | 14 +++---
 panel/RRDChart.js | 14 +++---
 window/TaskViewer.js  | 20 ++--
 7 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/button/Button.js b/button/Button.js
index 846db7c..89d273e 100644
--- a/button/Button.js
+++ b/button/Button.js
@@ -80,7 +80,7 @@ Ext.define('Proxmox.button.Button', {
throw "unable to find waitMsgTarget";
}
}
-   
+
if (me.selModel) {
 
me.mon(me.selModel, "selectionchange", function() {
@@ -113,7 +113,7 @@ Ext.define('Proxmox.button.StdRemoveButton', {
 
 getUrl: function(rec) {
var me = this;
-   
+
return me.baseurl + '/' + rec.getId();
 },
 
diff --git a/data/DiffStore.js b/data/DiffStore.js
index 22b84a6..d43f111 100644
--- a/data/DiffStore.js
+++ b/data/DiffStore.js
@@ -23,7 +23,7 @@ Ext.define('Proxmox.data.DiffStore', {
 alias: 'store.diff',
 
 sortAfterUpdate: false,
-
+
 constructor: function(config) {
var me = this;
 
@@ -58,7 +58,7 @@ Ext.define('Proxmox.data.DiffStore', {
}
});
olditem.endEdit(true);
-   olditem.commit(); 
+   olditem.commit();
} else {
var newrec = Ext.create(me.model, data);
var pos = (me.appendAtStart && !first_load) ? 0 : 
me.data.length;
diff --git a/data/reader/JsonObject.js b/data/reader/JsonObject.js
index db2646c..342ad08 100644
--- a/data/reader/JsonObject.js
+++ b/data/reader/JsonObject.js
@@ -1,12 +1,12 @@
 /* A reader to store a single JSON Object (hash) into a storage.
- * Also accepts an array containing a single hash. 
+ * Also accepts an array containing a single hash.
  *
  * So it can read:
  *
- * example1: {data1: "xyz", data2: "abc"} 
+ * example1: {data1: "xyz", data2: "abc"}
  * returns [{key: "data1", value: "xyz"}, {key: "data2", value: "abc"}]
  *
- * example2: [ {data1: "xyz", data2: "abc"} ] 
+ * example2: [ {data1: "xyz", data2: "abc"} ]
  * returns [{key: "data1", value: "xyz"}, {key: "data2", value: "abc"}]
  *
  * If you set 'readArray', the reader expexts the object as array:
@@ -30,7 +30,7 @@
 Ext.define('Proxmox.data.reader.JsonObject', {
 extend: 'Ext.data.reader.Json',
 alias : 'reader.jsonobject',
-
+
 readArray: false,
 
 rows: undefined,
@@ -82,9 +82,9 @@ Ext.define('Proxmox.data.reader.JsonObject', {
}
});
}
-   
-   } else { 
-   
+
+   } else {
+
var org_root = root;
 
if (Ext.isArray(org_root)) {
diff --git a/mixin/CBind.js b/mixin/CBind.js
index 6f217cf..4bd4a55 100644
--- a/mixin/CBind.js
+++ b/mixin/CBind.js
@@ -9,11 +9,11 @@ Ext.define('Proxmox.Mixin.CBind', {
 
 cloneTemplates: function() {
var me = this;
-   
+
if (typeof(me.cbindData) == "function") {
me.cbindData = me.cbindData(me.initialConfig) || {};
}
-   
+
var getConfigValue = function(cname) {
 
if (cname in me.initialConfig) {
@@ -21,13 +21,13 @@ Ext.define('Proxmox.Mixin.CBind', {
}
if (cname in me.cbindData) {
return me.cbindData[cname];
-   }   
+   }
if (cname in me) {
return me[cname];
}
throw "unable to get cbind data for '" + cname + "'";
};
-   
+
var applyCBind = function(obj) {
var cbind = obj.cbind, prop, cdata, cvalue, match, found;
if (!cbind) return;
@@ -71,7 +71,7 @@ Ext.define('Proxmox.Mixin.CBind', {
if (me.cbind) {
applyCBind(me);
}
-   
+
var cloneTemplateArray = function(org) {
var copy, i, found, el, elcopy, arrayLength;
 
@@ -105,7 +105,7 @@ Ext.define('Proxmox.Mixin.CBind', {
}
return copy;
};
-   
+
var cloneTemplateObject = function(org) {
var res = {}, prop, el, copy;
for (prop in org) {
@@ -128,7 +128,7 @@ Ext.define('Proxmox.Mixin.CBind', {
 
var condCloneProperties = function() {
var prop, el, i, tmp;
-   
+
for (prop in me) {
el = me[prop];
i

Re: [pve-devel] applied-series: [PATCH v4 0/4] Fix #2343 Spice USB3 support

2019-09-23 Thread Aaron Lauterer
I did some short tests with the latest commits and there is the 
following problem:


Adding a USB3 device or port will result in such an error msg:

Parameter verification failed. (400)

usb1: invalid format - duplicate key in comma-separated list property: usb3


The parameter send in the API request is:

usb1: host=090c:1000,usb3=1,usb3=1


Without looking into the code it looks to me that when selecting a USB3 
capable device to pass through, the checkbox is checked but the `usb3=1` 
parameter is handled by the dropdown components / callback functions.


Now with the latest changes the checkbox is not disabled anymore in this 
situation and thus it's value added to the API request.


When I uncheck the USB3 checkbox after selecting a device / port I can 
save the changes and `usb3=1` is set.


Regards,
Aaron


On 9/23/19 8:44 AM, Thomas Lamprecht wrote:

On 9/23/19 7:51 AM, Thomas Lamprecht wrote:

On 9/11/19 2:43 PM, Aaron Lauterer wrote:

This patch series enables USB3 for the passthrough / redirection of USB
devices via the Spice client.

v3 -> v4:
* cleanup of redundant if condition
* avoiding cyclic module dependency from USB.pm to QemuServer.pm
* fixing regex check for migration to match if spice is at beginning
   alone or with a following comma. Thanks Thomas for pointing out how to
   make it future proof




applied, thanks!

I added also cfg2cmd test for this, as we have a "fake QEMU version"
mechanism there I added one with 4.1 as version to see the command effects
and ensuring it keeps stable.



had to do some late-followups:

The usb3 format description was now wrong, so:

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 33bf966..ad6902f 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1319,7 +1319,7 @@ EODESCR
  usb3 => {
 optional => 1,
 type => 'boolean',
-   description => "Specifies whether if given host option is a USB3 device or 
port (this does currently not work reliably with spice redirection and is then 
ignored).",
+   description => "Specifies whether if given host option is a USB3 device or 
port.",
  default => 0,
  },
  };


Further, the "USB 3" disabling in the web interface made no sense anymore,
I removed it and refactored the whole component slightly (check out the
followup commits for details)




v2 -> v3:
* don't modify current behavior
* fix local resource check
* fix and cleanup GUI code

v1 -> v2:
* no qemu version checks
* fix local resource check on migration
* add GUI support

Aaron Lauterer (4):

qemu-server:
   usb: Cleanup redundant if condition
   usb: Add USB3 capabilities to Spice USB devices
   usb: Fix local resource check of Spice USB devices

  PVE/QemuServer.pm |  7 +--
  PVE/QemuServer/USB.pm | 11 +++
  2 files changed, 12 insertions(+), 6 deletions(-)

pve-manager:
   usb: Enable USB3 for Spice USB passthrough

  www/manager6/qemu/USBEdit.js | 11 ++-
  1 file changed, 6 insertions(+), 5 deletions(-)



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] applied-series: [PATCH v4 0/4] Fix #2343 Spice USB3 support

2019-09-24 Thread Aaron Lauterer

Now that it can be saved without enabling USB3 I found another issue :/

If I save a USB3 dev or port passthrough without USB3 enabled, it is 
done so as expected. Once I open the edit dialog of that device again 
the USB3 checkbox is checked again on load. This means that the form is 
changed and the OK and Reset buttons get enabled.


A small problem but still annoying because one might not want to change 
anything in the end and out of muscle memory still clicks the now 
enabled OK button and saves the changes which enable USB3.


On 9/23/19 5:11 PM, Thomas Lamprecht wrote:

On 9/23/19 4:23 PM, Aaron Lauterer wrote:

I did some short tests with the latest commits and there is the following 
problem:

Adding a USB3 device or port will result in such an error msg:

Parameter verification failed. (400)

usb1: invalid format - duplicate key in comma-separated list property: usb3


The parameter send in the API request is:

usb1: host=090c:1000,usb3=1,usb3=1


Without looking into the code it looks to me that when selecting a USB3 capable 
device to pass through, the checkbox is checked but the `usb3=1` parameter is 
handled by the dropdown components / callback functions.

Now with the latest changes the checkbox is not disabled anymore in this 
situation and thus it's value added to the API request.

When I uncheck the USB3 checkbox after selecting a device / port I can save the 
changes and `usb3=1` is set.


Thanks for testing this. Fixed by removing the use of getUSBValue() here as
we know also allow to pass a USB3 device through as USB2, so the speed
detection in the method may not be correct anymore.

While previously this was handled by the "if (!/usb3/.test(val) ..."
check, Dominik thinks that it's only there because when he implemented this,
USB3 devices were required to be passed-through as USB3.
I re-tested passing a USB3 through as USB2 and it worked here, so I think
we really can remove this constrain.



Regards,
Aaron




___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH manager v2 4/4] spice: Add enhancements to VM Creation wizard

2019-09-24 Thread Aaron Lauterer



On 9/20/19 9:00 AM, Thomas Lamprecht wrote:

On 18.09.19 12:22, Dominik Csapak wrote:

lgtm, i find it understandable that the 'spice enhancments' are disabled
because spice is not selected, but maybe someone else has a comment on that?



IMO this is highly confusing and bad UX... The fields relation is
not visible, also it looks like a checkbox misses "Spice enhancements"
as it's really not clear that this should be some sort of "option group
heading"


On 9/17/19 11:35 AM, Aaron Lauterer wrote:

For a cleaner UI the SCSI Controller (pveScsiHwSelector) is moved to the
left column below the VGA selector. The new Spice enhancements
components is placed in the right column and enabled if qxl/spice is
selected in the VGA selector.



1. I'd omit the extra "Spice enhancements:" and just include "SPICE" (note here:
keep the uppercase consistent, the display selector uses SPICE and is 
before your
patch, try to orient on such things) in the settings, like "SPICE folder 
sharing"


Yep, sounds good.


2. Please keep the SCSI controller where it is, no reason or improvement to 
move it
just breaks muscle memory of existing users. We're not a super market, 
random movement
of fields to make people look for them and thus find new "buttons to buy" 
should thus
be rather avoided ;)


Okay, I am going to try how we could do this in another way, without 
destroying old muscle memory.



3. It's a bit strange that here the spice enhancements are with the display 
settings but
then, after VM creation the display settings are in the HW tab while this 
is in the
Options. While it could fit there for sure, it makes one search for this.. 
But OK,
that's maybe a bit hard to solve right, more confusing is the fact that I 
cannot change
those in the Wizard on creation if SPICE is not selected, but I can do so 
afterwards in
the options edit, also a semantic difference, which may not be to ideal for 
UX.
A simple hint, like we do for OVMF/EFI Disk could be enough.


The same with regards to placement is valid for the qemu agent. In the 
creation wizard it is in the System tab, close to the setting that can 
enable these features.


Once the VM is created I expect settings like these in the options panel 
and not the hardware panel.
Having all the SPICE enhancement settings in the display / hardware 
settings would surely confuse me more.


I will add a hint in the options -> spice dialog that spice needs to be 
enabled for the settings to have any effect if it is not the selected 
graphics card.



4. As others mentioned, the enhancements may also make sense without a QXL 
display, while
our code path doesn't really allow this separation as is this should at 
least not be
made hard for the future. I mean, if I think about this it seems to fit 
better with
QEMU Agent, as Guest Integration Enhancement, than with the display itself?


So we could just add the two new settings (folder sharing, video 
streaming) in the same plain way as the qemu agent and if a user enables 
either of these two options and spice is not selected show the same hint 
that they will only have an effect if spice is selected as graphics card.


Other possibilities would be to group some options in fieldsets or 
something similar. In the end this comes down to taste, how these items 
should be structured and how simple the UI should be kept.




Maybe just move this to advanced here and show it always?


Move these items to the advanced area and have it always enabled in the 
system tab? I don't like that idea as it would break the UI's behavior 
in a much harder way.


The, "SPICE dual monitor", "three monitors", .. could also be integrated in 
such settings?
I.e., a simple spinner with monitor count and a single SPICE in the display 
combo box.

As an additional spice enhancement convenience feature one could add a 
checkbox, or the
like, here with which a spice USB port gets added from the wizard?
But the latter two should be additional patches, if done.


These two ideas sound good for me, especially when thinking about making 
these settings easily accessible during the wizard and thus reducing the 
needed interactions after the wizard is done.


For the future, if we go down the road of having more of these settings 
in the wizard grouping them in some way might be a good idea.


What about making these additional settings (number of monitors, spice 
USB port, etc.) only visible if spice is selected as graphics card? This 
would help to keep the clutter to a minimum.
They should not go to the advanced area IMHO because once spice is 
selected some of these settings are essential and the others we don't 
want to hide from the user because then we could skip adding them to the 
wizard in the first place.


Another thing that just hit me is that we will need a

[pve-devel] [PATCH manager 1/2] ui: vm/usbedit: add gettext to label

2019-09-25 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/qemu/USBEdit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js
index 8cad8fc5..f41c3d21 100644
--- a/www/manager6/qemu/USBEdit.js
+++ b/www/manager6/qemu/USBEdit.js
@@ -102,7 +102,7 @@ Ext.define('PVE.qemu.USBInputPanel', {
bind: { disabled: '{!hostdevice.checked}' },
editable: true,
allowBlank: false,
-   fieldLabel: 'Choose Device',
+   fieldLabel: gettext('Choose Device'),
labelAlign: 'right',
},
{
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 2/2] ui: vm/usbedit: refactor usb3 checkbox handling

2019-09-25 Thread Aaron Lauterer
USB3 checkbox was always checked if the device / port supports USB3
even though USB3 was disabled on purpose.

The behaviour now is that for an existing configuration the checkbox
reflects what is set. When selecting a device or port that is not the
configured one the checkbox reflects the USB3 support of the selected
device / port.

Signed-off-by: Aaron Lauterer 
---

What started out to fix the problem discussed in the previous patch
series [0] turned into a refactoring of the controller.

I hope I got the regexes right.

Since we do not disable the USB3 checkbox anymore I am not sure why we
kept the whole if else clause around `savedVal`.


[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/039111.html

 www/manager6/qemu/USBEdit.js | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js
index f41c3d21..73df7b30 100644
--- a/www/manager6/qemu/USBEdit.js
+++ b/www/manager6/qemu/USBEdit.js
@@ -17,19 +17,19 @@ Ext.define('PVE.qemu.USBInputPanel', {
change: function(field, newValue, oldValue) {
var usb3field = this.lookupReference('usb3');
var usbval = field.getUSBValue();
-   var dev_is_usb3 = /usb3=1/.test(usbval);
-
-   if (dev_is_usb3) {
-   usb3field.savedVal = usb3field.getValue();
-   usb3field.setValue(true);
+   var confid = this.view.confid;
+   var vmconfig = this.view.vmconfig[confid];
+   var dev_is_usb3 = false;
+   var hostregex = /host=([^,]*)/;
+
+   if (/^host/.test(vmconfig) &&
+   vmconfig.match(hostregex)[1] === 
usbval.match(hostregex)[1]) {
+   dev_is_usb3 = /usb3=1/.test(vmconfig);
} else {
-   if (usb3field.savedVal !== undefined) {
-   usb3field.setValue(usb3field.savedVal);
-   } else {
-   usb3field.setValue(usb3field.originalValue);
-   }
-   usb3field.setDisabled(false);
+   dev_is_usb3 = /usb3=1/.test(usbval);
}
+
+   usb3field.setValue(dev_is_usb3);
}
}
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 2/2] ui: vm/usbselector: cleanup unused code

2019-09-26 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/form/USBSelector.js | 10 --
 1 file changed, 10 deletions(-)

diff --git a/www/manager6/form/USBSelector.js b/www/manager6/form/USBSelector.js
index ed35bde0..82b59722 100644
--- a/www/manager6/form/USBSelector.js
+++ b/www/manager6/form/USBSelector.js
@@ -7,16 +7,6 @@ Ext.define('PVE.form.USBSelector', {
 valueField: 'usbid',
 editable: true,
 
-getUSBValue: function() {
-   var me = this;
-   var rec = me.store.findRecord('usbid', me.value);
-   var val = 'host='+ me.value;
-   if (rec && rec.data.speed === "5000") {
-   val = 'host=' + me.value + ",usb3=1";
-   }
-   return val;
-},
-
 validator: function(value) {
var me = this;
if (me.type === 'device') {
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager 1/2] ui: vm/usbedit: simplify USB3 handling

2019-09-26 Thread Aaron Lauterer
Enable USB3 by default. There are no restrictions anymore that the speed
of the dev must match the USB3 speed. The xhci controller can deal with
USB 2 and 1 devices. USB3 devices can be plugged in a USB2 (ehci)
controller.

When using a USB device for Spice passthrough my tests showed that USB2
devices connecting to the xhci controller work but a USB3 device passed
via Spice cannot connect to an ehci controller (no USB3 enabled).

qemu-server 6.0-9 supports USB3 also for Spice USB passthrough. See
commit 733234b.

All this means we can get rid of the separate handling of USB3 and non
USB3 devices and leave the decision to the user if USB3 should be
enabled or not.

Signed-off-by: Aaron Lauterer 
---

I don't want to call this v2 as we do things very differently than in
the previous patch [0] that dealt with this.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/039122.html

 www/manager6/qemu/USBEdit.js | 27 +--
 1 file changed, 1 insertion(+), 26 deletions(-)

diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js
index f41c3d21..ed792617 100644
--- a/www/manager6/qemu/USBEdit.js
+++ b/www/manager6/qemu/USBEdit.js
@@ -9,32 +9,6 @@ Ext.define('PVE.qemu.USBInputPanel', {
data: {}
 },
 
-controller: {
-   xclass: 'Ext.app.ViewController',
-
-   control: {
-   'pveUSBSelector': {
-   change: function(field, newValue, oldValue) {
-   var usb3field = this.lookupReference('usb3');
-   var usbval = field.getUSBValue();
-   var dev_is_usb3 = /usb3=1/.test(usbval);
-
-   if (dev_is_usb3) {
-   usb3field.savedVal = usb3field.getValue();
-   usb3field.setValue(true);
-   } else {
-   if (usb3field.savedVal !== undefined) {
-   usb3field.setValue(usb3field.savedVal);
-   } else {
-   usb3field.setValue(usb3field.originalValue);
-   }
-   usb3field.setDisabled(false);
-   }
-   }
-   }
-   }
-},
-
 setVMConfig: function(vmconfig) {
var me = this;
me.vmconfig = vmconfig;
@@ -128,6 +102,7 @@ Ext.define('PVE.qemu.USBInputPanel', {
xtype: 'checkbox',
name: 'usb3',
inputValue: true,
+   checked: true,
reference: 'usb3',
fieldLabel: gettext('Use USB3')
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager] ui: qemubiosedit: add gettext to efi disk hint

2019-09-30 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---

Put the hint in one line because AFAIU our tooling cannot handle
multiline gettext calls.

 www/manager6/qemu/QemuBiosEdit.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/www/manager6/qemu/QemuBiosEdit.js 
b/www/manager6/qemu/QemuBiosEdit.js
index 7283df74..54c0271d 100644
--- a/www/manager6/qemu/QemuBiosEdit.js
+++ b/www/manager6/qemu/QemuBiosEdit.js
@@ -9,8 +9,7 @@ Ext.define('PVE.qemu.BiosEdit', {
var EFIHint = Ext.createWidget({
xtype: 'displayfield', //submitValue is false, so we don't get 
submitted
userCls: 'pve-hint',
-   value: 'You need to add an EFI disk for storing the ' +
-   'EFI settings. See the online help for details.',
+   value: gettext('You need to add an EFI disk for storing the EFI 
settings. See the online help for details.'),
hidden: true
});
 
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v3 manager 2/3] ui: add spice enhancements form component

2019-10-04 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 www/manager6/Makefile |  1 +
 www/manager6/form/SpiceEnhancementSelector.js | 60 +++
 2 files changed, 61 insertions(+)
 create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 82e25c79..aa460c3b 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -66,6 +66,7 @@ JSSRC=
\
form/CalendarEvent.js   \
form/CephPoolSelector.js\
form/PermPathSelector.js\
+   form/SpiceEnhancementSelector.js\
dc/Tasks.js \
dc/Log.js   \
panel/StatusPanel.js\
diff --git a/www/manager6/form/SpiceEnhancementSelector.js 
b/www/manager6/form/SpiceEnhancementSelector.js
new file mode 100644
index ..7e98c044
--- /dev/null
+++ b/www/manager6/form/SpiceEnhancementSelector.js
@@ -0,0 +1,60 @@
+Ext.define('PVE.form.SpiceEnhancementSelector', {
+extend: 'Proxmox.panel.InputPanel',
+alias: 'widget.pveSpiceEnhancementSelector',
+items: [
+   {
+   xtype: 'proxmoxcheckbox',
+   itemId: 'foldersharing',
+   name: 'foldersharing',
+   fieldLabel: gettext('Folder sharing'),
+   uncheckedValue: 0,
+   },
+   {
+   xtype: 'proxmoxKVComboBox',
+   itemId: 'videostreaming',
+   name: 'videostreaming',
+   value: 'off',
+   fieldLabel: gettext('Video streaming'),
+   comboItems: [
+   ['off', 'off'],
+   ['all', 'all'],
+   ['filter', 'filter'],
+   ],
+   },
+   {
+   xtype: 'displayfield',
+   itemId: 'spicehint',
+   userCls: 'pve-hint',
+   value: gettext('To use these features set the display to SPICE in 
the hardware settings of the VM.'),
+   hidden: true
+   }
+],
+
+onGetValues: function(values) {
+   var ret = {};
+
+   if (values.videostreaming !== "off") {
+   ret.videostreaming = values.videostreaming;
+   }
+   if (values.foldersharing) {
+   ret.foldersharing = 1;
+   }
+   if (Ext.Object.isEmpty(ret)) {
+   return { 'delete': 'spice_enhancements' };
+   }
+   var enhancements = PVE.Parser.printPropertyString(ret);
+   return { spice_enhancements: enhancements };
+},
+
+setValues: function(values) {
+   var vga = PVE.Parser.parsePropertyString(values.vga, 'type');
+   if (vga.type !== "qxl") {
+   this.down('#spicehint').setVisible(true);
+   }
+   if (values.spice_enhancements) {
+   var enhancements = 
PVE.Parser.parsePropertyString(values.spice_enhancements);
+   enhancements['foldersharing'] = 
PVE.Parser.parseBoolean(enhancements['foldersharing'], 0);
+   this.callParent([enhancements]);
+   }
+},
+});
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs 1/3] add spice enhancements documentation

2019-10-04 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 qm.adoc | 56 
 1 file changed, 56 insertions(+)

diff --git a/qm.adoc b/qm.adoc
index 0a1dfa6..583a248 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -819,6 +819,62 @@ start after those where the parameter is set. Further, 
this parameter can only
 be enforced between virtual machines running on the same host, not
 cluster-wide.
 
+[[qm_spice_enhancements]]
+Spice Enhancements
+~~
+
+The Spice enhancements can be enabled in the options of a virtual machine. Run
+the following command to enable them via the CLI:
+
+
+qm set  -spice_enhancements foldersharing=1,videostreaming=all
+
+
+Folder sharing
+^^
+
+Share a local folder with the guest. The `spice-webdavd` daemon needs to be
+installed in the guest. It makes the shared folder available through a local
+WebDAV server located at http://localhost:9843 in the guest.
+
+For Windows guests the installer for the 'Spice WebDAV daemon' can be 
downloaded
+from the
+https://www.spice-space.org/download.html#windows-binaries[official Spice 
website].
+
+Most Linux distributions have a package called `spice-webdavd` that can be
+installed.
+
+To share a folder in Virt-Viewer (Remote Viewer) go to 'File -> Preferences'.
+Select the folder to share and then enable the checkbox.
+
+NOTE: Folder sharing currently only works in the Linux version of Virt-Viewer.
+
+Video Streaming
+^^^
+
+Fast refreshing areas are encoded into a video stream. Two options exist:
+
+* *all*: Any fast refreshing window can be encoded into a video stream.
+* *filter*: Filters more if video streaming should be activated (currently only
+  skips small windows surfaces).
+
+A general recommendation if it should be enabled and which option to choose
+cannot be given. Your mileage may vary depending on the specific circumstances.
+
+Troubleshooting
+^^^
+
+Shared folder does not show up
+++
+
+Make sure the WebDAV service is enabled and running in the guest. On Windows it
+is called 'Spice webdav proxy'. In Linux the name is 'spice-webdavd' but can be
+different depending on the distribution.
+
+If the service is running, check the WebDAV server by opening
+http://localhost:9843 in a browser in the guest.
+
+It can help to restart the Spice connection.
 
 [[qm_migration]]
 Migration
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v3 0/3] Fix #2041, #2272 GUI for Spice Enhancements

2019-10-04 Thread Aaron Lauterer
With the server side patches applied[0] the GUI part for this was
missing.

This patch series adds the two current SPICE enhancements (folder
sharing, video streaming) to the Options panel of a VM along with the
needed documentation. Adding them to the VM creation wizard has been
postponed for now.

v2 -> v3:
* no changes to the VM creation wizard
* added documentation and links to it
* removed initComponent and placed items directly in the class
* added hint if spice is not set as display

v1 -> v2:
* code cleanup / improvement
* rearranged the System panel in the VM creation wizard for a cleaner
  and easier to understand UI

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/038799.html

pve-docs: Aaron Lauterer (1):

 qm.adoc | 56 
 1 file changed, 56 insertions(+)

pve-manager: Aaron Lauterer (2):
  ui: add spice enhancements form component
  ui: vm-options: add spice enhancements

 www/manager6/Makefile |  1 +
 www/manager6/Utils.js | 21 ++
 www/manager6/form/SpiceEnhancementSelector.js | 69 +++
 www/manager6/qemu/Options.js  | 14 
 4 files changed, 105 insertions(+)
 create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v3 manager 3/3] ui: vm-options: add spice enhancements

2019-10-04 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
removing the check if values is true and changing the parameters in
parsePropertyString to `parsePropertyString(values || {})` as suggested
in [0] does not work.
parsePropertyString expects a string. Passing anything except a string
containing a `key=value` (there is no default key for this option)
results in warning and errors in the JS console.

Therefore I kept the old checks.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/039054.html

www/manager6/Utils.js| 21 +
 www/manager6/qemu/Options.js | 14 ++
 2 files changed, 35 insertions(+)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 5cc6b674..be568070 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -334,6 +334,27 @@ Ext.define('PVE.Utils', { utilities: {
}
 },
 
+render_spice_enhancements: function(values) {
+   let disabled = Proxmox.Utils.disabledText;
+
+   if (!values) {
+   return disabled;
+   }
+   let props = PVE.Parser.parsePropertyString(values);
+   if (Ext.Object.isEmpty(props)) {
+   return disabled;
+   }
+
+   let output = [];
+   if (PVE.Parser.parseBoolean(props.foldersharing)) {
+   output.push(gettext("Folder sharing enabled"));
+   }
+   if (props.videostreaming === "all" || props.videostreaming === 
"filter") {
+   output.push(gettext("Video Streaming") + ": " + 
props.videostreaming);
+   }
+   return output.join(", ");
+},
+
 // fixme: auto-generate this
 // for now, please keep in sync with PVE::Tools::kvmkeymaps
 kvm_keymaps: {
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index e1580060..4a8e06e9 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -281,6 +281,20 @@ Ext.define('PVE.qemu.Options', {
}
} : undefined
},
+   spice_enhancements: {
+   header: gettext('Spice Enhancements'),
+   defaultValue: false,
+   renderer:  PVE.Utils.render_spice_enhancements,
+   editor: caps.vms['VM.Config.Options'] ? {
+   xtype: 'proxmoxWindowEdit',
+   subject: gettext('Spice Enhancements'),
+   onlineHelp: 'qm_spice_enhancements',
+   items: {
+   xtype: 'pveSpiceEnhancementSelector',
+   name: 'spice_enhancements',
+   }
+   } : undefined
+   },
hookscript: {
header: gettext('Hookscript')
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs] display: add URL and short explanation of SPICE

2019-10-07 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---

There was no explanation of what SPICE is or a link to the project.

 qm.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qm.adoc b/qm.adoc
index 5f79547..e55fa50 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -636,7 +636,8 @@ necessary 
footnote:[https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-consid
 qemu: using cirrus considered harmful], e.g., if using Windows XP or earlier
 * *vmware*, is a VMWare SVGA-II compatible adapter.
 * *qxl*, is the QXL paravirtualized graphics card. Selecting this also
-enables SPICE for the VM.
+enables https://www.spice-space.org/[SPICE] (a remote viewer protocol) for the
+VM.
 
 You can edit the amount of memory given to the virtual GPU, by setting
 the 'memory' option. This can enable higher resolutions inside the VM,
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v4 docs 1/3] add spice enhancements documentation

2019-10-07 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---

 qm.adoc | 63 +
 1 file changed, 63 insertions(+)

diff --git a/qm.adoc b/qm.adoc
index 0a1dfa6..6eada34 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -819,6 +819,69 @@ start after those where the parameter is set. Further, 
this parameter can only
 be enforced between virtual machines running on the same host, not
 cluster-wide.
 
+[[qm_spice_enhancements]]
+SPICE Enhancements
+~~
+
+SPICE Enhancements are optional features that can improve the remote viewer
+experience.
+
+To enable them via the GUI go to the *Options* panel of the virtual machine. 
Run
+the following command to enable them via the CLI:
+
+
+qm set  -spice_enhancements foldersharing=1,videostreaming=all
+
+
+NOTE: To use these features the <> of the virtual machine
+must be set to SPICE (qxl).
+
+Folder Sharing
+^^
+
+Share a local folder with the guest. The `spice-webdavd` daemon needs to be
+installed in the guest. It makes the shared folder available through a local
+WebDAV server located at http://localhost:9843.
+
+For Windows guests the installer for the 'Spice WebDAV daemon' can be 
downloaded
+from the
+https://www.spice-space.org/download.html#windows-binaries[official SPICE 
website].
+
+Most Linux distributions have a package called `spice-webdavd` that can be
+installed.
+
+To share a folder in Virt-Viewer (Remote Viewer) go to 'File -> Preferences'.
+Select the folder to share and then enable the checkbox.
+
+NOTE: Folder sharing currently only works in the Linux version of Virt-Viewer.
+
+Video Streaming
+^^^
+
+Fast refreshing areas are encoded into a video stream. Two options exist:
+
+* *all*: Any fast refreshing area will be encoded into a video stream.
+* *filter*: Additional filters are used to decide if video streaming should be
+  used (currently only small window surfaces are skipped).
+
+A general recommendation if video streaming should be enabled and which option
+to choose from cannot be given. Your mileage may vary depending on the specific
+circumstances.
+
+Troubleshooting
+^^^
+
+Shared folder does not show up
+++
+
+Make sure the WebDAV service is enabled and running in the guest. On Windows it
+is called 'Spice webdav proxy'. In Linux the name is 'spice-webdavd' but can be
+different depending on the distribution.
+
+If the service is running, check the WebDAV server by opening
+http://localhost:9843 in a browser in the guest.
+
+It can help to restart the SPICE session.
 
 [[qm_migration]]
 Migration
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v4 manager 3/3] ui: vm-options: add spice enhancements

2019-10-07 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---

As suggested by Thomas in [0] I removed the gettext around the feature
names to have the same feature names accross all translations. This
should help if people start searching for a problem with them.

Removed the check if values is falsy because parsePropertyString can now
handle it [1].

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-October/039387.html
[1]: 
https://git.proxmox.com/?p=pve-manager.git;a=commit;h=a017d8aaa1c7338745b0be55bc1d8d386cdc2b74

www/manager6/Utils.js| 18 ++
 www/manager6/qemu/Options.js | 14 ++
 2 files changed, 32 insertions(+)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 5cc6b674..84e45b21 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -334,6 +334,24 @@ Ext.define('PVE.Utils', { utilities: {
}
 },
 
+render_spice_enhancements: function(values) {
+   let disabled = Proxmox.Utils.disabledText;
+
+   let props = PVE.Parser.parsePropertyString(values);
+   if (Ext.Object.isEmpty(props)) {
+   return disabled;
+   }
+
+   let output = [];
+   if (PVE.Parser.parseBoolean(props.foldersharing)) {
+   output.push('Folder Sharing: ' + gettext('Enabled'));
+   }
+   if (props.videostreaming === 'all' || props.videostreaming === 
'filter') {
+   output.push('Video Streaming: ' + props.videostreaming);
+   }
+   return output.join(', ');
+},
+
 // fixme: auto-generate this
 // for now, please keep in sync with PVE::Tools::kvmkeymaps
 kvm_keymaps: {
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index e1580060..4a8e06e9 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -281,6 +281,20 @@ Ext.define('PVE.qemu.Options', {
}
} : undefined
},
+   spice_enhancements: {
+   header: gettext('Spice Enhancements'),
+   defaultValue: false,
+   renderer:  PVE.Utils.render_spice_enhancements,
+   editor: caps.vms['VM.Config.Options'] ? {
+   xtype: 'proxmoxWindowEdit',
+   subject: gettext('Spice Enhancements'),
+   onlineHelp: 'qm_spice_enhancements',
+   items: {
+   xtype: 'pveSpiceEnhancementSelector',
+   name: 'spice_enhancements',
+   }
+   } : undefined
+   },
hookscript: {
header: gettext('Hookscript')
}
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v4 manager 2/3] ui: add spice enhancements form component

2019-10-07 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---

As suggested by Thomas in [0] I removed the gettext around the feature
names to have the same feature names accross all translations. This
should help if people start searching for a problem with them.

The check if the hint to set SPICE in display is using a regex in order
to detect SPICE set with multiple monitors.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-October/039387.html

www/manager6/Makefile |  1 +
 www/manager6/form/SpiceEnhancementSelector.js | 60 +++
 2 files changed, 61 insertions(+)
 create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 82e25c79..aa460c3b 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -66,6 +66,7 @@ JSSRC=
\
form/CalendarEvent.js   \
form/CephPoolSelector.js\
form/PermPathSelector.js\
+   form/SpiceEnhancementSelector.js\
dc/Tasks.js \
dc/Log.js   \
panel/StatusPanel.js\
diff --git a/www/manager6/form/SpiceEnhancementSelector.js 
b/www/manager6/form/SpiceEnhancementSelector.js
new file mode 100644
index ..1642bf1d
--- /dev/null
+++ b/www/manager6/form/SpiceEnhancementSelector.js
@@ -0,0 +1,60 @@
+Ext.define('PVE.form.SpiceEnhancementSelector', {
+extend: 'Proxmox.panel.InputPanel',
+alias: 'widget.pveSpiceEnhancementSelector',
+items: [
+   {
+   xtype: 'proxmoxcheckbox',
+   itemId: 'foldersharing',
+   name: 'foldersharing',
+   fieldLabel: 'Folder Sharing',
+   uncheckedValue: 0,
+   },
+   {
+   xtype: 'proxmoxKVComboBox',
+   itemId: 'videostreaming',
+   name: 'videostreaming',
+   value: 'off',
+   fieldLabel: 'Video Streaming',
+   comboItems: [
+   ['off', 'off'],
+   ['all', 'all'],
+   ['filter', 'filter'],
+   ],
+   },
+   {
+   xtype: 'displayfield',
+   itemId: 'spicehint',
+   userCls: 'pve-hint',
+   value: gettext('To use these features set the display to SPICE in 
the hardware settings of the VM.'),
+   hidden: true,
+   }
+],
+
+onGetValues: function(values) {
+   var ret = {};
+
+   if (values.videostreaming !== "off") {
+   ret.videostreaming = values.videostreaming;
+   }
+   if (values.foldersharing) {
+   ret.foldersharing = 1;
+   }
+   if (Ext.Object.isEmpty(ret)) {
+   return { 'delete': 'spice_enhancements' };
+   }
+   var enhancements = PVE.Parser.printPropertyString(ret);
+   return { spice_enhancements: enhancements };
+},
+
+setValues: function(values) {
+   var vga = PVE.Parser.parsePropertyString(values.vga, 'type');
+   if (!/^qxl\d?$/.test(vga.type)) {
+   this.down('#spicehint').setVisible(true);
+   }
+   if (values.spice_enhancements) {
+   var enhancements = 
PVE.Parser.parsePropertyString(values.spice_enhancements);
+   enhancements['foldersharing'] = 
PVE.Parser.parseBoolean(enhancements['foldersharing'], 0);
+   this.callParent([enhancements]);
+   }
+},
+});
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v4 0/3] Fix #2041, #2272 GUI for Spice Enhancements

2019-10-07 Thread Aaron Lauterer
With the server side patches applied[0] the GUI part for this was
missing.

This patch series adds the two current SPICE enhancements (folder
sharing, video streaming) to the Options panel of a VM along with the
needed documentation. Adding them to the VM creation wizard has been
postponed for now.

v3 -> v4:
* added introduction and hint to documentation
* improved condition when to show the hint in the dialog to work for
  `qxl2` and likewise settings. (SPICE with multiple monitors)
* simplified handling of empty `vga` values thanks to [1].
* removed translation for feature names

v2 -> v3:
* no changes to the VM creation wizard
* added documentation and links to it
* removed initComponent and placed items directly in the class
* added hint if spice is not set as display

v1 -> v2:
* code cleanup / improvement
* rearranged the System panel in the VM creation wizard for a cleaner
  and easier to understand UI

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/038799.html
[1]: 
https://git.proxmox.com/?p=pve-manager.git;a=commit;h=a017d8aaa1c7338745b0be55bc1d8d386cdc2b74


docs: Aaron Lauterer (1):
 qm.adoc | 63 +
 1 file changed, 63 insertions(+)

manager: Aaron Lauterer (2):
  ui: add spice enhancements form component
  ui: vm-options: add spice enhancements

 www/manager6/Makefile |  1 +
 www/manager6/Utils.js | 18 ++
 www/manager6/form/SpiceEnhancementSelector.js | 60 +++
 www/manager6/qemu/Options.js  | 14 +
 4 files changed, 93 insertions(+)
 create mode 100644 www/manager6/form/SpiceEnhancementSelector.js

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] applied: [PATCH v4 docs 1/3] add spice enhancements documentation

2019-10-07 Thread Aaron Lauterer




On 10/7/19 4:06 PM, Thomas Lamprecht wrote:

On 10/7/19 3:23 PM, Aaron Lauterer wrote:

Signed-off-by: Aaron Lauterer 
---

  qm.adoc | 63 +
  1 file changed, 63 insertions(+)



applied, thanks! Did a small fixup (4th order headings do not show up in
PDFs/Manpages:


Thx, good to know :)



8<
diff --git a/qm.adoc b/qm.adoc
index 62727e1..4956304 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -871,8 +871,7 @@ circumstances.
  Troubleshooting
  ^^^
  
-Shared folder does not show up

-++
+.Shared folder does not show up
  
  Make sure the WebDAV service is enabled and running in the guest. On Windows it

  is called 'Spice webdav proxy'. In Linux the name is 'spice-webdavd' but can 
be



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] Trying to use spice enhancements

2019-10-07 Thread Aaron Lauterer

Thanks for finding that!

I'm looking into it.


On 10/7/19 7:53 PM, Gilberto Nunes wrote:

Never mind I forget to enable qemu agent in the VM...

Thanks
---
Gilberto Nunes Ferreira

(47) 3025-5907
(47) 99676-7530 - Whatsapp / Telegram

Skype: gilberto.nunes36





Em seg, 7 de out de 2019 às 14:46, Gilberto Nunes <
gilberto.nune...@gmail.com> escreveu:


Hi there

I am trying to use spice foldersharing...
I enable it with this command:
qm set 100 -spice_enhancements foldersharing=1,videostreaming=all

But when I try to start the VM I get this error:
qm start 100
kvm: -device
virtserialport,chardev=foldershare,name=org.spice-space.webdav.0: No
'virtio-serial-bus' bus found for device 'virtseria
lport'
start failed: command '/usr/bin/kvm -id 100 -name teste1 -chardev
'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait' -mo
n 'chardev=qmp,mode=control' -chardev
'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon
'chardev=qmp-event,mode=cont
rol' -pidfile /var/run/qemu-server/100.pid -daemonize -smbios
'type=1,uuid=40b94d33-bff8-44ad-8938-eae2ffadfd70' -smp '4,sockets=2,co
res=2,maxcpus=4' -nodefaults -boot
'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg'
-vnc unix:/va
r/run/qemu-server/100.vnc,password -cpu
kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 512 -device
'pci-bridge,id=pci.1,ch
assis_nr=1,bus=pci.0,addr=0x1e' -device
'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device
'vmgenid,guid=a77c9b96-ad92-44
34-ad4b-670c761716a8' -device
'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -readconfig
/usr/share/qemu-server/pve-usb.cfg -chardev
'spicevmc,id=usbredirchardev0,name=usbredir' -device
'usb-redir,chardev=usbredirchardev0,id=usbredirdev0,bus=ehci.0' -chardev
'spice
vmc,id=usbredirchardev1,name=usbredir' -device
'usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0' -chardev
'socket,id=se
rial0,path=/var/run/qemu-server/100.serial0,server,nowait' -device
'isa-serial,chardev=serial0' -device 'AC97,id=audiodev0,bus=pci.2,
addr=0xc' -audiodev 'spice,id=spice-backend0' -device
'qxl-vga,id=vga,bus=pci.0,addr=0x2' -chardev
'spiceport,id=foldershare,name=org
.spice-space.webdav.0' -device
'virtserialport,chardev=foldershare,name=org.spice-space.webdav.0' -spice
'tls-port=61000,addr=127.0.0
.1,tls-ciphers=HIGH,seamless-migration=on' -device
'virtio-serial,id=spice,bus=pci.0,addr=0x9' -chardev
'spicevmc,id=vdagent,name=vda
gent' -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0'
-iscsi 'initiator-name=iqn.1993-08.org.debian:01:e5dad703312'
-drive
'file=/ISOS/template/iso/en_windows_xp_professional_sp3_Nov_2013_Incl_SATA_Drivers.iso,if=none,id=drive-ide0,media=cdrom,aio=t
hreads' -device 'ide-cd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0' -drive
'file=/dev/pve/vm-100-disk-0,if=none,id=drive-virtio1,forma
t=raw,cache=none,aio=native,detect-zeroes=on' -device
'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,bootindex=100
' -netdev
'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vho
st=on' -device
'virtio-net-pci,mac=DA:0E:65:16:EE:E6,netdev=net0,bus=pci.0,addr=0x12,id=net0'
-rtc 'driftfix=slew,base=localtime' -ma
chine 'type=pc'' failed: exit code 1

This is the conf for the VM

audio0: device=AC97,driver=spice
balloon: 0
boot: c
bootdisk: virtio1
cores: 2
memory: 512
name: teste1
net0: virtio=DA:0E:65:16:EE:E6,bridge=vmbr0,firewall=1
numa: 0
ostype: wxp
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=40b94d33-bff8-44ad-8938-eae2ffadfd70
sockets: 2
spice_enhancements: foldersharing=1,videostreaming=all
usb0: spice
usb1: spice
vga: qxl
virtio1: local-lvm:vm-100-disk-0,size=7G
vmgenid: a77c9b96-ad92-4434-ad4b-670c761716a8

What can I do to fix this?

Thanks a lot

---
Gilberto Nunes Ferreira

(47) 3025-5907
(47) 99676-7530 - Whatsapp / Telegram

Skype: gilberto.nunes36





___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH qemu-server] cfg2cmd: fix serial-bus for spice foldersharing

2019-10-08 Thread Aaron Lauterer
Thanks to Gilberto Nunes for finding a bug where the VM would not start
with foldersharing enabled and the qemu agent option disabled [0].

The cause was that the device org.spice-space.webdav.0 would not find a
virtio-serial-bus in this situation.

Since we always create a virtio-serial-bus for the spice vdagent it
seems sensible to use that also for the foldersharing device by moving
it in front of the other spice devices.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-October/039441.html

Signed-off-by: Aaron Lauterer 
---
 PVE/QemuServer.pm | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 8376260..61d7d12 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4017,6 +4017,11 @@ sub config_to_command {
my $pfamily = PVE::Tools::get_host_address_family($nodename);
my @nodeaddrs = PVE::Tools::getaddrinfo_all('localhost', family => 
$pfamily);
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";
+   push @$devices, '-device', 
"virtserialport,chardev=vdagent,name=com.redhat.spice.0";
+
my $localhost = PVE::Network::addr_to_ip($nodeaddrs[0]->{addr});
$spice_port = PVE::Tools::next_spice_port($pfamily, $localhost);
 
@@ -4029,11 +4034,6 @@ sub config_to_command {
my $spice_opts = 
"tls-port=${spice_port},addr=$localhost,tls-ciphers=HIGH,seamless-migration=on";
$spice_opts .= ",streaming-video=$spice_enhancement->{videostreaming}" 
if $spice_enhancement->{videostreaming};
push @$devices, '-spice', "$spice_opts";
-
-   push @$devices, '-device', "virtio-serial,id=spice$pciaddr";
-   push @$devices, '-chardev', "spicevmc,id=vdagent,name=vdagent";
-   push @$devices, '-device', 
"virtserialport,chardev=vdagent,name=com.redhat.spice.0";
-
 }
 
 # enable balloon by default, unless explicitly disabled
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] Spice foldersharing

2019-10-09 Thread Aaron Lauterer
The spice-webdavd daemon is part of the Spice project, not something we 
develop here at Proxmox.


Also as Thomas already pointed out, Windows XP is very old and end of 
life -> It's very much possible that it just doesn't work on Windows XP. 
The error you are getting sounds like it :/


I never tested it on a Windows XP guest and only used the downloads from 
the official website https://www.spice-space.org.


regards,
Aaron

On 10/9/19 4:28 PM, Gilberto Nunes wrote:

When try to run it manually, I get this message

C:\>"C:\Program Files\SPICE webdavd\bin\spice-webdavd.exe" -p 9843

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


I don't know if this a problem related to proxmox, spice-webdavd or what?!?!

---
Gilberto Nunes Ferreira

(47) 3025-5907
(47) 99676-7530 - Whatsapp / Telegram

Skype: gilberto.nunes36





Em ter, 8 de out de 2019 às 09:21, Gilberto Nunes <
gilberto.nune...@gmail.com> escreveu:


I have tried it this too:

https://elmarco.fedorapeople.org/spice-webdavd-x86-0.4.16-9457.msi

But it's seems that no longer available!


---
Gilberto Nunes Ferreira

(47) 3025-5907
(47) 99676-7530 - Whatsapp / Telegram

Skype: gilberto.nunes36





Em ter, 8 de out de 2019 às 09:16, Gilberto Nunes <
gilberto.nune...@gmail.com> escreveu:


Hi
Thanks for reply me Lamprecht
I have download the spice webdav from here:

https://www.spice-space.org/download/windows/spice-webdavd/

Where can I get new version of it?

Thanks again
---
Gilberto Nunes Ferreira

(47) 3025-5907
(47) 99676-7530 - Whatsapp / Telegram

Skype: gilberto.nunes36





Em ter, 8 de out de 2019 às 03:09, Thomas Lamprecht <
t.lampre...@proxmox.com> escreveu:


On 10/7/19 9:12 PM, Gilberto Nunes wrote:

I get this error

(spice-webdavd.exe:2080): phodav-←[1;31mERROR←[0m **: The service

process

could
not connect to the service controller.

Using windows xp... Already install spice-webdav and there's agent

enabled

in VM.


which version did you installed? There seems to be issues with older
one[0].

[0]:
https://lists.freedesktop.org/archives/spice-devel/2015-February/018906.html



I have enable spice foldersharing with

qm set 100 -spice_enhancements foldersharing=1,videostreaming=all

But get above error message

Any help? Thanks



I mean Windows XP is quite outdated and EOL, so maybe noone from the
spice
webdav people tests it anymore there?

cheers,
Thomas




___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH manager] ui: vm opts: clarify label for QGA

2019-10-10 Thread Aaron Lauterer



On 10/10/19 12:21 PM, Dominik Csapak wrote:

On 10/10/19 11:54 AM, Thomas Lamprecht wrote:

To make it more clear that PVE does not somehow magically injects a
QHA into the VM, but that this can be set if one has installed the
QGA in the VM themself.


good idea to make it clearer, but i think the new text is also not 
ideal, since it does not describe what it does.


maybe something like:

'Enable/Add Qemu Agent Hardware'
or
'Query Qemu Agent' ?

(altough i am not a big fan of those two either...)


What about:

'Add support for Qemu Agent in VM'
'VM uses Qemu Agent'

Though I do think Thomas' version is not bad.

Additionally we could add a hint if enabled saying something like this:
'Make sure the Qemu Agent is installed in the VM'

This would make it quite clear what is needed and enable us to keep a 
shorter checkbox label.






Signed-off-by: Thomas Lamprecht 
---
  www/manager6/form/AgentFeatureSelector.js | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/www/manager6/form/AgentFeatureSelector.js 
b/www/manager6/form/AgentFeatureSelector.js

index d50b709e..af14d1fe 100644
--- a/www/manager6/form/AgentFeatureSelector.js
+++ b/www/manager6/form/AgentFeatureSelector.js
@@ -7,7 +7,7 @@ Ext.define('PVE.form.AgentFeatureSelector', {
  items: [
  {
  xtype: 'proxmoxcheckbox',
-    boxLabel: gettext('Qemu Agent'),
+    boxLabel: gettext('VM has Qemu Agent installed'),
  name: 'enabled',
  reference: 'enabled',
  uncheckedValue: 0,
@@ -29,8 +29,7 @@ Ext.define('PVE.form.AgentFeatureSelector', {
  },
  setValues: function(values) {
-    var agent = values.agent || '';
-    var res = PVE.Parser.parsePropertyString(agent, 'enabled');
+    let res = PVE.Parser.parsePropertyString(values.agent, 'enabled');
  this.callParent([res]);
  }
  });




___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH pve-docs] Add section for ZFS Special Device

2019-11-05 Thread Aaron Lauterer

Nicely written.

I have some suggestions inline:
* splitting long sentences
* adding more info as to what is valid for the size in 
special_small_blocks (taken from the zfs man page)

* rewrote the last paragraph a bit

On 10/22/19 12:33 PM, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner 
> ---
>   local-zfs.adoc | 44 
>   1 file changed, 44 insertions(+)
>
> diff --git a/local-zfs.adoc b/local-zfs.adoc
> index b4fb7db..378cbee 100644
> --- a/local-zfs.adoc
> +++ b/local-zfs.adoc
> @@ -431,3 +431,47 @@ See the `encryptionroot`, `encryption`, 
`keylocation`, `keyformat` and

>   `keystatus` properties, the `zfs load-key`, `zfs unload-key` and `zfs
>   change-key` commands and the `Encryption` section from `man zfs` 
for more

>   details and advanced usage.
> +
> +
> +ZFS Special Device
> +~~
> +
> +Since version 0.8.0 ZFS allows adding a `special` device to a pool, 
which is
> +then used to store metadata, deduplication tables and optionally 
small file

> +blocks.

Since version 0.8. ZFS supports `special` devices. A `special` device in 
a pool is used to store metadata, deduplication tables, and optionally 
small file blocks.


> +
> +IMPORTANT: The redundancy of the `special` device should match the 
one of the
> +pool, since the `special` device is a point of failure for the whole 
pool.

> +
> +WARNING: Adding a `special` device to a pool cannot be undone!
> +
> +.Create a pool with `special` device and RAID-1:
> +
> + zpool create -f -o ashift=12  mirror   
special mirror  

> +
> +.Add a `special` device to an existing pool with RAID-1:
> +
> + zpool add  special mirror  
> +
> +For ZFS datasets where the `special_small_blocks` property is set to 
a non-zero
> +value, the `special` device is used to store small file blocks up to 
that size.
> +Setting the `special_small_blocks` property on the pool will change 
the default
> +value of that property for all child ZFS datasets (for example all 
containers

> +in the pool will opt in for small file blocks).
> +
> +.Opt in for small file blocks pool-wide:
> +
> + zfs set special_small_blocks= 
> +
> +.Opt in for small file blocks for a single dataset:
> +
> + zfs set special_small_blocks= /
> +
> +.Opt out from small file blocks for a single dataset:
> +
> + zfs set special_small_blocks=0 /

INFO: The value for  can be `0` to disable storing small file 
blocks on the special device or a power of two in the range between 512B 
to 128K.


> +
> +Using a `special` device makes sense for pools with lots and lots of 
changing
> +metadata respectively small files. If you also have other, larger 
I/O on the
> +same pool then the benefit from using a `special` device might be 
even more
> +noticeable. It is recommended to use SSDs or NVMes for the `special` 
device.

>

A `special` device can improve the speed of small I/O operations if the 
pool consists of slow spinning hard disks. Enabling 
`special_small_blocks` can further increase the performance if a lot of 
small files are used. Use fast (NVME) SSDs  for the `special` device.


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH docs 02/11] pveceph: add section - Destroying Ceph OSDs

2019-11-05 Thread Aaron Lauterer

Some suggestions inline.

On 11/4/19 2:52 PM, Alwin Antreich wrote:

Signed-off-by: Alwin Antreich 
---
  pveceph.adoc   |  31 +
  images/screenshot/gui-ceph-osd-destroy.png | Bin 0 -> 146184 bytes
  2 files changed, 31 insertions(+)
  create mode 100644 images/screenshot/gui-ceph-osd-destroy.png

diff --git a/pveceph.adoc b/pveceph.adoc
index cfb86a8..d9c17c7 100644
--- a/pveceph.adoc
+++ b/pveceph.adoc
@@ -358,6 +358,37 @@ Starting with Ceph Nautilus, {pve} does not support 
creating such OSDs with
  ceph-volume lvm create --filestore --data /dev/sd[X] --journal /dev/sd[Y]
  
  
+Destroying Ceph OSDs

+
+
+[thumbnail="screenshot/gui-ceph-osd-destroy.png"]
+
+To remove an OSD on the GUI, go to a PVE host under **Ceph -> OSD** and select
+the OSD you want to destroy. Then click on the **OUT** button and once the OSD
+is out, on the **STOP** button. After the OSD is out & down, you can select
+**Destroy** from the More drop-down menu.


To remove an OSD via the GUI first select the {PVE} node in the tree 
view. Select the **Ceph -> OSD** panel and select the OSD to destroy. 
Next click the **OUT** button. Once the OSD's status changed from `in` 
to `out` click the **STOP** button. As soon as the status changed from 
up to down select **Destroy** from the `More` drop-down menu.



+
+On the CLI issue the commands below to destroy a running OSD.


To remove an OSD via the CLI run the following commands.


+
+The first command tells Ceph to not include the OSD in data distribution
+anymore. The second stops the OSD service. Up to this point no data is lost and
+if the wrong OSD was specified, it can be reverted.


# I would move this to the beginning of the chapter. Explaining the 
involved steps like setting the OSD to out, then down  / systemctl stop 
and then destroying it because that information is relevant for both 
variants (GUI/CLI).



+
+[source,bash]
+
+ceph osd out 
+systemctl stop ceph-osd@.service
+
+
+The following command destroys the OSD. Specify the '-cleanup' option to
+additionally destroy the partition table.
+[source,bash]
+
+pveceph osd destroy 
+
+WARNING: The above command will destroy data on the disk!
+
+


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH docs 03/11] pveceph: add section - Destroying Ceph Monitor

2019-11-05 Thread Aaron Lauterer




On 11/4/19 2:52 PM, Alwin Antreich wrote:

Signed-off-by: Alwin Antreich 
---
  pveceph.adoc  |  19 ++
  .../screenshot/gui-ceph-monitor-destroy.png   | Bin 0 -> 154084 bytes
  2 files changed, 19 insertions(+)
  create mode 100644 images/screenshot/gui-ceph-monitor-destroy.png

diff --git a/pveceph.adoc b/pveceph.adoc
index d9c17c7..caba1fe 100644
--- a/pveceph.adoc
+++ b/pveceph.adoc
@@ -260,6 +260,25 @@ This will also install the needed Ceph Manager 
('ceph-mgr') by default. If you
  do not want to install a manager, specify the '-exclude-manager' option.
  
  
+Destroying Ceph Monitor

+--
+
+[thumbnail="screenshot/gui-ceph-monitor-destroy.png"]
+
+To remove a Ceph Monitor via GUI, go to a PVE host under **Ceph -> Monitor**
+and select the MON and hit **Destroy**.


To remove a Ceph Monitor via the GUI first select a node in the tree 
view and go to the **Ceph -> Monitor** panel. Select the MON and click 
the **Destroy** button.



+
+On the command line, connect to the node where the MON is running and execute
+the below command.


To remove a Ceph Monitor via the CLI first connect to the node on which 
the MON is running. Then execute the following command:

+
+[source,bash]
+
+pveceph mon destroy
+
+
+NOTE: At least three Monitors are needed for quorum.
+
+


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH docs 02/11] pveceph: add section - Destroying Ceph OSDs

2019-11-05 Thread Aaron Lauterer




On 11/5/19 10:40 AM, Aaron Lauterer wrote:


To remove an OSD via the GUI first select the {PVE} node in the tree 
view. Select the **Ceph -> OSD** panel and select the OSD to destroy. 
Next click the **OUT** button. Once the OSD's status changed from `in` 
to `out` click the **STOP** button. As soon as the status changed from 
up to down select **Destroy** from the `More` drop-down menu.




To remove an OSD via the GUI first select a node in the tree view and go 
to the **Ceph -> OSD** panel. Select the OSD to destroy.


# Sounds better this way.

___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH docs 05/11] pveceph: add section - Destroying Ceph Manager

2019-11-05 Thread Aaron Lauterer




On 11/4/19 2:52 PM, Alwin Antreich wrote:

Signed-off-by: Alwin Antreich 
---
  pveceph.adoc  |  20 ++
  .../screenshot/gui-ceph-manager-destroy.png   | Bin 0 -> 153596 bytes
  2 files changed, 20 insertions(+)
  create mode 100644 images/screenshot/gui-ceph-manager-destroy.png

diff --git a/pveceph.adoc b/pveceph.adoc
index 2d0d2a9..a1cdf85 100644
--- a/pveceph.adoc
+++ b/pveceph.adoc
@@ -300,6 +300,26 @@ pveceph mgr create
  
  
  
+Destroying Ceph Manager

+--
+
+[thumbnail="screenshot/gui-ceph-manager-destroy.png"]
+
+To remove a Ceph Manager via GUI, go to a PVE host under **Ceph -> Monitor**
+and select the Manager and hit **Destroy**.


To remove a Ceph Manager via the GUI first select a node in the tree 
view and go to the **Ceph -> Monitor** panel. Select the Manager and 
click the **Destroy** button.



+
+On the command line, connect to the node where the Manager is running and
+execute the below command.


To remove a Ceph Monitor via the CLI first connect to the node on which 
the Manager is running. Then execute the following command:



+
+[source,bash]
+
+pveceph mgr destroy
+
+
+NOTE: A Ceph cluster can function without a Manager, but certain functions like
+the cluster status or usage require a running Manager.
+
+


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH docs 06/11] pveceph: add section - Destroying Ceph Pools

2019-11-05 Thread Aaron Lauterer




On 11/4/19 2:52 PM, Alwin Antreich wrote:

Signed-off-by: Alwin Antreich 
---
  pveceph.adoc |  21 +++
  images/screenshot/gui-ceph-pools-destroy.png | Bin 0 -> 141532 bytes
  2 files changed, 21 insertions(+)
  create mode 100644 images/screenshot/gui-ceph-pools-destroy.png

diff --git a/pveceph.adoc b/pveceph.adoc
index a1cdf85..a4f2e4e 100644
--- a/pveceph.adoc
+++ b/pveceph.adoc
@@ -469,6 +469,27 @@ operation footnote:[Ceph pool operation
  http://docs.ceph.com/docs/luminous/rados/operations/pools/]
  manual.
  
+

+Destroying Ceph Pools
+-
+
+[thumbnail="screenshot/gui-ceph-pools-destroy.png"]
+To destroy a pool on the GUI, go to a PVE host under **Ceph -> Pools** and
+select the pool to destroy. Then click on the **Destroy** button and enter the
+pool name as confirmation to delete the pool.
To destroy a pool via the GUI select a node in the tree view and go to 
the **Ceph -> Pools** panel. Select the pool to destroy and click the 
**Destroy** button. To confirm the destruction of the pool you need to 
enter the pool name.



+
+To destroy a pool on the command line run the following. Specify the
+'-remove_storages' to also remove the associated storage.

.. run the following command.


+
+[source,bash]
+
+pveceph pool destroy 
+
+
+NOTE: Deleting the data of a pool is a background task and can take some time.
+You will notice that data usage in the cluster is decreasing.


You will notice that the data usage in the cluster is decreasing.

+
+


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH docs 08/11] pveceph: Reorganize TOC for new sections

2019-11-05 Thread Aaron Lauterer
In general wouldn't it be better to change the headlines to active 
voice? Create Monitors instead of Creating Monitors?


More suggestions inline.

On 11/4/19 2:52 PM, Alwin Antreich wrote:

Put the previous added sections into subsection for a better outline of
the TOC.

With the rearrangement of the first level titles to second level, the
general descriptions of a service needs to move into the new first level
titles. And add/corrects some statements of those descriptions.

Signed-off-by: Alwin Antreich 
---
  pveceph.adoc | 79 ++--
  1 file changed, 45 insertions(+), 34 deletions(-)

diff --git a/pveceph.adoc b/pveceph.adoc
index 9806401..2972a68 100644
--- a/pveceph.adoc
+++ b/pveceph.adoc
@@ -234,11 +234,8 @@ configuration file.
  
  
  [[pve_ceph_monitors]]

-Creating Ceph Monitors
---
-
-[thumbnail="screenshot/gui-ceph-monitor.png"]
-
+Ceph Monitor
+---
  The Ceph Monitor (MON)
  footnote:[Ceph Monitor http://docs.ceph.com/docs/luminous/start/intro/]
  maintains a master copy of the cluster map. For high availability you need to
@@ -247,6 +244,12 @@ used the installation wizard. You won't need more than 3 
monitors as long
  as your cluster is small to midsize, only really large clusters will
  need more than that.
  
+

+Creating Monitors
+~
+
+[thumbnail="screenshot/gui-ceph-monitor.png"]
+
  On each node where you want to place a monitor (three monitors are 
recommended),
  create it by using the 'Ceph -> Monitor' tab in the GUI or run.
  
@@ -256,12 +259,9 @@ create it by using the 'Ceph -> Monitor' tab in the GUI or run.

  pveceph mon create
  
  
-This will also install the needed Ceph Manager ('ceph-mgr') by default. If you

-do not want to install a manager, specify the '-exclude-manager' option.
-
  
-Destroying Ceph Monitor

---
+Destroying Monitors
+~~~
  
  [thumbnail="screenshot/gui-ceph-monitor-destroy.png"]
  
@@ -280,16 +280,19 @@ NOTE: At least three Monitors are needed for quorum.
  
  
  [[pve_ceph_manager]]

-Creating Ceph Manager
---
+Ceph Manager
+
+The Manager daemon runs alongside the monitors, providing an interface for
+monitoring the cluster. Since the Ceph luminous release at least one ceph-mgr
+footnote:[Ceph Manager http://docs.ceph.com/docs/luminous/mgr/] daemon is
+required.


The Manager daemon runs alongside the monitors. It provides an interface 
to monitor the cluster. ...



+
+Creating Manager
+
  
  [thumbnail="screenshot/gui-ceph-manager.png"]
  
-The Manager daemon runs alongside the monitors, providing an interface for

-monitoring the cluster. Since the Ceph luminous release the
-ceph-mgr footnote:[Ceph Manager http://docs.ceph.com/docs/luminous/mgr/] daemon
-is required. During monitor installation the ceph manager will be installed as
-well.
+You can install multiple Manager, but at any time only one Manager is active.


Multiple Managers can be installed, but at any time only one Manager is 
active.


  
  [source,bash]

  
@@ -300,8 +303,8 @@ NOTE: It is recommended to install the Ceph Manager on the 
monitor nodes. For
  high availability install more then one manager.
  
  
-Destroying Ceph Manager

---
+Destroying Manager
+~~
  
  [thumbnail="screenshot/gui-ceph-manager-destroy.png"]
  
@@ -321,8 +324,15 @@ the cluster status or usage require a running Manager.
  
  
  [[pve_ceph_osds]]

-Creating Ceph OSDs
---
+Ceph OSDs
+-
+Ceph **O**bject **S**torage **D**aemons are storing objects for Ceph over the
+network. In a Ceph cluster, you will usually have one OSD per physical disk.


One OSD per physical disk is the general recommendation.
# or
It is recommended to use one OSD per physical disk.

# not too sure though which sounds better. having multiple OSDs on one 
physical disk is a bad idea in most situations AFAIU right?




+
+NOTE: By default an object is 4 MiB in size.
+
+Creating OSDs
+~
  
  [thumbnail="screenshot/gui-ceph-osd-status.png"]
  
@@ -346,8 +356,7 @@ ceph-volume lvm zap /dev/sd[X] --destroy
  
  WARNING: The above command will destroy data on the disk!
  
-Ceph Bluestore

-~~
+.Ceph Bluestore
  
  Starting with the Ceph Kraken release, a new Ceph OSD storage type was

  introduced, the so called Bluestore
@@ -386,8 +395,7 @@ internal journal or write-ahead log. It is recommended to 
use a fast SSD or
  NVRAM for better performance.
  
  
-Ceph Filestore

-~~
+.Ceph Filestore
  
  Before Ceph Luminous, Filestore was used as default storage type for Ceph OSDs.

  Starting with Ceph Nautilus, {pve} does not support creating such OSDs with
@@ -399,8 +407,8 @@ Starting with Ceph Nautilus, {pve} does not support 
creating such OSDs with
  ceph-volume lvm create --filestore --data /dev/sd[X] --journal /dev/sd[Y]
  
  
-Destroying Ceph OSDs

-

Re: [pve-devel] [PATCH docs 10/11] Fix #1958: pveceph: add section Ceph maintenance

2019-11-05 Thread Aaron Lauterer



On 11/4/19 2:52 PM, Alwin Antreich wrote:

Signed-off-by: Alwin Antreich 
---
  pveceph.adoc | 54 
  1 file changed, 54 insertions(+)

diff --git a/pveceph.adoc b/pveceph.adoc
index 087c4d0..127e3bb 100644
--- a/pveceph.adoc
+++ b/pveceph.adoc
@@ -331,6 +331,7 @@ network. In a Ceph cluster, you will usually have one OSD 
per physical disk.
  
  NOTE: By default an object is 4 MiB in size.
  
+[[pve_ceph_osd_create]]

  Creating OSDs
  ~
  
@@ -407,6 +408,7 @@ Starting with Ceph Nautilus, {pve} does not support creating such OSDs with

  ceph-volume lvm create --filestore --data /dev/sd[X] --journal /dev/sd[Y]
  
  
+[[pve_ceph_osd_destroy]]

  Destroying OSDs
  ~~~
  
@@ -724,6 +726,58 @@ pveceph pool destroy NAME

  
  
  
+Ceph maintenance

+
+Replace OSDs
+
+One of the common maintenance tasks in Ceph is to replace a disk of an OSD. If

... the disk ...

+a disk already failed, you can go ahead and run through the steps in
+xref:pve_ceph_osd_destroy[Destroying OSDs]. As no data is accessible from the
+disk. Ceph will recreate those copies on the remaining OSDs if possible
... a disk is already in a failed state the data on it is not accessible 
anymore and you can go/run through the steps in 
xref:pve_ceph_osd_destroy[Destroying OSDs]. Ceph will recreate the 
missing copies on the remaining OSDs if possible.



+
+For replacing a still functioning disk. From the GUI run through the steps as
+shown in xref:pve_ceph_osd_destroy[Destroying OSDs]. The only addition is to
+wait till the cluster shows 'HEALTH_OK' before stopping the OSD to destroy it.


To replace a still functioning disk via the GUI go/run through the steps 
in xref:pve_ceph_osd_destroy[Destroying OSDs] with one addition: wait 
until the cluster shows 'HEALTH_OK' before stopping the OSD to destroy it.



+
+On the command line use the below commands.

... use the following commands:

+
+ceph osd out osd.
+
+
+You can check with the below command if the OSD can be already removed.

... with the command below if the OSD can be safely removed.
# or
... the following command if the OSD can be safely removed:

+
+ceph osd safe-to-destroy osd.
+
+
+Once the above check tells you that it is save to remove the OSD, you can
+continue with below commands.

... continue with the following commands:

+
+systemctl stop ceph-osd@.service
+pveceph osd destroy 
+
+
+Replace the old with the new disk and use the same procedure as described in
+xref:pve_ceph_osd_create[Creating OSDs].


Replace the old disk with the new one and use the same procedure...

+
+NOTE: With the default size/min_size (3/2) of a pool, recovery only starts when
+`size + 1` nodes are available.
+
+Run fstrim (discard)
+
+It is a good measure to run fstrim (discard) regularly on VMs or containers.
+This releases data blocks that the filesystem isn’t using anymore. It reduces
+data usage and the resource load.


... to run 'fstrim' (discard) ...

+
+Scrub & Deep Scrub
+~~
+Ceph insures data integrity by 'scrubbing' placement groups. Ceph check every

... Ceph checks every ...

+object in a PG for its health. There are two forms of Scrubbing, daily

# scrubbing lower case

+(metadata compare) and weekly. The latter reads the object and uses checksums

... The weekly scrub read the objects and uses checksums ...

+to ensure data integrity. If a running scrub interferes with business needs,
+you can adjust the time of execution of Scrub footnote:[Ceph scrubbing

.. adjust the time when scrubs are executed ...

+https://docs.ceph.com/docs/nautilus/rados/configuration/osd-config-ref/#scrubbing].
+
+
  Ceph monitoring and troubleshooting
  ---
  A good start is to continuosly monitor the ceph health from the start of



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH manager] ui: vm opts: add hint for spice foldersharing

2019-11-06 Thread Aaron Lauterer
Spice foldersharing needs the webdavd daemon installed inside the guest.
This patch adds a hint to remind the user to install it in the VM.

Signed-off-by: Aaron Lauterer 
---
 www/manager6/form/SpiceEnhancementSelector.js | 13 +
 1 file changed, 13 insertions(+)

diff --git a/www/manager6/form/SpiceEnhancementSelector.js 
b/www/manager6/form/SpiceEnhancementSelector.js
index 072a9022..d4091996 100644
--- a/www/manager6/form/SpiceEnhancementSelector.js
+++ b/www/manager6/form/SpiceEnhancementSelector.js
@@ -1,11 +1,15 @@
 Ext.define('PVE.form.SpiceEnhancementSelector', {
 extend: 'Proxmox.panel.InputPanel',
 alias: 'widget.pveSpiceEnhancementSelector',
+
+viewModel: {},
+
 items: [
{
xtype: 'proxmoxcheckbox',
itemId: 'foldersharing',
name: 'foldersharing',
+   reference: 'foldersharing',
fieldLabel: 'Folder Sharing',
uncheckedValue: 0,
},
@@ -27,6 +31,15 @@ Ext.define('PVE.form.SpiceEnhancementSelector', {
userCls: 'pmx-hint',
value: gettext('To use these features set the display to SPICE in 
the hardware settings of the VM.'),
hidden: true,
+   },
+   {
+   xtype: 'displayfield',
+   itemId: 'spicefolderhint',
+   userCls: 'pmx-hint',
+   value: gettext('Make sure the SPICE WebDav daemon is installed in 
the VM.'),
+   bind: {
+   hidden: '{!foldersharing.checked}',
+   }
}
 ],
 
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH docs] qm: spice foldersharing: Add experimental warning

2019-11-06 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---
 qm.adoc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qm.adoc b/qm.adoc
index 9ee4460..c0fe892 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -856,6 +856,8 @@ Select the folder to share and then enable the checkbox.
 
 NOTE: Folder sharing currently only works in the Linux version of Virt-Viewer.
 
+CAUTION: Experimental! This feature does not work reliably.
+
 Video Streaming
 ^^^
 
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH docs] qm: spice foldersharing: Add experimental warning

2019-11-06 Thread Aaron Lauterer

Hmm, What about:

Currently this feature does not work reliably.


On 11/6/19 3:29 PM, Alwin Antreich wrote:

On Wed, Nov 06, 2019 at 03:20:59PM +0100, Aaron Lauterer wrote:

Signed-off-by: Aaron Lauterer 
---
  qm.adoc | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/qm.adoc b/qm.adoc
index 9ee4460..c0fe892 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -856,6 +856,8 @@ Select the folder to share and then enable the checkbox.
  
  NOTE: Folder sharing currently only works in the Linux version of Virt-Viewer.
  
+CAUTION: Experimental! This feature does not work reliably.

Maybe use a s/reliably/reliably yet/ to inidicate that this might change
in the future?


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v2 docs] qm: spice foldersharing: Add experimental warning

2019-11-06 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer 
---

v1 -> v2: added Currently
 qm.adoc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qm.adoc b/qm.adoc
index 9ee4460..35d7d57 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -856,6 +856,8 @@ Select the folder to share and then enable the checkbox.
 
 NOTE: Folder sharing currently only works in the Linux version of Virt-Viewer.
 
+CAUTION: Experimental! Currently this feature does not work reliably.
+
 Video Streaming
 ^^^
 
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH qemu-server] api/migration: fix autocomplete for targetstorage

2019-11-18 Thread Aaron Lauterer
Show storages configured for the target node and not for the current one
because they can be different.

Duplicated the `complete_storage` sub and extended it to extract the
targetnode from the parameters to pass it into the storage_check_enabled
function.

Signed-off-by: Aaron Lauterer 
---
 PVE/API2/Qemu.pm  |  2 +-
 PVE/QemuServer.pm | 27 +++
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 8e162aa..3989633 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -3299,7 +3299,7 @@ __PACKAGE__->register_method({
 targetstorage => get_standard_option('pve-storage-id', {
description => "Default target storage.",
optional => 1,
-   completion => \&PVE::QemuServer::complete_storage,
+   completion => \&PVE::QemuServer::complete_migration_storage,
 }),
bwlimit => {
description => "Override I/O bandwidth limit (in KiB/s).",
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 54c8c88..5fc2495 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -7459,4 +7459,31 @@ sub complete_storage {
 return $res;
 }
 
+sub complete_migration_storage {
+my @parameters = @_;
+
+# Dumper outut for @parameters:
+# $VAR1 = 'migrate';
+# $VAR2 = 'targetstorage';
+# $VAR3 = '';
+# $VAR4 = [
+#  '',
+#  '',
+#  further optional parameters
+#];
+my $targetnode = $parameters[3][1];
+
+my $cfg = PVE::Storage::config();
+my $ids = $cfg->{ids};
+
+my $res = [];
+foreach my $sid (keys %$ids) {
+   next if !PVE::Storage::storage_check_enabled($cfg, $sid, $targetnode, 
1);
+   next if !$ids->{$sid}->{content}->{images};
+   push @$res, $sid;
+}
+
+return $res;
+}
+
 1;
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v2 qemu-server] api/migration: fix autocomplete for targetstorage

2019-11-18 Thread Aaron Lauterer
Show storages configured for the target node and not for the current one
because they can be different.

Duplicated the `complete_storage` sub and extended it to extract the
targetnode from the parameters to pass it into the storage_check_enabled
function.

Signed-off-by: Aaron Lauterer 
---
v1 -> v2: make parameters more readable @thx thomas for the hint

 PVE/API2/Qemu.pm  |  2 +-
 PVE/QemuServer.pm | 18 ++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 8e162aa..3989633 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -3299,7 +3299,7 @@ __PACKAGE__->register_method({
 targetstorage => get_standard_option('pve-storage-id', {
description => "Default target storage.",
optional => 1,
-   completion => \&PVE::QemuServer::complete_storage,
+   completion => \&PVE::QemuServer::complete_migration_storage,
 }),
bwlimit => {
description => "Override I/O bandwidth limit (in KiB/s).",
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 54c8c88..f1d9cfd 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -7459,4 +7459,22 @@ sub complete_storage {
 return $res;
 }
 
+sub complete_migration_storage {
+my ($cmd, $param, $current_value, $all_args) = @_;
+
+my $targetnode = @$all_args[1];
+
+my $cfg = PVE::Storage::config();
+my $ids = $cfg->{ids};
+
+my $res = [];
+foreach my $sid (keys %$ids) {
+   next if !PVE::Storage::storage_check_enabled($cfg, $sid, $targetnode, 
1);
+   next if !$ids->{$sid}->{content}->{images};
+   push @$res, $sid;
+}
+
+return $res;
+}
+
 1;
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH qemu-server] print_vga_device: fix qxl displays on Linux guests

2019-11-19 Thread Aaron Lauterer
with pve-qemu-4.0.1-3 or higher it was not possible in a spice remote
session to enable more displays on the fly in linux guests.

Adding the `max_outputs` parameter to the qxl device manually restores
the functionality.

Signed-off-by: Aaron Lauterer 
---
 PVE/QemuServer.pm| 10 +-
 test/cfg2cmd/spice-usb3.conf.cmd |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 11e7169..d05707d 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2184,9 +2184,17 @@ sub print_vga_device {
$type = 'virtio-gpu';
 }
 my $vgamem_mb = $vga->{memory};
+
+my $max_outputs = undef;
 if ($qxlnum) {
$type = $id ? 'qxl' : 'qxl-vga';
+
+   if ($conf->{ostype} =~ m/^l(?=\d)/) {
+   # set max outputs so linux can have up to 4 qxl displays with one 
device
+   $max_outputs = ",max_outputs=4";
+   }
 }
+
 die "no devicetype for $vga->{type}\n" if !$type;
 
 my $memory = "";
@@ -2218,7 +2226,7 @@ sub print_vga_device {
$pciaddr = print_pci_addr($vgaid, $bridges, $arch, $machine);
 }
 
-return "$type,id=${vgaid}${memory}${pciaddr}";
+return "$type,id=${vgaid}${memory}${max_outputs}${pciaddr}";
 }
 
 sub drive_is_cloudinit {
diff --git a/test/cfg2cmd/spice-usb3.conf.cmd b/test/cfg2cmd/spice-usb3.conf.cmd
index 627c077..d10ba9a 100644
--- a/test/cfg2cmd/spice-usb3.conf.cmd
+++ b/test/cfg2cmd/spice-usb3.conf.cmd
@@ -21,7 +21,7 @@
   -device 'nec-usb-xhci,id=xhci,bus=pci.1,addr=0x1b' \
   -chardev 'spicevmc,id=usbredirchardev1,name=usbredir' \
   -device 'usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=xhci.0' \
-  -device 'qxl-vga,id=vga,bus=pci.0,addr=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 'spicevmc,id=vdagent,name=vdagent' \
   -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0' \
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH qemu-server] print_vga_device: fix qxl displays on Linux guests

2019-11-19 Thread Aaron Lauterer




On 11/19/19 4:13 PM, Thomas Lamprecht wrote:

On 11/19/19 4:01 PM, Aaron Lauterer wrote:

with pve-qemu-4.0.1-3 or higher it was not possible in a spice remote
session to enable more displays on the fly in linux guests.

Adding the `max_outputs` parameter to the qxl device manually restores
the functionality.

Signed-off-by: Aaron Lauterer 
---
  PVE/QemuServer.pm| 10 +-
  test/cfg2cmd/spice-usb3.conf.cmd |  2 +-
  2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 11e7169..d05707d 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2184,9 +2184,17 @@ sub print_vga_device {
$type = 'virtio-gpu';
  }
  my $vgamem_mb = $vga->{memory};
+
+my $max_outputs = undef;


for windows guests I get:
Use of uninitialized value $max_outputs in concatenation (.) or string at 
../PVE/QemuServer.pm line 2229.
(I added a test for win10 + spice now)

do:
my $max_outputs = '';

instead.


duh... v2 is on the way :)

___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v2 qemu-server] print_vga_device: fix qxl displays on Linux guests

2019-11-19 Thread Aaron Lauterer
with pve-qemu-4.0.1-3 or higher it was not possible in a spice remote
session to enable more displays on the fly in linux guests.

Adding the `max_outputs` parameter to the qxl device manually restores
the functionality.

Signed-off-by: Aaron Lauterer 
---
v1 -> v2: change `my $max_outputs` from undef to empty string so it
behaves nicely in the return string if not needed

 PVE/QemuServer.pm| 10 +-
 test/cfg2cmd/spice-usb3.conf.cmd |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 11e7169..9c90655 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2184,9 +2184,17 @@ sub print_vga_device {
$type = 'virtio-gpu';
 }
 my $vgamem_mb = $vga->{memory};
+
+my $max_outputs = '';
 if ($qxlnum) {
$type = $id ? 'qxl' : 'qxl-vga';
+
+   if ($conf->{ostype} =~ m/^l(?=\d)/) {
+   # set max outputs so linux can have up to 4 qxl displays with one 
device
+   $max_outputs = ",max_outputs=4";
+   }
 }
+
 die "no devicetype for $vga->{type}\n" if !$type;
 
 my $memory = "";
@@ -2218,7 +2226,7 @@ sub print_vga_device {
$pciaddr = print_pci_addr($vgaid, $bridges, $arch, $machine);
 }
 
-return "$type,id=${vgaid}${memory}${pciaddr}";
+return "$type,id=${vgaid}${memory}${max_outputs}${pciaddr}";
 }
 
 sub drive_is_cloudinit {
diff --git a/test/cfg2cmd/spice-usb3.conf.cmd b/test/cfg2cmd/spice-usb3.conf.cmd
index 627c077..d10ba9a 100644
--- a/test/cfg2cmd/spice-usb3.conf.cmd
+++ b/test/cfg2cmd/spice-usb3.conf.cmd
@@ -21,7 +21,7 @@
   -device 'nec-usb-xhci,id=xhci,bus=pci.1,addr=0x1b' \
   -chardev 'spicevmc,id=usbredirchardev1,name=usbredir' \
   -device 'usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=xhci.0' \
-  -device 'qxl-vga,id=vga,bus=pci.0,addr=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 'spicevmc,id=vdagent,name=vdagent' \
   -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0' \
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH] Revision of the pvesr documentation

2019-11-22 Thread Aaron Lauterer

Some hints from my side inline.

Rephrasing some passages trying to make it easier to read and understand.

Did some sentence splitting an smaller corrections as well.

Please check if the rephrased sections are still correct from a 
technical POV.



On 11/15/19 9:51 AM, Wolfgang Link wrote:

Improvement of grammar and punctuation.
Clarify the HA limitations.
Remove future tense in some sentences.
It is not good to use it in technical/scientific papers.
Rewrite some sentences to improve understanding.
---
  pvesr.adoc | 108 ++---
  1 file changed, 54 insertions(+), 54 deletions(-)

diff --git a/pvesr.adoc b/pvesr.adoc
index 83ab268..7934a84 100644
--- a/pvesr.adoc
+++ b/pvesr.adoc
@@ -31,34 +31,34 @@ local storage and reduces migration time.
  It replicates guest volumes to another node so that all data is available
  without using shared storage. Replication uses snapshots to minimize traffic
  sent over the network. Therefore, new data is sent only incrementally after
-an initial full sync. In the case of a node failure, your guest data is
+the initial full sync. In the case of a node failure, your guest data is
  still available on the replicated node.
  
-The replication will be done automatically in configurable intervals.

-The minimum replication interval is one minute and the maximal interval is
+The replication is done automatically in configurable intervals.
+The minimum replication interval is one minute, and the maximal interval is
  once a week. The format used to specify those intervals is a subset of
  `systemd` calendar events, see
  xref:pvesr_schedule_time_format[Schedule Format] section:
  
-Every guest can be replicated to multiple target nodes, but a guest cannot

-get replicated twice to the same target node.
+The storage replication can replicate a guest to multiple target nodes,
+but a guest cannot get replicated twice to the same target node.


It is possible to replicate a guest to multiple target nodes, but not 
twice to the same target node.


  
  Each replications bandwidth can be limited, to avoid overloading a storage

  or server.
  
-Virtual guest with active replication cannot currently use online migration.

-Offline migration is supported in general. If you migrate to a node where
-the guests data is already replicated only the changes since the last
-synchronisation (so called `delta`) must be sent, this reduces the required
-time significantly. In this case the replication direction will also switch
-nodes automatically after the migration finished.
+Virtual guests with active replication cannot currently use online migration.
+The migration offline is supported in general. If you migrate to a node where
+the guest's data is already replicated only the changes since the last
+synchronization (so called `delta`) must be sent, this reduces the required
+time significantly. In this case, the replication direction has switched
+the nodes automatically after the migration finished.


Guests with replication enabled can currently only be migrated offline. 
Only changes since the last replication (so called `deltas`) need to be 
transferred if the guest is migrated to a node to which it already is 
replicated. This reduces the time needed significantly. The replication 
direction is switched automatically if you migrate a guest to the 
replication target node.


  
  For example: VM100 is currently on `nodeA` and gets replicated to `nodeB`.

  You migrate it to `nodeB`, so now it gets automatically replicated back from
  `nodeB` to `nodeA`.
  
  If you migrate to a node where the guest is not replicated, the whole disk

-data must send over. After the migration the replication job continues to
+data must send over. After the migration, the replication job continues to
  replicate this guest to the configured nodes.
  
  [IMPORTANT]

@@ -66,8 +66,8 @@ replicate this guest to the configured nodes.
  High-Availability is allowed in combination with storage replication, but it
  has the following implications:
  
-* redistributing services after a more preferred node comes online will lead

-  to errors.
+* consider the live migration is currently not yet supported,
+  a migration error occurs when a more preferred node goes online


* live migration of replicated guests if not yet supported
  - If a preferred node is configured the try to live migrate the guest 
to it, after it is back online, will fail.


  
  * recovery works, but there may be some data loss between the last synced

time and the time a node failed.
@@ -98,24 +98,25 @@ Such a calendar event uses the following format:
  [day(s)] [[start-time(s)][/repetition-time(s)]]
  
  
-This allows you to configure a set of days on which the job should run.

-You can also set one or more start times, it tells the replication scheduler
+This format allows you to configure a set of days on which the job should run.
+You can also set one or more start times. It tells th

[pve-devel] [PATCH v2 docs 01/10] Overhaul Getting Help

2019-11-25 Thread Aaron Lauterer
general overhaul of the documentation, improving phrasing, move open
source info

Signed-off-by: Aaron Lauterer 
---

v1 -> v2:

feedback from thomas[0]:
* moved open source hint to mailing list for devs
* added suggestions
* regarding spaces around dashes (--): our current technical writing
  style guide says to not use any

[0] https://pve.proxmox.com/pipermail/pve-devel/2019-September/038950.html
 getting-help.adoc | 38 --
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/getting-help.adoc b/getting-help.adoc
index 850d7a3..8e81483 100644
--- a/getting-help.adoc
+++ b/getting-help.adoc
@@ -16,23 +16,22 @@ documentation with user contributed content.
 Community Support Forum
 ~~~
 
-{pve} itself is fully open source, so we always encourage our users to
-discuss and share their knowledge using the {forum}. The forum is fully
-moderated by the Proxmox support team, and has a quite large user base
-around the whole world. Needless to say that such a large forum is a
+We always encourage our users to discuss and share their knowledge using the
+{forum}. The forum is moderated by the Proxmox support team. The large user 
base
+is spread out all over the world. Needless to say that such a large forum is a
 great place to get information.
 
 Mailing Lists
 ~
 
-This is a fast way to communicate via email with the Proxmox VE
-community
+This is a fast way to communicate with the {pve} community via email.
 
 * Mailing list for users:
   http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user[PVE User
   List]
 
-The primary communication channel for developers is:
+{pve} is fully open source and contributions are welcome! The primary
+communication channel for developers is the:
 
 * Mailing list for developer:
   http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel[PVE
@@ -42,19 +41,22 @@ The primary communication channel for developers is:
 Commercial Support
 ~~
 
-{proxmoxGmbh} also offers commercial 
-https://www.proxmox.com/en/proxmox-ve/pricing[{pve} Subscription Service
-Plans]. System Administrators with a standard subscription plan can access a 
-dedicated support portal with guaranteed response time, where {pve}
-developers help them should an issue appear.
-Please contact the mailto:off...@proxmox.com[Proxmox sales
-team] for more information or volume discounts.
+{proxmoxGmbh} also offers enterprise support available as
+https://www.proxmox.com/en/proxmox-ve/pricing[{pve} Subscription Service 
Plans].
+All users with a subscription get access to the {pve}
+<>, and--with a Basic, Standard
+or Premium subscription--also to the Proxmox Customer Portal. The customer
+portal provides help and support with guaranteed response times from the {pve}
+developers.
+
+For volume discounts, or more information in general, please contact
+mailto:off...@proxmox.com[off...@proxmox.com].
 
 
 Bug Tracker
 ~~~
 
-We also run a public bug tracker at
-https://bugzilla.proxmox.com. If you ever detect an issue, you can
-file a bug report there. This makes it easy to track its status, and
-you will get notified as soon as the problem is fixed.
+Proxmox runs a public bug tracker at https://bugzilla.proxmox.com. If an issue
+appears, file your report there. An issue can be a bug as well as a request for
+a new feature or enhancement. The bug tracker helps to keep track of the issue
+and will send a notification once it has been solved.
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v2 docs 00/10] Documenation overhaul chapt. 1.9 to 3.2

2019-11-25 Thread Aaron Lauterer
This is the first patch series aimed to overhaul our documentation. The
main goal is to make it easier to understand and more consistent.
Therefore the phrasing is changed in a lot of places, sometimes the
ordering of content as well. I tried to align the source to the 80
characters per line wherever possible.

The reason why this first patch series doesn't start at the very
beginning is because we are not yet happy with few things there.

v1[0] -> v2:

* incorporating suggestions received
* moved line length and white space fixes to separate patch

[0] https://pve.proxmox.com/pipermail/pve-devel/2019-September/038938.html

Aaron Lauterer (10):
  Overhaul Getting Help
  Overhaul How To Improve Docs
  Overhaul Translation
  Overhaul Installation
  Overhaul System Requirements
  Overhaul Install from USB flash drive
  Overhaul Sysadmin
  Overhaul Package Repositories
  OVerhaul System Software Updates
  Fix whitespace and line length

 getting-help.adoc|  47 +++---
 howto-improve-pve-docs.adoc  |  42 +++---
 pve-installation.adoc| 278 +--
 pve-package-repos.adoc   | 154 +--
 pve-system-requirements.adoc |  69 -
 pve-usbstick.adoc| 109 +++---
 sysadmin.adoc|  40 ++---
 system-software-updates.adoc |  25 ++--
 translation.adoc |  37 ++---
 9 files changed, 390 insertions(+), 411 deletions(-)

-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v2 docs 02/10] Overhaul How To Improve Docs

2019-11-25 Thread Aaron Lauterer
general overhauling, improve phrasing

Signed-off-by: Aaron Lauterer 
---
 howto-improve-pve-docs.adoc | 38 +
 1 file changed, 17 insertions(+), 21 deletions(-)

diff --git a/howto-improve-pve-docs.adoc b/howto-improve-pve-docs.adoc
index c0d277e..d96bb03 100644
--- a/howto-improve-pve-docs.adoc
+++ b/howto-improve-pve-docs.adoc
@@ -5,31 +5,27 @@ ifdef::wiki[]
 :pve-toplevel:
 endif::wiki[]
 
-Depending on which issue you want to improve, you can use a variety of
-communication mediums to reach the developers.
+Contributions and improvements to the {pve} documentation are always welcome.
+There are several ways to contribute.
 
-If you notice an error in the current documentation, use the
-http://bugzilla.proxmox.com[Proxmox bug tracker] and propose an
-alternate text/wording.
+If you find errors or other room for improvement in this documentation, please
+file a bug at the https://bugzilla.proxmox.com/[Proxmox bug tracker] to propose
+a correction.
 
-If you want to propose new content, it depends on what you want to
-document:
+If you want to propose new content, choose one of the following options:
 
-* if the content is specific to your setup, a wiki article is the best
-option. For instance if you want to document specific options for guest
-systems, like which combination of Qemu drivers work best with a less popular
-OS, this is a perfect fit for a wiki article.
+* The wiki: For specific setups, how-to guides, or tutorials the wiki   is the
+right option to contribute.
 
-* if you think the content is generic enough to be of interest for all users,
-then you should try to get it into the reference documentation. The reference
-documentation is written in the easy to use 'asciidoc' document format.
-Editing the official documentation requires to clone the git repository at
-`git://git.proxmox.com/git/pve-docs.git` and then follow the
-https://git.proxmox.com/?p=pve-docs.git;a=blob_plain;f=README.adoc;hb=HEAD[README.adoc]
 document.
-
-Improving the documentation is just as easy as editing a Wikipedia
-article and is an interesting foray in the development of a large
-opensource project.
+* The reference documentation: For general content that will be   helpful to 
all
+  users please propose your contribution for the   reference documentation. 
This
+  includes all information about how to install, configure, use, and
+  troubleshoot {pve} features. The reference documentation is written in the
+  https://en.wikipedia.org/wiki/AsciiDoc[asciidoc format]. To edit the
+  documentation you need to clone the git repository at
+  `git://git.proxmox.com/git/pve-docs.git`; then follow the
+  
https://git.proxmox.com/?p=pve-docs.git;a=blob_plain;f=README.adoc;hb=HEAD[README.adoc]
+  document.
 
 NOTE: If you are interested in working on the {pve} codebase, the
 {webwiki-url}Developer_Documentation[Developer Documentation] wiki
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH v2 docs 03/10] Overhaul Translation

2019-11-25 Thread Aaron Lauterer
improve phrasing

Signed-off-by: Aaron Lauterer 
---

v1 -> v2:
applied suggestion from oguz [0]

[0] https://pve.proxmox.com/pipermail/pve-devel/2019-September/038952.html
 translation.adoc | 37 +++--
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/translation.adoc b/translation.adoc
index ff99296..cf627f1 100644
--- a/translation.adoc
+++ b/translation.adoc
@@ -6,24 +6,25 @@ ifdef::wiki[]
 endif::wiki[]
 
 
-A lot of users speak a language other than English and we depend on 
contributions
-to make {pve} available to users all over the world.
-We are always happy to welcome new localizers and invite you to help shape
-{pve}.
+The {pve} user interface is in English by default. Thanks to contributions by
+the community, translations to other languages are available. We welcome help 
to
+add new languages, translate the newest features, and improve incomplete or
+inconsistent translations.
 
-Our language files are available as 
https://git.proxmox.com/?p=proxmox-i18n.git[git repository].
-If you are familiar with git we would be glad to see your contribution 
according
-to our {webwiki-url}Developer_Documentation[Developer Documentation].
+The language files are available as a
+https://git.proxmox.com/?p=proxmox-i18n.git[git repository]. If you are 
familiar
+with git, please contribute according to our
+{webwiki-url}Developer_Documentation[Developer Documentation].
 
-Nonetheless, translating does not require special technical skills.
-You can get the language files without setting up a development environment
-https://git.proxmox.com/?p=proxmox-i18n.git;a=tree[here].
-Right click on the "raw" link of your language and choose "Save Link As...".
-Do not hesitate to send your translation directly to office(at)proxmox.com with
-your signed 
{webwiki-url}Developer_Documentation#Software_License_and_Copyright[contributor 
license agreement].
+Even if you are not familiar with git, you can help with translating {pve}.
+Download the language files
+https://git.proxmox.com/?p=proxmox-i18n.git;a=tree[here]. Then choose the
+language you want to improve. Right click on the "raw" link of this language
+file, and select 'Save Link As…​'. Make your changes to the file, and then
+send your final translation directly to office(at)proxmox.com together with a
+signed
+{webwiki-url}Developer_Documentation#Software_License_and_Copyright[contributor
 license agreement].
 
-We use https://www.gnu.org/software/gettext/[gettext] to translate {pve}.
-As a result, the actual translation task is to write a translation of the
-`msgid` into the `msgstr` below it.
-Tools like https://poedit.net/[Poedit] make this process more convenient,
-especially for contributors who are not programmers.
+We use https://www.gnu.org/software/gettext/[gettext] for the management of the
+translation files. Tools like https://poedit.net/[Poedit] offer a nice user
+interface to edit the translation files.
-- 
2.20.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  1   2   3   4   >