Virtualization quickstart » History » Revision 6
Option 1: Using libvirt and Virtual Machine Manager on a Fedora 25 machine:¶
Install the following packages:
$ sudo dnf install libvirt qemu-kvm kvm libguestfs-tools virt-install
Then, download an image for the OS you want to run in your VM.
Here is a link to download an .iso for Fedora 26:
To launch "Virtual Machine Manager" press Super key and search "Virtual Machine Manager"
1) File -> New Virtual Machine
2) Local install media
* use file browser to find your downloaded image
3) accept default settings
SETTING UP THE VM:¶
- Start the VM with the "play button"
- Choose to install fedora:
- set hostname: give it a name other than localhost.
- make it meaningful
- set root password (weak one is OK)
- if you make a user, make sure to give them sudo access
If you forgot to make "admin" have sudo access:
Once VM is running, go to terminal and switch to root
[root@VM0 admin]# gpasswd --add admin wheel
`localhost` is a BAD hostname. Each of your VMs should have a unique hostname. If > you have cloned this VM from another, it will have the same hostname. This needs to change
It is imperative that you change your hostname before installing any pulp components, as they use the hostname and can produce undefined behavior if the hostname is changed after the fact.
See your current hostname with:
$ echo $HOSTNAME
To change your hostname, run
$ sudo hostnamectl set-hostname DESIRED_NAME
SETTING UP ANSIBLE (on the VM):¶
Install the ansible package:
$ sudo dnf install ansible git
For documentation see http://docs.ansible.com/
Download the pulp_packaging repo:
$ git clone https://github.com/pulp/pulp_packaging.git
Now we need to make a
hosts file for ansible. Use the results of the
hostname command in the place of 'localhost':
$ cd pulp_packaging/ci/ansible $ cat > hosts <<EOF > $(hostname) > EOF
Choosing what version of pulp to install¶
To choose the version of pulp that you will install, edit the file:
-e pulp_version=2.14 -e pulp_build=nightly in the ansible-playbook invocation.
OR in hosts file, specify pulp_version and pulp_build on the same line as hostname, i.e.
Nameofhost pulp_version=2.14 pulp_build=nightly
Now you are ready to run the ansible playbook:
$ sudo ansible-playbook -i hosts -e ansible_connection=local pulp_server.yaml