Chotaire Wiki

Stuff you didn't know

User Tools

Site Tools


proxmox-various-commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
proxmox-various-commands [2020/11/28 14:35] – [Boot Fedora/CentOS/RedHat VirtualBox/VMware VM using virtio-scsi:] chotaireproxmox-various-commands [2024/10/29 17:16] (current) – [Enable Nested Virtualization] chotaire
Line 31: Line 31:
  
 Careful, don't live-migrate VMs with nested virtualization enabled, I think that wouldn't work. Nested Virtualization is rather something for your standalone hypervisors. Careful, don't live-migrate VMs with nested virtualization enabled, I think that wouldn't work. Nested Virtualization is rather something for your standalone hypervisors.
 +
 +==== Intel Host CPU ====
  
 <code> <code>
Line 39: Line 41:
 </code> </code>
  
 +==== AMD Host CPU ====
 +
 +<code>
 +echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
 +modprobe -r kvm_amd
 +modprobe kvm_amd
 +cat /sys/module/kvm_amd/parameters/nested
 +</code>
 ===== Install and enable KSM (Kernel Samepage Mapping) ===== ===== Install and enable KSM (Kernel Samepage Mapping) =====
  
Line 68: Line 78:
 update-grub update-grub
 reboot reboot
 +</code>
 +
 +===== Proxmox installed from Hetzner image causes postfix to bounce mail =====
 +
 +This problem doesn't exist when installing from the Proxmox ISO. Run the following command and set the general configuration to **Internet Site**.
 +
 +<code>
 +dpkg-reconfigure postfix
 </code> </code>
  
Line 109: Line 127:
 </code> </code>
  
-===== Convert Virtualbox vdi to vmdk =====+===== Can't SSH into Fedora 33 using pubkey authentication =====
  
 <code> <code>
-vboxmanage clonehd palau.vdi palau.vmdk --format VMDK+update-crypto-policies --set LEGACY
 </code> </code>
  
-===== Boot Fedora/CentOS/RedHat VirtualBox/VMware VM using virtio-scsi: =====+===== Convert Virtualbox vdi using vboxmanage =====
  
 +This is how to convert a vdi image to vmdk using vboxmanage provided by VirtualBox:
 +
 +<code>
 +vboxmanage clonehd whatever.vdi whatever.vmdk --format VMDK
 +</code>
 +
 +===== Convert Virtualbox vdi using qemu-img =====
 +
 +This example shows how to convert vdi to qcow using qemu-img provided by Proxmox:
 +
 +<code>
 +qemu-img convert -f vdi -O qcow2 whatever.vdi whatever.qcow2 
 +</code>
 +
 +===== Convert vmdk and import to thinpool =====
 +
 +<code>
 +qemu-img convert -f vmdk whatever.vmdk -O qcow2 whatever.qcow2
 +qm importdisk 100 whatever.qcow2 local-zfs
 +</code>
 +
 +===== Convert Fedora/CentOS/RedHat VirtualBox/VMware VM to use virtio-scsi =====
 +
 +While still running on VMware/VirtualBox: 
 <code> <code>
 dnf install dracut-config-generic dnf install dracut-config-generic
Line 124: Line 166:
 </code> </code>
  
-After booting with virtio-scsi, do the following: +After booting on Proxmox with virtio-scsi, do the following: 
  
 <code> <code>
Line 139: Line 181:
 </code> </code>
  
-Remember to remove VirtualBox/VMware guest extensions, install/enable qemu-agent and then enable Qemu Agent in Proxmox. You will also have to fix the network interface names before networking works. +Remember to remove VirtualBox/VMware guest extensions, install/enable qemu-agent and then enable Qemu Agent in Proxmox. You will also have to fix the network interface names before networking works. Make sure Discard is enabled in VM settings, then finally shrink the volume from inside the guest:
-===== Convert/import vmdk to thinpool=====+
  
 <code> <code>
-qemu-img convert -f vmdk whatever.vmdk -O qcow2 whatever.qcow2 +fstrim --v
-qm importdisk 100 whatever.qcow2 local-zfs+
 </code> </code>
  
-===== Replacing a failed drive on a Proxmox system booting from ZFS =====+===== Replacing a failed drive on a Proxmox 6.3 system booting from ZFS =====
  
-On EFI systems booting from two ZFS drives (RAID1), take backup from partition layouts of both drives while they are working:+Since the [[https://pve.proxmox.com/wiki/ZFS_on_Linux#_zfs_administration|Proxmox documentation]] is useless and sgdisk totally hosed one of my SSD partition layouts, I came up with this solution. On EFI systems booting from two ZFS drives (RAID1), take backup from partition layouts of both drives while they are working:
  
 <code> <code>
Line 262: Line 302:
 </code> </code>
  
-===== Fedora 32 LXC: unsupported release =====+===== Fedora 34 LXC: unsupported release =====
  
 <code> <code>
Line 268: Line 308:
  
 14c14 14c14
-<     die "unsupported fedora release\n" if !($version >= 22 && $version <= 31);+<     die "unsupported fedora release\n" if !($version >= 22 && $version <= 33);
 --- ---
->     die "unsupported fedora release\n" if !($version >= 22 && $version <= 32);+>     die "unsupported fedora release\n" if !($version >= 22 && $version <= 34);
 </code> </code>
  
Line 314: Line 354:
 echo "sleep 1" >> /etc/default/qemu-guest-agent echo "sleep 1" >> /etc/default/qemu-guest-agent
 reboot reboot
 +</code>
 +
 +===== Can't login on Web UI when cluster is degraded =====
 +
 +Run pvecm expected with the number of still online nodes, e.g. 1. Set back to previous number when done.
 +
 +<code>
 +pvecm expected 1
 </code> </code>
  
proxmox-various-commands.1606570526.txt.gz · Last modified: by chotaire