I've recently stood up KVM on my home server and have been playing around trying to find the optimal way to create an Ubuntu Server guest. I've used virt-manager (gui) and vmbuilder (cli) and can create vm's fine with either/both but I'd like the guests to meet the following requirements...
I've had varying results trying to achieve the above, for example...
Has anyone come up with any other approaches to this or can you help resolve some of the points I have listed as my "cons" against each tool above?
Thanks,
K
- Storage must use my LVM configured as a storage pool on virsh.
- The guest kernel must be the "virtual" variant and not the "generic" variant.
- Unattended install.
- All locale and keyboard configurations accurate for my needs (en_GB).
- Smallest guest install footprint possible.
I've had varying results trying to achieve the above, for example...
- vmbuilder pros
- Fast guest creation (network speed dependant)
- Can specify installation parameters in .vmbuilder.cfg to make creation nearly completely unattended.
- The required 3.2.0-53-virtual kernel is installed.
- Unattended for the most part.
- vmbuilder cons
- bug prevents the creation directly into an LVM, so far I can only create a .qcow2 image file which I then need to convert into raw format afterwards to put it on my LVM.
- Whilst I can configure the locale for the guest in the .vmbuilder.cfg file I can't find a way to preset the keyboard so need to complete a 'dpkg-reconfigure keyboard-configuration' on first login.
- bug prevents a scripted firstlogin process to correct the keyboard and other settings. (Unless root account login is enabled and used for first login.)
- bug prevents using an iso file locally as the install source.
- virt-manager pros
- Used a kickstart file to create an unattended installation.
- Created the guest directly within my LVM storage pool.
- All necessary locale and keyboard configurations correct as per the kickstart config.
- virt-manager cons
- I can't find a way to force the install to use a "virtual" kernel so "generic" kernel is installed and I have to change this manually post install.
- Not the fastest installation, certainly can live with it but was very noticeable in comparison with vmbuilder.
Has anyone come up with any other approaches to this or can you help resolve some of the points I have listed as my "cons" against each tool above?
Thanks,
K