{"id":799,"date":"2025-05-05T07:39:02","date_gmt":"2025-05-05T12:39:02","guid":{"rendered":"https:\/\/wp.jkhayer.us\/?p=799"},"modified":"2025-05-05T07:40:16","modified_gmt":"2025-05-05T12:40:16","slug":"proxmox","status":"publish","type":"post","link":"https:\/\/wp.jkhayer.us\/?p=799","title":{"rendered":"Proxmox"},"content":{"rendered":"\n<p><em><strong>Remove No valid subscription=====&gt;<\/strong><\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/share\/javascript\/proxmox-widget-toolkit\ncp proxmoxlib.js proxmoxlib.js.bak \nnano proxmoxlib.js\n(ctrl+w and search No valid subscription)\n(change to)\n\nvoid({ \/\/Ext.Msg.show({\n  title: gettext('No valid subscription'),\n  \n  systemctl restart pveproxy.service\nfor check\ngrep -n -B 1 'No valid sub' proxmoxlib.js\n  ============================================\n  \n  # Disable Commercial Repo\nsed -i \"s\/^deb\/\\#deb\/\" \/etc\/apt\/sources.list.d\/pve-enterprise.list\napt-get update\n\n# Add PVE Community Repo\necho \"deb http:\/\/download.proxmox.com\/debian\/pve $(grep \"VERSION=\" \/etc\/os-release | sed -n 's\/.*(\\(.*\\)).*\/\\1\/p') pve-no-subscription\" &gt; \/etc\/apt\/sources.list.d\/pve-no-enterprise.list\napt-get update\n\n# Remove nag\necho \"DPkg::Post-Invoke { \\\"dpkg -V proxmox-widget-toolkit | grep -q '\/proxmoxlib\\.js$'; if &#91; \\$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '\/data.status\/{s\/\\!\/\/;s\/Active\/NoMoreNagging\/}' \/usr\/share\/javascript\/proxmox-widget-toolkit\/proxmoxlib.js; }; fi\\\"; };\" &gt; \/etc\/apt\/apt.conf.d\/no-nag-script\napt --reinstall install proxmox-widget-toolkit\n  \nsed -i.bak 's\/NotFound\/Active\/g' \/usr\/share\/perl5\/PVE\/API2\/Subscription.pm &amp;&amp; systemctl restart pveproxy.service \n\nsed -Ezi.bak \"s\/(Ext.Msg.show\\(\\{\\s+title: gettext\\('No valid sub)\/void\\(\\{ \\\/\\\/\\1\/g\" \/usr\/share\/javascript\/proxmox-widget-toolkit\/proxmoxlib.js &amp;&amp; systemctl restart pveproxy.service\n===============================================\n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/github.com\/Jamesits\/pve-fake-subscription\/releases\/download\/v0.0.7\/pve-fake-subscription_0.0.7_all.deb\ndpkg -i pve-fake-subscription_0.0.7_all.deb\n\npve-fake-subscription\n\n<\/code><\/pre>\n\n\n\n<p>lsblk<\/p>\n\n\n\n<p>blkid -o list<\/p>\n\n\n\n<p>fdisk -l<\/p>\n\n\n\n<p>Directory form Disk<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/mnt\/usb-data       mount \/dev\/sdc1 \/mnt\/usb-data\n<\/code><\/pre>\n\n\n\n<p><em><strong>Setup Permanent Mount<\/strong><\/em><\/p>\n\n\n\n<p>In order to mount your USB drive permanently after reboot add a line into your \/etc\/fstab config file. If drives are added or removed from the Proxmox the device may change. For this reason the partion UUID will need to be used instead of the block device name.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\" ls -l \/dev\/disk\/by-uuid\/*  \"\n\nlrwxrwxrwx 1 root root 10 Jul  9 14:08 \/dev\/disk\/by-uuid\/17217120-ae4b-407a-90a2-d55d83dc23f1 -&gt; ..\/..\/sdb1\nlrwxrwxrwx 1 root root 10 Jul  9 14:08 \/dev\/disk\/by-uuid\/26da1ea2-5a38-47ab-821e-5059d28a7b0f -&gt; ..\/..\/dm-1\nlrwxrwxrwx 1 root root 10 Jul  9 14:08 \/dev\/disk\/by-uuid\/26ff5094-3a30-4921-b4e2-8b96dc7fb163 -&gt; ..\/..\/dm-0\n\nAbove will give you the uuid. Open the fstab for editing\n-------------------------------------------------------\n\n\" nano \/etc\/fstab \"\n\nAdd this line to your fstab using the correct UUID.--&gt;\n-----------------------------------------------------\n\" \/dev\/disk\/by-uuid\/17217120-ae4b-407a-90a2-d55d83dc23f1    \/mnt\/usb-data         ext4   defaults  0 \"\n  \/dev\/disk\/by-uuid\/17217120-ae4b-407a-90a2-d55d83dc23f1    \/mnt\/usb-drive         ext4   defaults   0\n\nMount drive--&gt;\" mount -a \"\n<\/code><\/pre>\n\n\n\n<p>Log in via ssh and<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>look at the current state: pvecm status\ntell the system to temporarily accept that: pvecm expected 2\n<\/code><\/pre>\n\n\n\n<p>stop cluster services and corosync on all servers in the cluster. systemctl stop corosync systemctl stop pve-cluster<\/p>\n\n\n\n<p>After do this in all servers, in just one server (choose one to reboot after procedure) do: pmxcfs -l and edit the file \/etc\/pve\/corosync.conf line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>quorum {\nprovider: corosync_votequorum\n}\n\nto:\n\nquorum {\nprovider: corosync_votequorum\ntwo_node: 1\n}\n<\/code><\/pre>\n\n\n\n<p>after change, reboot this server.<\/p>\n\n\n\n<p><em><strong>Join Node to Cluster via Command Line<\/strong><\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvecm add IP-ADDRESS-CLUSTER\npvecm add 10.0.0.99\n\npvecm add &lt;any_proxmox_node_ip) -force\n<\/code><\/pre>\n\n\n\n<p><em><strong>Remove a Cluster Node<\/strong><\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvecm status\npvecm nodes\nsystemctl status corosync  &lt;--check if everything is working properly\nsystemctl restart corosync\n\n\nsystemctl stop pve-cluster\nsystemctl stop corosync\npmxcfs -l\nm \/etc\/pve\/corosync.conf\nrm -r \/etc\/corosync\/*\nkillall pmxcfs\nsystemctl start pve-cluster\n\n\npvecm delnode oldnode,  pvecm delnode ProxmoxNUC , pvecm delnode ProxmoxVE\npvecm expected 1\n\n\nChange Hostname\n\nRename a standalone PVE host, you need to edit the following files:\n    \/etc\/hosts\n    \/etc\/hostname\n\nYou can get the version of proxmox using the pveversion command.\npveversion\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Remove No valid subscription=====&gt; lsblk blkid -o list fdisk -l Directory form Disk Setup Permanent Mount In order to mount<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-799","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/posts\/799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=799"}],"version-history":[{"count":1,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/posts\/799\/revisions"}],"predecessor-version":[{"id":800,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/posts\/799\/revisions\/800"}],"wp:attachment":[{"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}