Difference between revisions of "Ubuntu VM Lab"
Jump to navigation
Jump to search
Michael.mast (talk | contribs) |
Michael.mast (talk | contribs) |
||
Line 14: | Line 14: | ||
==Process== | ==Process== | ||
+ | ===Install Packages=== | ||
<pre> | <pre> | ||
sudo apt install virt-manager | sudo apt install virt-manager | ||
Line 20: | Line 21: | ||
sudo apt install libzfs2linux | sudo apt install libzfs2linux | ||
sudo apt install zfs-dkms | sudo apt install zfs-dkms | ||
+ | </pre> | ||
+ | ===Prepare Storage=== | ||
+ | *Partition disk (Not really needed, but I got into the habbit) | ||
+ | <pre> | ||
+ | sudo fdisk /dev/sdb | ||
+ | |||
+ | Command (m for help): p | ||
+ | Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/physical): 512 bytes / 4096 bytes | ||
+ | I/O size (minimum/optimal): 4096 bytes / 4096 bytes | ||
+ | Disklabel type: dos | ||
+ | Disk identifier: 0x970f8931 | ||
+ | |||
+ | Command (m for help): n | ||
+ | Partition type | ||
+ | p primary (0 primary, 0 extended, 4 free) | ||
+ | e extended (container for logical partitions) | ||
+ | Select (default p): | ||
+ | |||
+ | Using default response p. | ||
+ | Partition number (1-4, default 1): | ||
+ | First sector (2048-976773167, default 2048): | ||
+ | Last sector, +sectors or +size{K,M,G,T,P} (2048-976773167, default 976773167): | ||
+ | |||
+ | Created a new partition 1 of type 'Linux' and of size 465.8 GiB. | ||
+ | |||
+ | Command (m for help): w | ||
+ | The partition table has been altered. | ||
+ | Calling ioctl() to re-read partition table. | ||
+ | Syncing disks. | ||
+ | </pre> | ||
+ | *Encrypt Disk. This is really just to make disposing of the drive easier. If the drive dies I can throw it away without worrying about physically destorying it. | ||
+ | <pre> | ||
+ | sudo cryptsetup luksFormat --type luks2 /dev/sdb1 | ||
+ | WARNING! | ||
+ | ======== | ||
+ | This will overwrite data on /dev/sdb1 irrevocably. | ||
+ | Are you sure? (Type uppercase yes): YES | ||
+ | Enter passphrase for /dev/sdb1: | ||
+ | Verify passphrase: | ||
</pre> | </pre> |
Revision as of 13:54, 13 May 2018
Purpose
To build a simple VM lab in Ubnuntu. Nothing fancy.
Hardware
My primary personal computer, a Lenovo X220 laptop with
- 3rd gen i5
- 8GB RAM
- 256GB Crucial BX200 low end SSD
- 500GB HGST Travelstar Z7K500
Software
- OS is obviously Ubuntu. At the time of writing I am using Bionic Beaver.
- ZFS Filesystem tweaked to use 2GB of ARC
- Red Hat libvirt
Process
Install Packages
sudo apt install virt-manager sudo systemctl start libvirtd sudo systemctl enable libvirtd sudo apt install libzfs2linux sudo apt install zfs-dkms
Prepare Storage
- Partition disk (Not really needed, but I got into the habbit)
sudo fdisk /dev/sdb Command (m for help): p Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0x970f8931 Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): First sector (2048-976773167, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-976773167, default 976773167): Created a new partition 1 of type 'Linux' and of size 465.8 GiB. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.
- Encrypt Disk. This is really just to make disposing of the drive easier. If the drive dies I can throw it away without worrying about physically destorying it.
sudo cryptsetup luksFormat --type luks2 /dev/sdb1 WARNING! ======== This will overwrite data on /dev/sdb1 irrevocably. Are you sure? (Type uppercase yes): YES Enter passphrase for /dev/sdb1: Verify passphrase: