Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all 4211 articles
Browse latest View live

[server] ubuntu 24.04 as VM on esxi - resize disk

$
0
0
Hello everyone,

I have an ubuntu 24.04 server running as virtual machine on an esxi.

I did increase the disk size on the esxi host and then tried to resize disk (from 30G to 100G) on the ubuntu vm. I recognized that I am using LVM without knowing what it really does... Normally I do run debian server without lvm so I am a little confused here...

When I do run fdisk -l now I get the following output:

Code:

user@gitea:~$ sudo fdisk -l
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: Virtual disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 41255EC2-3A41-4BDB-B3CC-005E339028E8

Device      Start      End  Sectors Size Type
/dev/sda1    2048      4095      2048  1M BIOS boot
/dev/sda2    4096  4198399  4194304  2G Linux filesystem
/dev/sda3  4198400 209715166 205516767  98G Linux filesystem


Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 28 GiB, 30060576768 bytes, 58712064 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
user@gitea:~$

Why is /dev/mapper/ubuntu--vg-ubuntu--lv showing 28GB? Shouldn't that be also nearly 100GB or did I mess something up?

Thanks in advance,
bird

Win10 WSL Ubuntu Miniforge3 - installing Sagemath - How toSet PATH in .bashrc

$
0
0
I am a newbie in Ubuntu. In Win10, I have installed WSL2, then Ubuntu and now I need to install Sage Math on top.

On running this cmd: $bash Miniforge3-$(uname)-$(uname -m).sh ---(1)

I get this display: Welcome to Miniforge3 24.9.0-0 (so it is installed OK)

Next, I need to run this: $conda create -n sage sage python=3.11 ---(2)

but run into this problem:
conda: command not found and command "mamba" not found

The contents of the miniforge3 directory are the following:

=2.17 _conda compiler_compat condabin etc lib man sbin shell x86_64-conda-linux-gnu
LICENSE.txt bin conda-meta envs include libexec pkgs share ssl x86_64-conda_cos6-linux-gnu

Can you provide some idea how I can execute (2). Command "conda" is not here but "_conda" is.
I am unfamiliar with Linux / Ubuntu file system to correctly set a PATH command. I can move to
the miniforge3 directory and execute(2) from there?

Thanks for your help or ideas.

[kubuntu] Cups fails to run from Docker container

$
0
0
I hope this is the correct place to ask for assistance.

When I try to run a docker container with cups, cups fails to launch with the message:

Code:

lpadmin: Unable to connect to server: Bad file descriptor
I have two different containers with Cups that are failing. It used to work in Ubuntu 24.04 but hasn't worked since we upgraded to 24.10.
One of the containers is:

Code:

docker run -d -p 631:631 --name cups anujdatar/cups
I can run Cups within Docker on Ubuntu 24.04, and it also runs on NixOS Unstable.

On both Ubuntu 24.10 (where cups fails) and NixOS Unstable channel (Cups succeeds) they have the same Docker version:

Docker version 27.3.1
Docker Compose version v2.29.7

What would be preventing this from working in Ubuntu 24.10? I have tested with the Linux kernel 6.11, 6.10, and 6.6. Any help would be appreciated!

[ubuntu] Virtualbox fails on loading a Windows 7 VM

