Version 10 (modified by 13 years ago) ( diff ) | ,
---|
This page documents the procedure for creating a new KVM guest on a mayfirst server.
This document is not complete! Do not use it to actually create a new KVM guest yet.
Creating a new KVM guest
- Install the kvm-manager scripts
- Run kvm-creator to create the new LV for the guest and the needed directory and files in /etc/sv/kvm/:
USAGE: kvm-creator create|destroy|demo guestname [volumegroup [disksize [ram [tap [mac] ] ] ]
- Add at least one user to the access list for the new KVM guest's serial console
- Monkeysphere way:
- Add a uid to the /home/<guestname>/.monkeysphere/authorized_user_ids file
- Rebuild the monkeysphere-controlled SSH authorized_keys files:
monkeysphere-authentication update-users
- SSH key way
- Add an SSH key to the /home/<guestname>/.ssh/authorized_keys file
- Monkeysphere way:
- If you are installing an operating system to the new KVM guest:
- Put the iso in the
/usr/local/share/ISOs
directory. Be sure to verify the checksums on downloaded ISOs! - Customize the iso with details for the server you are installing
- First edit /root/server-specifics.cfg - change values to match the server you are building
- Change into /usr/local/share/ISOs:
cd /usr/local/share/ISOs
- Run:
di-maker install.iso /root/preseed.cfg /root/server-specifics.cfg /root/late-command
- Create a symlink called cd.iso in the /home/<guestname>/vms/<guestname>/ directory with a target of the desired ISO:
ln -s /usr/local/share/ISOs/<some-installer>.iso /home/<guestname/vms/<guestname>/cd.iso
- Put the iso in the
- Tell runit to start the guest automatically
update-service --add /etc/sv/kvm/SERVER-NAME
- Log into the new guest via ssh:
ssh SERVER-NAME@HOST-NAME
- Install an OS: everything should be handled by preseed file
Note:
See TracWiki
for help on using the wiki.