Database Reference
In-Depth Information
3.
Connect to the Dom0 as root on the same ODA node where the existing VM is configured,
and package the VM in a tarball . The existing VMs are located in /OVS/Repositories/
odarepo1/VirtualMachines/{VM name} on the first ODA node and /OVS/Repositories/
odarepo2/VirtualMachines/{VM name} on the second ODA node. For example:
[root@ovs-host1 ~]# cd /OVS/Repositories/odarepo1/VirtualMachines/oevm1
[root@ovs-host1 oevm1]# ls -lh
total 13G
-rw-r--r-- 1 root root 12G Oct 24 07:09 15574aa1d9f24f57b44bc6045d924cff.img
-rw-r--r-- 1 root root 350 Sep 2 10:03 vm.cfg
[root@ovs-host1 oevm1]# tar -cvzf /OVS/oevm1_clone.tgz ./*
./15574aa1d9f24f57b44bc6045d924cff.img
./vm.cfg
4.
Copy the tarball to the Dom0 on the second ODA node:
[root@ovs-host1 oevm1]# scp /OVS/oevm1_clone.tgz 10.177.0.59:/OVS/
oevm1_clone.tgz 100% 4700MB 47.5MB/s 01:39
5.
Once the tarball is copied to the second Dom0, you can import it as a template in the
repository on the other node. This step can be executed on any of ODA Base nodes; it
doesn't have to be the same node to which you copied the tarball. Here are the commands
to execute:
[root@s1 ~]# oakcli import vmtemplate oevm1_tmp -files /OVS/oevm1_clone.tgz -repo odarepo2
Imported VM Template
6.
Create a new VM by cloning the template, and then start it up:
[root@s1 ~]# oakcli clone vm oevm2 -vmtemplate oevm1_tmp -repo odarepo2
Cloned VM : oevm2
[root@s1 ~]# oakcli start vm oevm2
Started VM : oevm2
[root@s1 ~]# oakcli show vm
NAME MEMORY VCPU STATE REPOSITORY
oevm1 12288 4 OFFLINE odarepo1
oevm2 12288 4 ONLINE odarepo2
7.
Both VMs are now configured with the same hostname and IP. You need to change the
configuration before both VMs can be started at the same time. I find the easiest way of
doing this is by adjusting the configuration files /etc/sysconfig/network and /etc/
sysconfig/network-scripts/ifcfg-eth0 , and then bouncing the VM. Additionally,
depending on the configuration of the name resolution that you have chosen to
implement, the host file may need to be adjusted. Here's an example of what to do:
[root@oevm1 ~]# grep HOSTNAME /etc/sysconfig/network
HOSTNAME=oevm1.odalab.com
[root@oevm1 ~]# vi /etc/sysconfig/network
[root@oevm1 ~]# grep HOSTNAME /etc/sysconfig/network
HOSTNAME=oevm2.odalab.com
Search WWH ::




Custom Search