# Virtualization

# Oracle VirtualBox @Windows10Pro



# Cloning the machines and post-install for Oracle Linux v9

At the moment of writing, on 2025-07-18, my VirtualBox is v7.1.6.
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/RK08FKtg1TLwc0v5-image-1752829529756.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/RK08FKtg1TLwc0v5-image-1752829529756.png)

Open VirtualBox, find the source machine, click once to select

[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/WviJ4EavSJH3tkCy-image-1752828662314.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/WviJ4EavSJH3tkCy-image-1752828662314.png)

It is possible to either use menu: Snapshot> Clone
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/GaEOlUH6mymlpB5O-image-1752828731016.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/GaEOlUH6mymlpB5O-image-1752828731016.png)

Or click on [Clone] icon with a sheep:
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/yL3nxBRALl4iFZUT-image-1752828794910.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/yL3nxBRALl4iFZUT-image-1752828794910.png)

Or right-click on virtual machine itself:
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/3A52ilj8yoTdldMA-image-1752828882388.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/3A52ilj8yoTdldMA-image-1752828882388.png)

of press C-S-c (CTRL+SHIFT+c) or, from the list: C-o (CTRL+o)

Give machine a new name, check location and remember to choose "Generate new MAC for adapters". Your network infra will be happy to see healthy traffic and route it properly.
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/UZD52uylCvWDvibP-image-1752829067935.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/UZD52uylCvWDvibP-image-1752829067935.png)

When machne is cloned, let's start it:
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/xmJlmtYDwcNSCMe6-image-1752829340549.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/xmJlmtYDwcNSCMe6-image-1752829340549.png)



## Post-cloning precedures

All commands executed in the elevated shell
```bash
sudo su
```

Change hostname
```bash
hostnamectl hostname lt58dox1
```

During cloning the machines, change physical ID and MAC address in the hypervisor (sometimes, it will not do it automatically in VirtualBox, proxmox and others).

When machines are cloned, 'machine ID':
```bash
cat /etc/machine-id
rm -f /etc/machine-id
systemd-machine-id-setup
systemd-machine-id-setup --commit --print
```

SSH server's keys need to be re-generated to be seen as different machines
```bash
rm -rf /etc/ssh/ssh_host_*
ssh-keygen -A
ls -la /etc/ssh/ssh_host_*
```

And finally perform reboot
```bash
shutdown -r now
```

As there will be new MAC assigned, check for new IP addresses:
```bash
ip -br a
```

# Adding more space to virtual machine by adding new disk and expanding using LVM

Daily task, which comes as daily routing, to extend the disk space:

Switch off the machine


Open VM properties in Oracle VirtualBox Manager, Storage, 
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/SJlkUQFLf5mqCrUS-image-1753066022814.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/SJlkUQFLf5mqCrUS-image-1753066022814.png)

Click [Create]
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/fyC5bCCOfIFdohZm-image-1753066074990.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/fyC5bCCOfIFdohZm-image-1753066074990.png)

Name the disk accordingly to be consistent with other drives. Ensure that disk is saved nearby the VM itself. In my case, I am extending root partition for 50 GB.
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/sNgvzXW6tGWc3EzQ-image-1753066160130.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/sNgvzXW6tGWc3EzQ-image-1753066160130.png)

After new disk is created, choose it double-clicking it.
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/8UJugfUKmzMfz3ao-image-1753066265979.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/8UJugfUKmzMfz3ao-image-1753066265979.png)

Should end by seeing new disk in the virtual machine properties under 'Storage' list, attached to proper controller, 'SATA' - in my case.
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/eg0qfap0ka7hq1uZ-image-1753066346829.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/eg0qfap0ka7hq1uZ-image-1753066346829.png)

Confirm with [OK]

Power on the machine

List disks with. New disk should be visible. 
```bash
lsblk
```
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/scaled-1680-/w0jklbBxLJvq2Zvk-image-1753066495375.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2025-07/w0jklbBxLJvq2Zvk-image-1753066495375.png)

Follow [LVM Disk Extension guide](/books/disks-and-partitions/page/lvm) to finalize extension.

# Proxmox Virtual Environment (PVE)



# Enabling no-subscription repositories

On Debian v13 (trixie)



```bash
mv /etc/apt/sources.list.d/pve-enterprise.sources  /root
```

Create new file
```bash
nano /etc/apt/sources.list.d/pve-no-subscription.list 
```

repos
```ini
deb http://download.proxmox.com/debian/pve trixie pve-no-subscription
```


Adjust Debian repos


```bash
nano /etc/apt/sources.list.d/debian.sources 
```

repos
```ini
Types: deb
URIs: http://deb.debian.org/debian
Suites: trixie trixie-updates
Components: main contrib non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Types: deb
URIs: http://security.debian.org/debian-security
Suites: trixie-security
Components: main contrib non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
```



Verify repositories declaration
```bash
apt policy
```
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2026-04/scaled-1680-/uJSMUQL5kRd7v2G8-image-1776049077979.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2026-04/uJSMUQL5kRd7v2G8-image-1776049077979.png)


Do APT update
```bash
apt update
```
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2026-04/scaled-1680-/zbgZtCGNIq7tcS1Y-image-1776049111490.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2026-04/zbgZtCGNIq7tcS1Y-image-1776049111490.png)

List packages ready for update, most important that there are new packages from PVE repo.
```bash
apt list --upgradable
```
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2026-04/scaled-1680-/K7cTng8coJLqGgxJ-image-1776049491713.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2026-04/K7cTng8coJLqGgxJ-image-1776049491713.png)


Perform upgrade (when needed)
```bash
apt upgrade
```
[![](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2026-04/scaled-1680-/CT9ZfOz6yyjmPN2E-image-1776049552216.png)](https://storage.googleapis.com/iau-data-dox/uploads/images/gallery/2026-04/CT9ZfOz6yyjmPN2E-image-1776049552216.png)