Showing posts with label proxmox. Show all posts
Showing posts with label proxmox. Show all posts

Wednesday, June 14, 2023

How to resize a partition in proxmox 5 or 6

Background

1. The partition is ordinary partition and not LVM

2. The filesystem is ext4

3. The steps tested on proxmox 5 and 6 and maybe applicable to other versions of Proxmox


Step by step

1. Select and resize the disk you want in proxmox gui


2. Login to the VM and type dmesg command to see the relevant device that has changed i.e /dev/vde

3. unmount the partition i.e /dev/vde1 : umount /dev/vde1

4. use parted to extend the disk's size:
    4.1 parted /dev/vde
    4.2 resizepart 1
    4.3 q

5. unmount the partition if it is automatically mounted. If it is not, then proceed to the next step: 
     umount /dev/vde1

6. run filesystem check: e2fsck -f /dev/vde1

7. filesystem resize: resize2fs /dev/vde1

8. mount the partition i.e mount to /data: mount /dev/vde1 /data

9. Check and verify

That's all there is to it. Have fun!







Saturday, February 20, 2016

Proxmox KVM usb passthrough

Proxmox KVM usb passthrough

Open KVM monitor for your KVM machine in Proxmox GUI or in the command line with the following command:
 
# qm monitor 168
Entering Qemu Monitor for VM 168 - type 'help' for help
qm> 

Show the usb devices info from your host machine:
qm> info usbhost
  Bus 4, Addr 2, Port 1, Speed 12 Mb/s
    Class 00: USB device 046b:ff10, Virtual Keyboard and Mouse
  Bus 6, Addr 2, Port 2, Speed 1.5 Mb/s
    Class 00: USB device 0624:0294, Dell 03R874
  Bus 2, Addr 3, Port 1, Speed 480 Mb/s
    Class 00: USB device 0930:6533, DataTraveler 2.0
  Auto filters:
    Bus *, Addr *, Port *, ID 0930:6533

According to device “USB device 0930:6533” in the example, add the device to guest machine:
qm> device_add usb-host,id=myusb,vendorid=0x0930,productid=0x6533

Verify that the new usb device is added in your guest:
qm> info usb
  Device 0.1, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 0.3, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.4, Port 2.1, Speed 480 Mb/s, Product DataTraveler 2.0

After using it, remove usb device from your guest:
qm> device_del myusb

If you run the command again, you will see the usb device is gone from your guest:
qm> info usb
  Device 0.1, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 0.3, Port 2, Speed 12 Mb/s, Product QEMU USB Hub

This has been tested in Proxmox 3.0/957f0862

Source

Nvidia new hotplug feature on Linux

 If you use nvidia driver for your GPU, you probably wonder why in some config, you can't hotplug your second monitor. You need to reboo...