$
0
0
Years ago I created a Win7 VM using the installation details for a new laptop . Replaced Win 7 with Ubuntu. Used that VM for quite a while under Ubuntu 20.04, and then copied it to an external hdd before wiping that laptop (wasn't new anymore). Now when I try and open that VM under Ubuntu 22.04 on the new laptop (also Ubuntu 22.04) I get the message: "The Virtual Machine ran into a non-fatal error... " for a short while, and then a dialogue to end the session. I've checked the VM settings and scanned the log file, but can't work out what is wrong.

Please advise me what I should do. I didn't create an OVA of the machine that I can find :(

I've attached the log file and png as per instructions.

Thanks!
Attached Images
Attached Files

[ubuntu] Best way to make a VM file of a Ubuntu 20 server

$
0
0
I need to rebuild my Ubuntu server. It's running, but hanging on by a thread, so I'd like to virtualize it, run it in VMWare Pro, HyperV, virtualbox, anything. (I'll rebuild on the hardware)

I wanted to use VMware converter, but it requires going to an esxi server, which I don't have running at the moment.

Any suggestions would be awesome, thanks!

Virtualbox Ubuntu host error

$
0
0
Hello everyone.
I have installed Virtual Box with
sudo apt install virtualbox

When i create a virtual machine, the first time it starts correctly, i can use it without problems.

But when i turn off the virtual machine and turn the virtual machine back on, it gives me an error and it cannot start.

First i get an error of insufficient memory, although i have plenty of ram.
It also gives an error of: Failed to load R0 module 0x80004005.

I dont quite understand why this error could be, i have been looking for something similar but i havent found anything.

Could it be because the virtualbox-ext-pack is not installed?
In principle it isnt necessary for the correct functioning of Vbox, but i dont know if its necessary to install it in Ubuntu.

Thank you very much.

camera not working inside Virtual Machine

$
0
0
My camera isn't working inside my Ubuntu VM via Virtual Box. I have selected on USB redirection and the light on the webcam is on but the camera screen is blank. I am using 'camera' app. I tried have tried it on my Manjaro host OS and it appears to work ok.

[ubuntu] libvirt: Windows 11 guest nested virtualization not working

$
0
0
Host OS : Ubuntu 24.04
CPU : i9-9900k
Guest OS : Windows 11
libvirt version: 10.0.0-2ubuntu8.4

Hyper-V does not work with the following error when booting a Windows guest:
> Hypervisor launch failed; The hypervisor was unable to initialize successfully (phase 0x7), and was not started. This initialization failure may be the result of a platform configuration or firmware issue.

/sys/module/kvm_intel/parameters:
- allow_smaller_maxphyaddr: N
- dump_invalid_vmcs: N
- emulate_invalid_guest_state: Y
- enable_apicv: N
- enable_ipiv: N
- enable_shadow_vmcs: Y
- enlightened_vmcs: N
- ept: Y
- eptad: Y
- error_on_inconsistent_vmcs_config: Y
- fasteoi: Y
- flexpriority: Y
- nested: Y
- nested_early_check: N
- ple_gap: 128
- ple_window: 4096
- ple_window_grow: 2
- ple_window_max: 4294967295
- ple_window_shrink: 0
- pml: Y
- preemption_timer: Y
- pt_mode: 0
- sgx: Y
- unrestricted_guest: Y
- vmentry_l1d_flush: not required
- vnmi: Y
- vpid: Y

Note that without `<feature policy="disable" name="waitpkg"/>`, Windows will not boot and will crash.

Code:

<domain type="kvm">
  <name>windows-main-vm</name>
  <uuid>3844e178-d039-4c86-adc8-05a593a60553</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/11"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">20971520</memory>
  <currentMemory unit="KiB">20971520</currentMemory>
  <vcpu placement="static">8</vcpu>
  <os firmware="efi">
    <type arch="x86_64" machine="pc-q35-8.2">hvm</type>
    <firmware>
      <feature enabled="no" name="enrolled-keys"/>
      <feature enabled="yes" name="secure-boot"/>
    </firmware>
    <loader readonly="yes" secure="yes" type="pflash">/usr/share/OVMF/OVMF_CODE_4M.secboot.fd/loader>
    <nvram template="/usr/share/OVMF/OVMF_VARS_4M.ms.fd">/var/lib/libvirt/qemu/nvram/windows-main-vm_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode="custom">
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <vpindex state="on"/>
      <runtime state="on"/>
      <synic state="on"/>
      <stimer state="on">
        <direct state="on"/>
      </stimer>
      <reset state="on"/>
      <ipi state="on"/>
      <evmcs state="on"/>
    </hyperv>
    <smm state="on"/>
    <ioapic driver="kvm"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="on">
    <topology sockets="1" dies="1" cores="8" threads="1"/>
    <feature policy="require" name="vmx"/>
    <feature policy="require" name="aes"/>
    <feature policy="disable" name="hypervisor"/>
    <feature policy="disable" name="waitpkg"/>
  </cpu>
  <clock offset="localtime">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" discard="unmap"/>
      <source file="/var/lib/libvirt/images/windows-vm.qcow2"/>
      <target dev="sda" bus="sata"/>
      <boot order="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0x16"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0x17"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
    </controller>
    <controller type="pci" index="9" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="9" port="0x18"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="10" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="10" port="0x19"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
    </controller>
    <controller type="pci" index="11" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="11" port="0x1a"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
    </controller>
    <controller type="pci" index="12" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="12" port="0x1b"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
    </controller>
    <controller type="pci" index="13" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="13" port="0x1c"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
    </controller>
    <controller type="pci" index="14" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="14" port="0x1d"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
    </controller>
    <controller type="pci" index="15" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="15" port="0x1e"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x6"/>
    </controller>
    <controller type="pci" index="16" model="pcie-to-pci-bridge">
      <model name="pcie-pci-bridge"/>
      <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </controller>
    <controller type="scsi" index="0" model="virtio-scsi">
      <address type="pci" domain="0x0000" bus="0x0a" slot="0x00" function="0x0"/>
    </controller>
    <interface type="bridge">
      <mac address="52:54:00:43:e5:53"/>
      <source bridge="br0"/>
      <model type="virtio"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="1"/>
    </channel>
    <input type="tablet" bus="usb">
      <address type="usb" bus="0" port="1"/>
    </input>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <tpm model="tpm-crb">
      <backend type="emulator" version="2.0"/>
    </tpm>
    <graphics type="spice" port="-1" autoport="no">
      <listen type="address"/>
      <image compression="off"/>
      <gl enable="no"/>
    </graphics>
    <graphics type="vnc" port="-1" autoport="yes">
      <listen type="address"/>
    </graphics>
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    <audio id="1" type="spice"/>
    <video>
      <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="2"/>
    </redirdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="3"/>
    </redirdev>
    <watchdog model="itco" action="reset"/>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </memballoon>
    <rng model="virtio">
      <backend model="random">/dev/urandom</backend>
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </rng>
  </devices>
</domain>


Virtual Machine Manager Fails to Launch - Python Lib Error

$
0
0
Hi all,

This issue is well out of my knowledge area. I've tried reinstalling virt-manager but the error persists and I'm out of ideas.

Below is the error I see when running it from the terminal. Please could someone point me in the right direction?

Traceback (most recent call last):
File "/usr/bin/virt-manager", line 6, in <module>
from virtManager import virtmanager
File "/usr/share/virt-manager/virtManager/virtmanager.py", line 19, in <module>
from virtinst import BuildConfig
File "/usr/share/virt-manager/virtinst/__init__.py", line 50, in <module>
from virtinst.domain import * # pylint: disable=wildcard-import
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/virt-manager/virtinst/domain/__init__.py", line 5, in <module>
from .blkiotune import DomainBlkiotune
File "/usr/share/virt-manager/virtinst/domain/blkiotune.py", line 8, in <module>
from ..xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty
File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 16, in <module>
from .xmlapi import XMLAPI
File "/usr/share/virt-manager/virtinst/xmlapi.py", line 7, in <module>
import libxml2
File "/usr/lib/python3/dist-packages/libxml2.py", line 1, in <module>
import libxml2mod
ImportError: /usr/lib/vmware/libxml2.so.2: version `LIBXML2_2.9.11' not found (required by /usr/lib/python3/dist-packages/libxml2mod.cpython-312-x86_64-linux-gnu.so)

Thanks
Ian

Virt-Manager (VMM) - Migrate from old Desktop to new Desktop - Connection Names

$
0
0
Hi All,

I am in the process of migrating my daily driver (old Dell Optiplex 755 running Ubuntu Desktop 22.04 LTS) to a newer Lenovo ThinkCentre M93p running Ubuntu Desktop 24.01.1 LTS.

I am about to migrate over my Virt-Manager (Virtual Machine Manager / VMM) settings, and I would like to export my connection settings from my old machine, and transfer them over to my new machine. For the avoidance of doubt - I am NOT wanting to migrate a VM from one host to another, that is a completely different thing.

I don't have that many (a dozen or so), so I could do it manually, but I would like to understand how to do it 'better' (and with less risk of typos etc!)

All of the VMs (Qemu / KVM) are on remote servers, mostly hosted VPS machines, with a few on servers at clients, but I don't think that makes any difference?


I can get the connection strings (LibVirt URIs) from the old machine like this:

Code:

gsettings get org.virt-manager.virt-manager.connections uris
I can also get their 'auto connect' settings like this:

Code:

gsettings get org.virt-manager.virt-manager.connections autoconnect
However, I can't see how to get their 'friendly names' out?

By friendly names, I mean the names that you can edit to whatever you like so that they are meaningful when they display in the list in VMM. You get to it by:

Select a connection
Edit - Connection Details
Overview tab
Basic details
Name (which is just a label that you can edit as you like)

I have checked on the website (https://virt-manager.org/) but couldn't find anything there, nor with a Google search (but maybe my Google-Fu is lacking).

I have enumerated all of the schemas, and got this list (trimmed to only show the virt-manager ones):

Quote:

org.virt-manager.virt-manager
org.virt-manager.virt-manager.confirm
org.virt-manager.virt-manager.connections
org.virt-manager.virt-manager.console
org.virt-manager.virt-manager.details
org.virt-manager.virt-manager.new-vm
org.virt-manager.virt-manager.paths
org.virt-manager.virt-manager.stats
org.virt-manager.virt-manager.urls
org.virt-manager.virt-manager.vmlist-fields
I have then listed the keys under every single schema, but I can't find any that show the 'friendly name'. If it can't be done this way, is there somewhere that those 'friendly names' are stored in a config file that I can copy over?


Any help would be much appreciated.


Thanks,

Alan.

[ubuntu] Problem on starting VirtualBox Manager

$
0
0
Hi all,

Ubuntu 24.04
Oracle VirtualBox installed on repo

After running the recent update and upgrade, the first time starts VirtualBox. The screen of VirtualBox Manager takes up the whole screen of the display and looks differently. Please see attached screenshot.

Kindly advise how to fix it. Thanks in advance.

Regards
Attached Images
Viewing all 4211 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>