Ask Your Question
1

Details about VM states

asked 2015-07-24 09:37:11 -0500

MikePs gravatar image

Hi,

I'm looking for detailed explanation of the VM state in OpenStack, especially what does running state means: when does OpenStack is able to detect that a VM is in this state ? Does that come from the hypervisor ?

Thanks

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2015-07-24 11:40:41 -0500

dbaxps gravatar image

updated 2015-07-24 11:49:19 -0500

Verification status via nova

[root@fedora22server ~(keystone_demo)]#nova list
+--------------------------------------+-------------+---------+------------+-------------+-----------------------------------+
| ID                                   | Name        | Status  | Task State | Power State | Networks                          |
+--------------------------------------+-------------+---------+------------+-------------+-----------------------------------+
| 93906a61-ec0b-481d-b964-2bb99d095646 | CentOS71RLX | ACTIVE  | -          | Running     | demo_net=50.0.0.21, 192.168.1.159 |
| b8c86865-d94d-4233-a542-ae083e103e98 | CirrOSDev   | SHUTOFF | -          | Shutdown    | demo_net=50.0.0.11, 192.168.1.151 |
| b93c9526-ded5-4b7a-ae3a-106b34317744 | VF22Devs    | SHUTOFF | -          | Shutdown    | demo_net=50.0.0.19, 192.168.1.157 |
| bef20a1e-3faa-4726-a301-73ca49666fa6 | WinSrv2012  | SHUTOFF | -          | Shutdown    | demo_net=50.0.0.16                |
+--------------------------------------+-------------+---------+------------+-------------+-----------------------------------+

Verification status via virsh ( libvirt tools )

[root@fedora22server ~(keystone_demo)]#virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     instance-0000000b              running
 -     instance-00000001              shut off
 -     instance-00000006              shut off
 -     instance-00000009              shut off

Verification status via OS . Qemu/kvm process from OS standpoint

[root@fedora22server ~(keystone_demo)]#ps -ef | grep instance-0000000b 
qemu     11696     1 99 10:57 ?        09:04:14 /usr/bin/qemu-system-x86_64 -machine accel=kvm -name instance-0000000b -S -machine pc-i440fx-2.3,accel=kvm,usb=off -cpu Haswell-noTSX,+abm,+pdpe1gb,+rdrand,+f16c,+osxsave,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 2048 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 93906a61-ec0b-481d-b964-2bb99d095646 -smbios type=1,manufacturer=Fedora Project,product=OpenStack Nova,version=2015.1.0-3.fc23,serial=f1b336b1-6abf-4180-865a-b6be5670352e,uuid=93906a61-ec0b-481d-b964-2bb99d095646 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/instance-0000000b.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/var/lib/nova/instances/93906a61-ec0b-481d-b964-2bb99d095646/disk,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=26,id=hostnet0,vhost=on,vhostfd=27 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:f3:34:ae,bus=pci.0,addr=0x3 -chardev file,id=charserial0,path=/var/lib/nova/instances/93906a61-ec0b-481d-b964-2bb99d095646/console.log -device isa-serial,chardev=charserial0,id=serial0 -chardev pty,id=charserial1 -device isa-serial,chardev=charserial1,id=serial1 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5900,addr=0.0.0.0,disable-ticketing,seamless-migration=on -k en-us -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -msg timestamp=on

Of course in case of Xen or Docker Hypervisor , from OS standpoint picture will be different.

[root@ServerCentOS71 ~(keystone_demo)]# docker ps
CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS              PORTS               NAMES
8cf9046840b1        tutum/fedora:latest   "/run.sh"           20 hours ago        Up 6 hours                              nova-9ce211c7-04b2-4da7-8709-8e23731d149d
edit flag offensive delete link more

Comments

Thanks for this information ! ;) It helps me understand the theory !

MikePs gravatar imageMikePs ( 2015-07-27 07:57:39 -0500 )edit
2

answered 2015-07-25 02:15:27 -0500

RHK gravatar image

updated 2015-07-25 23:42:38 -0500

Hi Mike,

Refer this link : https://wiki.openstack.org/wiki/VMState

Regards,
RHK

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2015-07-24 09:37:11 -0500

Seen: 197 times

Last updated: Jul 25 '15