[pve-devel] [RFC pve-storage] allow subvolume selection in ZPool storage
--- PVE/Storage.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 23780d0..9a313b0 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -986,17 +986,17 @@ sub scan_nfs { sub scan_zfs { -my $cmd = ['zpool', 'list', '-H', '-o', 'name,size,free']; +my $cmd = ['zfs', 'list', '-t', 'filesystem', '-H', '-o', 'name,avail,used']; my $res = []; run_command($cmd, outfunc = sub { my $line = shift; if ($line =~m/^(\S+)\s+(\S+)\s+(\S+)$/) { - my ($pool, $size_str, $free_str) = ($1, $2, $3); + my ($pool, $size_str, $used_str) = ($1, $2, $3); my $size = PVE::Storage::ZFSPoolPlugin::zfs_parse_size($size_str); - my $free = PVE::Storage::ZFSPoolPlugin::zfs_parse_size($free_str); - push @$res, { pool = $pool, size = $size, free = $free }; + my $used = PVE::Storage::ZFSPoolPlugin::zfs_parse_size($used_str); + push @$res, { pool = $pool, size = $size, free = $size-$used }; } }); -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] fix 'uninitialized value in concat' due to unnamed VM
This is an minor fix which let's you start the spice console on an unnamed VM without getting the 'Use of uninitialized value in concatenation' error. Also changes the trailing comma from the $conf definition lineto an semicolon. Signed-off-by: Thomas Lamprecht t.lampre...@proxmox.com --- PVE/API2/Qemu.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 0dd413b..4a0fd20 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1397,7 +1397,8 @@ __PACKAGE__-register_method({ my $proxy = $param-{proxy}; my $conf = PVE::QemuServer::load_config($vmid, $node); - my $title = VM $vmid - $conf-{'name'}, + my $title = VM $vmid - ; + $title .= $conf-{'name'} if $conf-{name}; my $port = PVE::QemuServer::spice_port($vmid); -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH v2 qemu-server] fix 'uninitialized value in concat' due to unnamed VM
This is an minor fix which let's you start the spice console on an unnamed VM without getting the 'Use of uninitialized value in concatenation' error. Also changes the trailing comma from the $conf definition lineto an semicolon. Signed-off-by: Thomas Lamprecht t.lampre...@proxmox.com --- Changes since v1: * add spaces and hyphen when a VM name is defined only PVE/API2/Qemu.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 0dd413b..b340eae 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1397,7 +1397,8 @@ __PACKAGE__-register_method({ my $proxy = $param-{proxy}; my $conf = PVE::QemuServer::load_config($vmid, $node); - my $title = VM $vmid - $conf-{'name'}, + my $title = VM $vmid; + $title .= - . $conf-{name} if $conf-{name}; my $port = PVE::QemuServer::spice_port($vmid); -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] run spiceterm and return spiceproxy config only if CT is running
This mirrors the behavior of qemu VMs, if the container is not running, return an error when trying to launch the spiceproxy API call. Signed-off-by: Thomas Lamprecht t.lampre...@proxmox.com --- src/PVE/API2/LXC.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 14b5d3d..35f2c24 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -734,6 +734,9 @@ __PACKAGE__-register_method ({ my $permissions = 'VM.Console'; my $conf = PVE::LXC::load_config($vmid); + + die CT $vmid not running\n if !PVE::LXC::check_running($vmid); + my $concmd = PVE::LXC::get_console_command($vmid, $conf); my $shcmd = ['/usr/bin/dtach', '-A', -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] ZFSPlugin snapshot question
On Thu, 27 Aug 2015 19:31:49 +0200 (CEST) Dietmar Maurer diet...@proxmox.com wrote: Do you have time to implement that? We would need it to implement snapshot backup for LXC containers. Yes, I will look in to this this weekend. Forgot to mention. Since snapshots by nature is read-only you have to set option wp=true to have iscsi properly advertise read-only to the mount util. I think Linux will make some internal optimization given it knows writes is not supported. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: The ultimate game show will be the one where somebody gets killed at the end. -- Chuck Barris, creator of The Gong Show pgp1rosdscLoX.pgp Description: OpenPGP digital signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] ZFSPlugin snapshot question
On Thu, 27 Aug 2015 17:46:45 +0200 (CEST) Dietmar Maurer diet...@proxmox.com wrote: But how can we implement this with the ZFSPlugin?`Any idea if/how it is possible to access a snapshotted device? There are two preconditions which must be fulfilled: 1) LUN must be pointing to the snapshot 2) A view must be created pointing to the LUN Removing the snapshot means doing it in reversed order. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: Does the name Pavlov ring a bell? pgpxcMYFt6y6R.pgp Description: OpenPGP digital signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] ZFSPlugin snapshot question
Hi all, the PVE::Storage::path method has the following signature: PVE::Storage::path($cfg, $volid, $snapname); As you can see, It has that $snapname parameter, and I tried to correctly implement this here: https://git.proxmox.com/?p=pve-storage.git;a=commitdiff;h=e67069eb58a2766ec31bb3932a203c71f51d9654 But how can we implement this with the ZFSPlugin?`Any idea if/how it is possible to access a snapshotted device? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH pve-manager] set size in the rootfs parameter on CT create
As the size parameter is now deprecated and was replaced with the new rootfs parameter, use that one when creating an container. So we don't get an 'parameter verification failed' error. Signed-off-by: Thomas Lamprecht t.lampre...@proxmox.com --- www/manager/lxc/CreateWizard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/manager/lxc/CreateWizard.js b/www/manager/lxc/CreateWizard.js index d037316..c0a30a3 100644 --- a/www/manager/lxc/CreateWizard.js +++ b/www/manager/lxc/CreateWizard.js @@ -148,7 +148,7 @@ Ext.define('PVE.lxc.CreateWizard', { storagesel, { xtype: 'numberfield', - name: 'size', + name: 'rootfs', minValue: 0.1, maxValue: 128*1024, decimalPrecision: 3, -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] fix: start kvm with os type other
this check is necessary, because we do not set ostype in qemu config when type is other --- PVE/QemuServer.pm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 7115007..53fbcc9 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2877,9 +2877,11 @@ sub config_to_command { push @$cpuFlags , '+lahf_lm' if $cpu eq 'kvm64'; -push @$cpuFlags , '+x2apic' if !$nokvm $conf-{ostype} ne 'solaris'; +if ($conf-{ostype}) { + push @$cpuFlags , '+x2apic' if !$nokvm $conf-{ostype} ne 'solaris'; -push @$cpuFlags , '-x2apic' if $conf-{ostype} eq 'solaris'; + push @$cpuFlags , '-x2apic' if $conf-{ostype} eq 'solaris'; +} push @$cpuFlags, '+sep' if $cpu eq 'kvm64' || $cpu eq 'kvm32'; -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH] fix: start kvm with os type other
Hi, Seem that x2apic is now enabled by default when kvm is used since this commit http://git.qemu.org/?p=qemu.git;a=commit;h=ef02ef5f4536dba090b12360a6c862ef0e57e3bc So, I think we just need to disable it for solaris + push @$cpuFlags , '-x2apic' if !$nokvm $conf-{ostype} eq 'solaris'; (I'm not sure that this solaris bug was fixed or not) - Mail original - De: Wolfgang Link w.l...@proxmox.com À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 27 Août 2015 08:01:16 Objet: [pve-devel] [PATCH] fix: start kvm with os type other this check is necessary, because we do not set ostype in qemu config when type is other --- PVE/QemuServer.pm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 7115007..53fbcc9 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2877,9 +2877,11 @@ sub config_to_command { push @$cpuFlags , '+lahf_lm' if $cpu eq 'kvm64'; - push @$cpuFlags , '+x2apic' if !$nokvm $conf-{ostype} ne 'solaris'; + if ($conf-{ostype}) { + push @$cpuFlags , '+x2apic' if !$nokvm $conf-{ostype} ne 'solaris'; - push @$cpuFlags , '-x2apic' if $conf-{ostype} eq 'solaris'; + push @$cpuFlags , '-x2apic' if $conf-{ostype} eq 'solaris'; + } push @$cpuFlags, '+sep' if $cpu eq 'kvm64' || $cpu eq 'kvm32'; -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] Unable to restore container backup with vzdump command
Answering to self: we use now pct restore pct restore 100 /var/lib/vz/dump/vzdump-lxc-104-2015_08_27-11_45_22.tar.lzo On 08/27/2015 12:31 PM, Emmanuel Kasper wrote: Hi I am trying to restore a vzdump backup with the following command: vzrestore /var/lib/vz/dump/vzdump-lxc-104-2015_08_27-11_45_22.tar.lzo 100 I am always getting the error: vzrestore /var/lib/vz/dump/vzdump-lxc-104-2015_08_27-11_45_22.tar.lzo 100 can't lock container 100 even though there is no container with ID100 am I missing something ? -force does not help either Emmanuel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] Unable to restore container backup with vzdump command
Hi I am trying to restore a vzdump backup with the following command: vzrestore /var/lib/vz/dump/vzdump-lxc-104-2015_08_27-11_45_22.tar.lzo 100 I am always getting the error: vzrestore /var/lib/vz/dump/vzdump-lxc-104-2015_08_27-11_45_22.tar.lzo 100 can't lock container 100 even though there is no container with ID100 am I missing something ? -force does not help either Emmanuel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] novnc : bump to a369a80c2480af685b7bddacddae9cca3aea95f9 commit (20/08/2015) V2
They are performances improvements and fullscreen button support changelog: only display fullscreen button is resize=scale is defined Signed-off-by: Alexandre Derumier aderum...@odiso.com --- debian/install| 4 +- debian/patches/fix-base-css.patch | 2 +- debian/patches/pveui.patch| 80 +-- 3 files changed, 47 insertions(+), 39 deletions(-) diff --git a/debian/install b/debian/install index cde23e4..8778541 100644 --- a/debian/install +++ b/debian/install @@ -16,7 +16,7 @@ include/util.js /usr/share/novnc-pve/include include/websock.js /usr/share/novnc-pve/include include/webutil.js /usr/share/novnc-pve/include include/jsunzip.js /usr/share/novnc-pve/include -include/web-socket-js/* /usr/share/novnc-pve/include/web-socket-js include/Orbitron700.ttf/usr/share/novnc-pve/include include/Orbitron700.woff /usr/share/novnc-pve/include -include/keysym.js /usr/share/novnc-pve/include \ No newline at end of file +include/keysym.js /usr/share/novnc-pve/include +include/inflator.js/usr/share/novnc-pve/include diff --git a/debian/patches/fix-base-css.patch b/debian/patches/fix-base-css.patch index 553e77e..e3edfb4 100644 --- a/debian/patches/fix-base-css.patch +++ b/debian/patches/fix-base-css.patch @@ -38,7 +38,7 @@ Index: new/include/base.css -#sendCtrlAltDelButton { - display: none; -} - #noVNC_xvp_buttons { + #fullscreenButton { display: none; } @@ -76,7 +95,7 @@ diff --git a/debian/patches/pveui.patch b/debian/patches/pveui.patch index 8d24e4e..fcdee5a 100644 --- a/debian/patches/pveui.patch +++ b/debian/patches/pveui.patch @@ -1,29 +1,28 @@ -From 3dc49ec6e3bdbec6ec3ace618387ceac73f9eeb5 Mon Sep 17 00:00:00 2001 +From 280c1f8b3c07fde35282cd46d965bc1bc8f5649d Mon Sep 17 00:00:00 2001 From: Alexandre Derumier aderum...@odiso.com Date: Thu, 25 Jun 2015 02:50:03 +0200 Subject: [PATCH] pveui : add promox code Signed-off-by: Alexandre Derumier aderum...@odiso.com --- - pveui.js | 721 ++- - 1 file changed, 672 insertions(+), 49 deletions(-) + pveui.js | 724 ++- + 1 file changed, 675 insertions(+), 49 deletions(-) diff --git a/pveui.js b/pveui.js -index 3d3c41e..72072b1 100644 +index b2938d4..d6e172b 100644 --- a/pveui.js +++ b/pveui.js -@@ -38,11 +38,17 @@ var UI; - ctrlOn: false, - altOn: false, +@@ -40,10 +40,17 @@ var UI; isTouchDevice: false, -- -+ pveAllowMigratedVMTest: false, // set to true after a succesful conection -+ pveCommandsOpen: false, -+ consoletype: undefined, -+ vmid: undefined, -+ vmname: undefined, -+ nodename: undefined, -+ resize: undefined, + rememberedClipSetting: null, + ++pveAllowMigratedVMTest: false, // set to true after a succesful conection ++pveCommandsOpen: false, ++consoletype: undefined, ++vmid: undefined, ++vmname: undefined, ++nodename: undefined, ++resize: undefined, // Setup rfb object, load settings from browser storage, then call // UI.init to setup the UI/menus load: function (callback) { @@ -32,7 +31,7 @@ index 3d3c41e..72072b1 100644 }, // Render default UI and initialize settings menu -@@ -54,13 +60,13 @@ var UI; +@@ -55,13 +62,13 @@ var UI; var sheets = WebUtil.getStylesheets(); var i; for (i = 0; i sheets.length; i += 1) { @@ -48,7 +47,7 @@ index 3d3c41e..72072b1 100644 } // Settings with immediate effects -@@ -84,20 +90,10 @@ var UI; +@@ -85,20 +92,10 @@ var UI; } } @@ -71,7 +70,18 @@ index 3d3c41e..72072b1 100644 if (autoconnect === 'true' || autoconnect == '1') { autoconnect = true; UI.connect(); -@@ -160,13 +156,16 @@ var UI; +@@ -141,7 +138,9 @@ var UI; + (document.documentElement.requestFullscreen || + document.documentElement.mozRequestFullScreen || + document.documentElement.webkitRequestFullscreen || +- document.body.msRequestFullscreen)) { ++ document.body.msRequestFullscreen) ++ UI.getSetting('resize') === 'scale' ++ ) { + $D('fullscreenButton').style.display = inline; + Util.addEvent(window, 'fullscreenchange', UI.updateFullscreenButton); + Util.addEvent(window, 'mozfullscreenchange', UI.updateFullscreenButton); +@@ -178,13 +177,16 @@ var UI; initRFB: function () { try { @@ -90,7 +100,7 @@ index 3d3c41e..72072b1 100644 return true; } catch (exc) { UI.updateState(null, 'fatal', null, 'Unable to create RFB client -- ' + exc); -@@ -194,33
Re: [pve-devel] [PATCH pve-container] Add handling for arch and ostype options in update_pct_config()
OK I will try to look at that (do not call update_pct_config with those options) , but maybe takes some time, this will be my first real dive in Perl ! I guess this is already fixed with: https://git.proxmox.com/?p=pve-container.git;a=commitdiff;h=ed680718291843c7987181eeff2a8e038b920185 Please can you test? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH pve-container] Add handling for arch and ostype options in update_pct_config()
On 08/27/2015 09:02 AM, Dietmar Maurer wrote: OK I will try to look at that (do not call update_pct_config with those options) , but maybe takes some time, this will be my first real dive in Perl ! I guess this is already fixed with: https://git.proxmox.com/?p=pve-container.git;a=commitdiff;h=ed680718291843c7987181eeff2a8e038b920185 Please can you test? Yes this fixes the restore bug thank you ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH 5/5] make create_rootfs sub generic
I committed everything now, so you can continue ;-) Ok. (and thanks for the cleanup !) - Mail original - De: dietmar diet...@proxmox.com À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 27 Août 2015 09:08:41 Objet: Re: [pve-devel] [PATCH 5/5] make create_rootfs sub generic I wonder if that unmount everything (mountpoints below /)? Currently not, because anyway, I'm still only manage rootfs. (I'm waiting to have this patch serie commited before continue) I committed everything now, so you can continue ;-) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH 5/5] make create_rootfs sub generic
I wonder if that unmount everything (mountpoints below /)? Currently not, because anyway, I'm still only manage rootfs. (I'm waiting to have this patch serie commited before continue) I committed everything now, so you can continue ;-) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel