Planning
- IP Address: 192.168.1.123
- MAC Address for ETH0: 00:16:3E:00:00:14
- VNC console port: 23
- O/S: Ubuntu 16.04
The IP resources and VM resources pages have been updated to reflect this.
VM Configuration File
The configuration file, allawah.cfg, is created in the /OVS/runningpool/ALLAWAH directory on VICTORIA.
# ===================================================================== # Guest configuration for ALLAWAH # Minimal CLI server for Ubuntu # Generated 2021-02-02 12:42:00 # ===================================================================== # # This is a fairly minimal example of what is required for an # HVM guest. For a more complete guide see xl.cfg(5) # This configures a HVM guest builder="hvm" # This configures a PV guest # type="PV" # bootloader="pygrub" # Guest name name = "allawah" # Device model device_model_version="qemu-xen" vendor_device="xenserver" # 128-bit UUID for the domain as a hexadecimal number. # Use "uuidgen" to generate one if required. uuid = "e3626fd7-1b30-4473-9c97-76fc69648c9e" # Initial memory allocation (MB) memory = 2050 # Number of VCPUS vcpus = 1 pool = "Client" # Network devices # A list of 'vifspec' entries as described in # docs/misc/xl-network-configuration.markdown vif = [ 'mac=00:16:3E:00:00:14,bridge=xenbr0' ] # Disk Devices # A list of 'diskspec' entries as described in # docs/misc/xl-disk-configuration.txt disk = [ '/OVS/running_pool/ALLAWAH/root.dsk,raw,xvda,rw' ,'/OVS/iso_pool/ubuntu-16.04.3-server-amd64.iso,raw,xvdc,ro,cdrom' ] # Guest VGA console configuration, either SDL or VNC vnc = 1 vnclisten = "0.0.0.0" vncdisplay = "23" # Fix for full-screen cursor usb=1 usbdevice=["tablet"] # New Features in Xen 4.4.0 # always emulate tsc_mode="default"
Set Host Name
Used the following command to set the host name:
sudo hostnamectl set-hostname allawah.yaocm.id.au
Edit Network Settings
The default setting for the main NIC (eth0) is to use DHCP. I need a static IP address because this is a server.
Update Configuration File
The network configuration file, /etc/network/interfaces, had the following changes made:
# The primary network interface auto eth0 #iface eth0 inet dhcp iface eth0 inet static address 192.168.1.123 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameserver 192.168.1.252 dns-nameserver 192.168.1.1 dns-search yaocm.id.au
Restart Interface
Using the VNC connection, I issued the following commands:
sudo ifdown eth0 sudo ifup eth0
Validate Network Settings
The network settings were validated as follows:
ip addr show eth0
The output was:
2: eth0: <broadcast,multicast,up,lower_up> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:16:3e:00:00:14 brd ff:ff:ff:ff:ff:ff inet 192.168.1.123/24 brd 192.168.1.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::216:3eff:fe00:14/64 scope link valid_lft forever preferred_lft forever root@allawah:~# cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 192.168.1.252 nameserver 192.168.1.1 search yaocm.id.au </broadcast,multicast,up,lower_up>
Install Ansible
Followed the procedure described in "Installing Ansible on Ubuntu":
sudo apt -y update sudo apt -y install software-properties-common sudo apt-add-repository --yes --update ppa:ansible/ansible sudo apt -y install ansible
Verify Ansible Version
I ran the following command as root:
ansible --version
The output was:
ansible 2.9.17 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.12 (default, Oct 5 2020, 13:56:01) [GCC 5.4.0 20160609]