Partition | Disk 1 | Disk 2 | Type | Device | Mount Point |
---|---|---|---|---|---|
1 |
1GB |
1GB |
mdraid |
/dev/md0 |
|
2 |
1GB |
1GB |
mdraid |
/dev/md1 |
|
3 |
500GB |
500GB |
LVM |
system/root |
|
# Clear mdadm metadata
mdadm --zero-superblock /dev/nvme0n1p[1-4]
# Create metadata 1.0 mdraid device
mdadm --create /dev/md0 --level=1 --raid-device=2 --metadata=1.0 /dev/nvme1n1p1 missing
# Duplicate GPT partition table and re-randomize the partitions' GUID
sgdisk /dev/nvme0n1 -R /dev/nvme1n1
sgdisk -G /dev/nvme1n1
# inform the OS of partition table changes
partprobe
Installation
# Install cockpit
apt install -y cockpit
# Install LVM2 support for udisks2 (utilized by cockpit storaged)
apt install udisks2-lvm2
# Login to cockpit http://ip:9090/
LVM
lvconvert --type raid1 -m 1 system/root
Network configuration
# Disable network interface in /etc/network/interfaces
nano /etc/network/interfaces
# Restart NetworkManager service
systemctl restart NetworkManager
Define network bridge in cockpit
-
IP may change
-
May require reboot
# Install cockpit KVM package
apt install cockpit-machines
Example: Windows guest via cockpit
VM=windows
# remove TPM emulator
virt-xml $VM --remove-device --tpm type=emulator
# Add TPM device
virt-xml $VM --add-device --tpm model=tpm-tis,backend.type=emulator,backend.version=2.0,alias.name=tpm0
Example: Windows guest via virt-install
INSTALLER=/mnt/setup/Win11_22H2_English_x64v2-virtio.iso
virt-install \
--virt-type kvm \
--graphics vnc \
--tpm model='tpm-tis',type=emulator,version='2.0' \
--boot firmware=efi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no \
--vcpus maxvcpus=8,vcpus=8 \
--memory memory=4096,currentMemory=4096 \
--disk size=64,bus=virtio \
--network bridge=bridge0,model=virtio \
--os-variant=win11 \
--cdrom=$INSTALLER