Overview
Since I struck a problem with a multipath device being created on an unused partition (see 09 Upgrade to OVMS 3.4.4 ), I was not able to create the /OVS file system. I had to re-install OVMS again.
References
- Oracle VM 3.4
- VICTORIA
- Michael Kerrisk - man7.org
Procedure
Install OVMS 3.4.4
Following the procedure in 2.1.2 Installing Oracle VM Server From a DVD-ROM , I generated the following partial Kickstart installation file (found in /root/anaconda-ks.cfg ):
install
cdrom
lang en_US.UTF-8
keyboard us
network --onboot yes --device eth0 --bootproto static --ip 192.168.1.100 --netmask 255.255.255.0 --noipv6 --nameserver 192.168.1.1,192.168.1.252 --hostname victoria
ovsagent --iscrypted **********************************************************************************************************
ovsmgmntif eth0
rootpw --iscrypted **********************************************************************************************************
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --disabled
timezone --utc Australia/Sydney
bootloader --location=mbr --driveorder=sda --append="rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --all --drives=sda
#part /boot --fstype=ext4 --size=500
#part /OVS --fstype=ext4 --grow --size=894432
#part / --fstype=ext4 --grow --maxsize=51200 --size=4096
#part swap --grow --maxsize=7736 --size=1024
This was generated (in part) through choosing Create custom layout under Disk Partition Layout .
This enabled me to create the /OVS file system on its own disk partition.
Create Bridges
Following the procedure in 07 Set Up XEN Network , I ran the following commands to create the four (4) bridges that support the networks used by the VM images:
cd /etc/sysconfig/network-scripts for bridge in 0 1 2 3 do nw=$(((bridge + 1))) bridgename="xenbr${bridge}" # ==== Create bridge cat <<DONE >ifcfg-${bridgename} # ----------------------------------------------------------------------------- # Bridge ${bridgename} # Generated $(date +"%F %T") # ----------------------------------------------------------------------------- # Device identification DEVICE="${bridgename}" UUID="$(uuidgen)" # Device options BOOTPROTO="static" TYPE="Bridge" ONBOOT="yes" DELAY="0" NM_CONTROLLED="no" # IPV4 Networking IPADDR="192.168.${nw}.100" NETMASK="255.255.255.0" GATEWAY="192.168.1.1" # DNS DNS1="192.168.1.252" DNS2="192.168.1.1" PEERDNS="yes" DOMAIN="yaocm.id.au" DONE done
Attach XENBR0 Bridge to ETH0
Attached the xenbr0 bridge to the eth0 NIC as follows:
cd /etc/sysconfig/network-scripts cat >>ifcfg-eth0 <<DONE # Bridge BRIDGE="xenbr0" DONE
Create Sub-Interfaces on ETH1 and Attach Other Bridges
Create three (3) sub-interfaces on the eth1 NIC and attach the last three (3) bridges to each of them:
cd /etc/sysconfig/network-scripts for subif in 1 2 3 do bridge=${subif} ifname="eth1:${subif}" bridgename="xenbr${bridge}" # ==== Create subinterface cat <<DONE >ifcfg-${ifname} # ----------------------------------------------------------------------------- # Sub-interface #${subif} on eth1 to support bridge ${bridgename} # Generated $(date +"%F %T") # ----------------------------------------------------------------------------- # Device identification DEVICE="${ifname}" UUID="$(uuidgen)" $(grep HWADDR ifcfg-eth1) # Device options ONPARENT="yes" TYPE="Ethernet" MTU="9000" ONBOOT="yes" NM_CONTROLLED="no" # Bridge BRIDGE="${bridgename}" DONE done
Restore VM Images
The VMs that were saved from VICTORIA, were restored using the following commands:
cd / tar -xvzf running_pool.tgz tar -xvzf iso_pool.tgz