Wednesday, August 23, 2017

ODA: starting Guest VM, got Domain 'VM_NAME' does not exist

After we applied the patch 12.1.2.11.0 to our ODA X-5, we can't start our guest VM:
$ oakcli start vm vm4

OAKERR:7007 Error encountered while starting VM - Error: Domain '<VM_NAME>' does not exist.

Domain, guest and virtual machine are often used interchangeably, but there are subtle differences. A domain is a configurable set of resources, including memory, virtual CPUs, network devices and disk devices, in which virtual machines run. So first, let's take a look of the vm.cfg:

$ oakcli show vm vm4
The Resource is : vm4
        AutoStart       :       restore
        CPUPriority     :       100
        Disks           :       |file:/OVS/Repositories/apexrepo/.A
                                CFS/snaps/vm4/VirtualMach
                                ines/vm4/1e5f4bcd6d6948f0
                                a177595b260de280.img,xvda,w|
        Domain          :       XEN_PVM
        DriverDomain    :       False
        ExpectedState   :       offline
        FailOver        :       false
        IsSharedRepo    :       true
        Keyboard        :       en-us
        MaxMemory       :       2048M
        MaxVcpu         :       2
        Memory          :       2048M
        Mouse           :       OS_DEFAULT
        Name            :       vm4
        Networks        :
        NodeNumStart    :       0
        OS              :       OL_5
        PrefNodeNum     :       0
        PrivateIP       :       None
        ProcessorCap    :       100
        RepoName        :       apexrepo
        State           :       Offline
        TemplateName    :       otml_OL6U7_PVHVM
        VDisks          :       |oakvdk_vm4_vdisk0_apexre
                                po||oakvdk_vm4_vswap_apex
                                repo|
        Vcpu            :       2
        cpupool         :       default-unpinned-pool
        vncport         :       None

ok, easy fix, right?

find out the vlan:
$ oakcli show vlan

reconfigure the interface:
$ oakcli configure vm vm4 -network "['bridge=vlan914b1']"

also, check your vm.cfg, if you have extra=.... line, remove it:

cat vm.cfg:

vif = ['']
name = 'vm4'
extra = 'NODENAME=vm4' >>>>>>>>>> This needs to be deleted and then vm can be started on 12.1.2.11
builder = 'hvm'
cpus = '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23'
vcpus = 2
memory = 2048
cpu_cap = 0
vnc = 1
serial = 'pty'
disk =
[u'file:/OVS/Repositories/odarepo1/VirtualMachines/vm4/68c32afe2ba8493e89f018a970c644ea.img,xvda,w']
maxvcpus = 2
maxmem = 2048


now, try again:

$ oakcli start vm vm4

Started VM : vm4 on Node Number : 0

Reference:  Doc ID 2285306.1