#StackBounty: #partition #virtual-machine #size Virtual Machine can't extend /dev/mapper/vg0-rootvol

Bounty: 50

I have a virtual machine that I’m trying to extend from 150GB to 500GB.

$ sudo cfdisk /dev/sda
                         cfdisk (util-linux 2.23.2)

                            Disk Drive: /dev/sda
                     Size: 536870912000 bytes, 536.8 GB
           Heads: 255   Sectors per Track: 63   Cylinders: 65270

   Name        Flags     Part Type  FS Type         [Label]       Size (MB)
 --------------------------------------------------------------------------
                          Pri/Log   Free Space                         1.05*
   sda1        Boot       Primary   xfs                              536.88*
   sda2                   Primary   LVM2_member                   536333.00*

I’ve run fdisk (https://unix.stackexchange.com/a/134813/173008) to delete and create a new sda2 partition.

I am following this guide (https://unix.stackexchange.com/a/108229/173008), however I am stuck because I can’t extend vg0 to use this additional space.

$ df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vg0-rootvol  146G  123G   16G  90% /
/dev/sda1                509M  268M  242M  53% /boot

$ sudo pvs
  PV         VG  Fmt  Attr PSize    PFree
  /dev/sda2  vg0 lvm2 a--  <149.50g    0

$ sudo vgs
  VG  #PV #LV #SN Attr   VSize    VFree
  vg0   1   2   0 wz--n- <149.50g    0

$ sudo lvs
  LV      VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  rootvol vg0 -wi-ao---- <147.50g
  swap1   vg0 -wi-ao----    2.00g

The problem is there is no "extra space" on /dev/sda2, and still shows <149.5g, so running the following doesn’t work:

$ sudo pvresize /dev/sda2
  Physical volume "/dev/sda2" changed
  1 physical volume(s) resized or updated / 0 physical volume(s) not resized

$ sudo lvextend --size +350G /dev/mapper/vg0-rootvol
  Insufficient free space: 89600 extents needed, but only 0 available

I’m stuck and don’t know how to fix this. Any help would be appreciated.


Get this bounty!!!

#StackBounty: #partition #virtual-machine #size Virtual Machine can't extend /dev/mapper/vg0-rootvol

Bounty: 50

I have a virtual machine that I’m trying to extend from 150GB to 500GB.

$ sudo cfdisk /dev/sda
                         cfdisk (util-linux 2.23.2)

                            Disk Drive: /dev/sda
                     Size: 536870912000 bytes, 536.8 GB
           Heads: 255   Sectors per Track: 63   Cylinders: 65270

   Name        Flags     Part Type  FS Type         [Label]       Size (MB)
 --------------------------------------------------------------------------
                          Pri/Log   Free Space                         1.05*
   sda1        Boot       Primary   xfs                              536.88*
   sda2                   Primary   LVM2_member                   536333.00*

I’ve run fdisk (https://unix.stackexchange.com/a/134813/173008) to delete and create a new sda2 partition.

I am following this guide (https://unix.stackexchange.com/a/108229/173008), however I am stuck because I can’t extend vg0 to use this additional space.

$ df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vg0-rootvol  146G  123G   16G  90% /
/dev/sda1                509M  268M  242M  53% /boot

$ sudo pvs
  PV         VG  Fmt  Attr PSize    PFree
  /dev/sda2  vg0 lvm2 a--  <149.50g    0

$ sudo vgs
  VG  #PV #LV #SN Attr   VSize    VFree
  vg0   1   2   0 wz--n- <149.50g    0

$ sudo lvs
  LV      VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  rootvol vg0 -wi-ao---- <147.50g
  swap1   vg0 -wi-ao----    2.00g

The problem is there is no "extra space" on /dev/sda2, and still shows <149.5g, so running the following doesn’t work:

$ sudo pvresize /dev/sda2
  Physical volume "/dev/sda2" changed
  1 physical volume(s) resized or updated / 0 physical volume(s) not resized

$ sudo lvextend --size +350G /dev/mapper/vg0-rootvol
  Insufficient free space: 89600 extents needed, but only 0 available

I’m stuck and don’t know how to fix this. Any help would be appreciated.


Get this bounty!!!

#StackBounty: #partition #virtual-machine #size Virtual Machine can't extend /dev/mapper/vg0-rootvol

Bounty: 50

I have a virtual machine that I’m trying to extend from 150GB to 500GB.

$ sudo cfdisk /dev/sda
                         cfdisk (util-linux 2.23.2)

                            Disk Drive: /dev/sda
                     Size: 536870912000 bytes, 536.8 GB
           Heads: 255   Sectors per Track: 63   Cylinders: 65270

   Name        Flags     Part Type  FS Type         [Label]       Size (MB)
 --------------------------------------------------------------------------
                          Pri/Log   Free Space                         1.05*
   sda1        Boot       Primary   xfs                              536.88*
   sda2                   Primary   LVM2_member                   536333.00*

I’ve run fdisk (https://unix.stackexchange.com/a/134813/173008) to delete and create a new sda2 partition.

I am following this guide (https://unix.stackexchange.com/a/108229/173008), however I am stuck because I can’t extend vg0 to use this additional space.

$ df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vg0-rootvol  146G  123G   16G  90% /
/dev/sda1                509M  268M  242M  53% /boot

$ sudo pvs
  PV         VG  Fmt  Attr PSize    PFree
  /dev/sda2  vg0 lvm2 a--  <149.50g    0

$ sudo vgs
  VG  #PV #LV #SN Attr   VSize    VFree
  vg0   1   2   0 wz--n- <149.50g    0

$ sudo lvs
  LV      VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  rootvol vg0 -wi-ao---- <147.50g
  swap1   vg0 -wi-ao----    2.00g

The problem is there is no "extra space" on /dev/sda2, and still shows <149.5g, so running the following doesn’t work:

$ sudo pvresize /dev/sda2
  Physical volume "/dev/sda2" changed
  1 physical volume(s) resized or updated / 0 physical volume(s) not resized

$ sudo lvextend --size +350G /dev/mapper/vg0-rootvol
  Insufficient free space: 89600 extents needed, but only 0 available

I’m stuck and don’t know how to fix this. Any help would be appreciated.


Get this bounty!!!

#StackBounty: #partition #virtual-machine #size Virtual Machine can't extend /dev/mapper/vg0-rootvol

Bounty: 50

I have a virtual machine that I’m trying to extend from 150GB to 500GB.

$ sudo cfdisk /dev/sda
                         cfdisk (util-linux 2.23.2)

                            Disk Drive: /dev/sda
                     Size: 536870912000 bytes, 536.8 GB
           Heads: 255   Sectors per Track: 63   Cylinders: 65270

   Name        Flags     Part Type  FS Type         [Label]       Size (MB)
 --------------------------------------------------------------------------
                          Pri/Log   Free Space                         1.05*
   sda1        Boot       Primary   xfs                              536.88*
   sda2                   Primary   LVM2_member                   536333.00*

I’ve run fdisk (https://unix.stackexchange.com/a/134813/173008) to delete and create a new sda2 partition.

I am following this guide (https://unix.stackexchange.com/a/108229/173008), however I am stuck because I can’t extend vg0 to use this additional space.

$ df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vg0-rootvol  146G  123G   16G  90% /
/dev/sda1                509M  268M  242M  53% /boot

$ sudo pvs
  PV         VG  Fmt  Attr PSize    PFree
  /dev/sda2  vg0 lvm2 a--  <149.50g    0

$ sudo vgs
  VG  #PV #LV #SN Attr   VSize    VFree
  vg0   1   2   0 wz--n- <149.50g    0

$ sudo lvs
  LV      VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  rootvol vg0 -wi-ao---- <147.50g
  swap1   vg0 -wi-ao----    2.00g

The problem is there is no "extra space" on /dev/sda2, and still shows <149.5g, so running the following doesn’t work:

$ sudo pvresize /dev/sda2
  Physical volume "/dev/sda2" changed
  1 physical volume(s) resized or updated / 0 physical volume(s) not resized

$ sudo lvextend --size +350G /dev/mapper/vg0-rootvol
  Insufficient free space: 89600 extents needed, but only 0 available

I’m stuck and don’t know how to fix this. Any help would be appreciated.


Get this bounty!!!

#StackBounty: #partition #virtual-machine #size Virtual Machine can't extend /dev/mapper/vg0-rootvol

Bounty: 50

I have a virtual machine that I’m trying to extend from 150GB to 500GB.

$ sudo cfdisk /dev/sda
                         cfdisk (util-linux 2.23.2)

                            Disk Drive: /dev/sda
                     Size: 536870912000 bytes, 536.8 GB
           Heads: 255   Sectors per Track: 63   Cylinders: 65270

   Name        Flags     Part Type  FS Type         [Label]       Size (MB)
 --------------------------------------------------------------------------
                          Pri/Log   Free Space                         1.05*
   sda1        Boot       Primary   xfs                              536.88*
   sda2                   Primary   LVM2_member                   536333.00*

I’ve run fdisk (https://unix.stackexchange.com/a/134813/173008) to delete and create a new sda2 partition.

I am following this guide (https://unix.stackexchange.com/a/108229/173008), however I am stuck because I can’t extend vg0 to use this additional space.

$ df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vg0-rootvol  146G  123G   16G  90% /
/dev/sda1                509M  268M  242M  53% /boot

$ sudo pvs
  PV         VG  Fmt  Attr PSize    PFree
  /dev/sda2  vg0 lvm2 a--  <149.50g    0

$ sudo vgs
  VG  #PV #LV #SN Attr   VSize    VFree
  vg0   1   2   0 wz--n- <149.50g    0

$ sudo lvs
  LV      VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  rootvol vg0 -wi-ao---- <147.50g
  swap1   vg0 -wi-ao----    2.00g

The problem is there is no "extra space" on /dev/sda2, and still shows <149.5g, so running the following doesn’t work:

$ sudo pvresize /dev/sda2
  Physical volume "/dev/sda2" changed
  1 physical volume(s) resized or updated / 0 physical volume(s) not resized

$ sudo lvextend --size +350G /dev/mapper/vg0-rootvol
  Insufficient free space: 89600 extents needed, but only 0 available

I’m stuck and don’t know how to fix this. Any help would be appreciated.


Get this bounty!!!

#StackBounty: #partition #virtual-machine #size Virtual Machine can't extend /dev/mapper/vg0-rootvol

Bounty: 50

I have a virtual machine that I’m trying to extend from 150GB to 500GB.

$ sudo cfdisk /dev/sda
                         cfdisk (util-linux 2.23.2)

                            Disk Drive: /dev/sda
                     Size: 536870912000 bytes, 536.8 GB
           Heads: 255   Sectors per Track: 63   Cylinders: 65270

   Name        Flags     Part Type  FS Type         [Label]       Size (MB)
 --------------------------------------------------------------------------
                          Pri/Log   Free Space                         1.05*
   sda1        Boot       Primary   xfs                              536.88*
   sda2                   Primary   LVM2_member                   536333.00*

I’ve run fdisk (https://unix.stackexchange.com/a/134813/173008) to delete and create a new sda2 partition.

I am following this guide (https://unix.stackexchange.com/a/108229/173008), however I am stuck because I can’t extend vg0 to use this additional space.

$ df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vg0-rootvol  146G  123G   16G  90% /
/dev/sda1                509M  268M  242M  53% /boot

$ sudo pvs
  PV         VG  Fmt  Attr PSize    PFree
  /dev/sda2  vg0 lvm2 a--  <149.50g    0

$ sudo vgs
  VG  #PV #LV #SN Attr   VSize    VFree
  vg0   1   2   0 wz--n- <149.50g    0

$ sudo lvs
  LV      VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  rootvol vg0 -wi-ao---- <147.50g
  swap1   vg0 -wi-ao----    2.00g

The problem is there is no "extra space" on /dev/sda2, and still shows <149.5g, so running the following doesn’t work:

$ sudo pvresize /dev/sda2
  Physical volume "/dev/sda2" changed
  1 physical volume(s) resized or updated / 0 physical volume(s) not resized

$ sudo lvextend --size +350G /dev/mapper/vg0-rootvol
  Insufficient free space: 89600 extents needed, but only 0 available

I’m stuck and don’t know how to fix this. Any help would be appreciated.


Get this bounty!!!

#StackBounty: #virtual-machine How do I create 100 virtual servers for testing?

Bounty: 50

I want to create 100 virtual servers. They will be used for testing, so they should be easy to create and destroy.

  • They must be accessible through SSH from another machine (I provide the public ssh-key)
  • They must have their own IP-address (IPv4 or IPv6, private address space OK)
  • They must have basic UNIX tools installed (preferably a full distro)
  • They must have /proc/cpuinfo, a root user, and a netcard (This is probably only relevant if the machine is not fully virtualized)
  • Added bonus if they can be made to run an X server that can be connected to remotely (using VNC or similar)

What is the fastest way to do this given:

  • The host system runs Ubuntu 20.04 and has plenty of RAM and CPU
  • The LAN has a DHCP-server (it is also OK to use a predefined IP-range)
  • I do not care which Free virtualization technology is used (Containerization is also OK if the other requirements are met)

and what are the actual commands I should run/files I should create?

I have the feeling that given the right technology this is a 50 line job that can be set up in minutes.

Background

For developing GNU Parallel I need an easy way to test running on 100 machines in parallel.

For other projects it would also be handy to be able to create a bunch of virtual machines, test some race conditions and then destroy the machines again.

In other words: This is not for a production environment and security is not an issue.


Get this bounty!!!

#StackBounty: #ubuntu #virtualbox #virtual-machine #gnome #kde-plasma-5 Oracle VirtualBox – Cursor Lost in Top Left Corner

Bounty: 50

In my Oracle VirtualBox 6.1, regularly, a square around 15cm x 15cm in the left top corner does not take the mouse click anymore (left and right). I am not sure what causes it. It comes and goes at random.

Could not see anything obvious from the logs. I have not moved the window, or resized it. The problem just appears and I have to either wait some time (30 mins, or more) or reboot.

The image is Ubuntu, I tried both Gnome and KDE Plasma to exclude an X problem.

What I have tried so far:
* Resizing windows
* Enable/disable mouse capture
* Change the mouse settings to USB Tablet or PS/2 Mouse.

Nothing changes. Only workaround I found is to enable a second monitor and switch my apps to it, ignoring the first.

287:03:09.198303 VMMDev: SetVideoModeHint: Got a video mode hint (120x501x32)@(0x0),(1;0) at 0
287:03:09.202764 GUI: UIMediumEnumerator: Medium-enumeration finished!
287:03:09.237392 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=1920 h=1057 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
287:03:09.251669 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000001336b000 w=800 h=600 bpp=32 cbLine=0xC80 flags=0x1 origin=0,0
287:03:09.261604 GUI: UIMachineLogic: Guest-screen count changed
287:03:09.445216 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=800 h=600 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
287:03:09.455684 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000001336b000 w=120 h=501 bpp=32 cbLine=0x1E0 flags=0x1 origin=0,0
287:03:09.456747 GUI: UIMachineLogic: Guest-screen count changed
287:03:09.558287 GUI: UIMachineView::sltPerformGuestResize: Sending guest size-hint to screen 0 as 120x501 if necessary
287:03:09.567996 GUI: UIMachineView::sltPerformGuestResize: Sending guest size-hint to screen 0 as 120x501 if necessary
287:03:10.363041 GUI: UIMachineView::sltPerformGuestResize: Sending guest size-hint to screen 0 as 1920x1057 if necessary
287:03:10.375516 VMMDev: SetVideoModeHint: Got a video mode hint (1920x1057x32)@(0x0),(1;0) at 0
287:03:10.381757 GUI: UIMediumEnumerator: Medium-enumeration finished!
287:03:10.537721 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=120 h=501 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
287:03:10.550348 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000001336b000 w=120 h=501 bpp=32 cbLine=0x1E0 flags=0x1 origin=0,0
287:03:10.551218 GUI: UIMachineLogic: Guest-screen count changed
287:03:10.577517 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=120 h=501 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
287:03:10.579120 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=00000000114f7000 w=1920 h=1057 bpp=32 cbLine=0x1E00 flags=0x1 origin=0,0
287:03:10.588438 GUI: UIMachineLogic: Guest-screen count changed


Get this bounty!!!

#StackBounty: #virtualbox #virtual-machine Oracle virtualbox – cursor lost in top left corner

Bounty: 50

This issue is driving me mad. In my oracle virtual box, regularly, a square around 15cmx15cm in the left top corner doesn’t take the mouse click anymoer (left and right). I am not sure what causes it. It comes and goes at random.

Couldn’t see anything obvious from the logs. I haven’t moved the window, or resized it, the problem just appears and I have to either wait some time (30 mins, or more) or reboot.

The image is ubuntu, I tried both Gnome and KDE plasma to exclude a X problem.
Oracle VM box is 6.1

I tried resizing windows, enable/disable mouse capture, change the mouse settings to tablet or PS/2. Nothing changes.
Only workaround I found is to enable a second monitor and switch my apps to it, ignoring the first.

Any help?

287:03:09.198303 VMMDev: SetVideoModeHint: Got a video mode hint (120x501x32)@(0x0),(1;0) at 0
287:03:09.202764 GUI: UIMediumEnumerator: Medium-enumeration finished!
287:03:09.237392 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=1920 h=1057 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
287:03:09.251669 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000001336b000 w=800 h=600 bpp=32 cbLine=0xC80 flags=0x1 origin=0,0
287:03:09.261604 GUI: UIMachineLogic: Guest-screen count changed
287:03:09.445216 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=800 h=600 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
287:03:09.455684 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000001336b000 w=120 h=501 bpp=32 cbLine=0x1E0 flags=0x1 origin=0,0
287:03:09.456747 GUI: UIMachineLogic: Guest-screen count changed
287:03:09.558287 GUI: UIMachineView::sltPerformGuestResize: Sending guest size-hint to screen 0 as 120x501 if necessary
287:03:09.567996 GUI: UIMachineView::sltPerformGuestResize: Sending guest size-hint to screen 0 as 120x501 if necessary
287:03:10.363041 GUI: UIMachineView::sltPerformGuestResize: Sending guest size-hint to screen 0 as 1920x1057 if necessary
287:03:10.375516 VMMDev: SetVideoModeHint: Got a video mode hint (1920x1057x32)@(0x0),(1;0) at 0
287:03:10.381757 GUI: UIMediumEnumerator: Medium-enumeration finished!
287:03:10.537721 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=120 h=501 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
287:03:10.550348 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000001336b000 w=120 h=501 bpp=32 cbLine=0x1E0 flags=0x1 origin=0,0
287:03:10.551218 GUI: UIMachineLogic: Guest-screen count changed
287:03:10.577517 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=120 h=501 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
287:03:10.579120 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=00000000114f7000 w=1920 h=1057 bpp=32 cbLine=0x1E00 flags=0x1 origin=0,0
287:03:10.588438 GUI: UIMachineLogic: Guest-screen count changed


Get this bounty!!!

#StackBounty: #virtual-machine #lxc #container #snap How to run snap daemon outside a container

Bounty: 50

It looks like snap programs (installed on ubuntu) are run instide VMs/containers created by Canonical (called multipass).

But what if my daemon needs access to the host filesystem, host system socket files, and needs to listen on a port? Is there a way to run a snap program as a systemctl daemon outside a container/VM and run in directly on the host machine?


Get this bounty!!!