Instance 启动过程详解
程序员文章站
2022-05-11 17:07:24
...
一 查看虚拟机命令
[[email protected] ~]# virsh list --all
Id Name State
----------------------------------------------------
1 instance-00000001 running
二 虚拟机配置文件查看
[[email protected] ~]# virsh edit 1
<domain type='qemu'>
<name>instance-00000001</name> //虚拟机名字
<uuid>8f492746-d49e-4fde-b87e-4cde2d4d1782</uuid> //虚拟机uuid
<metadata>
<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">;
<nova:package version="15.1.0-1.el7"/>
<nova:name>instance1</nova:name>
<nova:creationTime>2018-03-18 02:55:33</nova:creationTime>
<nova:flavor name="m1.tiny">
<nova:memory>512</nova:memory>
<nova:disk>1</nova:disk>
<nova:swap>0</nova:swap>
<nova:ephemeral>0</nova:ephemeral>
<nova:vcpus>1</nova:vcpus>
</nova:flavor>
<nova:owner>
<nova:user uuid="7ed4ce59626941478efb08c37cad526e">demo</nova:user>
<nova:project uuid="b38c09cb0b5a4d46820c66052bb0ee94">demo</nova:project>
</nova:owner>
</nova:instance>
</metadata>
<memory unit='KiB'>524288</memory> //虚拟机内存
<currentMemory unit='KiB'>524288</currentMemory> //虚拟机内存
<vcpu placement='static'>1</vcpu> //虚拟机CPU
<cputune>
<shares>1024</shares>
</cputune>
<sysinfo type='smbios'>
<system>
<entry name='manufacturer'>RDO</entry>
<entry name='product'>OpenStack Compute</entry>
<entry name='version'>15.1.0-1.el7</entry>
<entry name='serial'>69622dce-ad6c-4c40-8378-f3a512cacec8</entry>
<entry name='uuid'>8f492746-d49e-4fde-b87e-4cde2d4d1782</entry>
<entry name='family'>Virtual Machine</entry>
</system>
</sysinfo>
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.4.0'>hvm</type>
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cpu>
<topology sockets='1' cores='1' threads='1'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/disk/by-path/ip-192.168.0.120:3260-iscsi-iqn.2010-10.org.openstack:volume-8110a566-0e03-45c4-960b-f82162f5e554-lun-0'/>
<target dev='vda' bus='virtio'/>
<serial>8110a566-0e03-45c4-960b-f82162f5e554</serial>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
<controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<interface type='bridge'> //虚拟机的网卡描述
<mac address='fa:16:3e:60:27:b1'/>
<source bridge='qbr745a0cde-34'/>
<target dev='tap745a0cde-34'/>
<model type='virtio'/>
<driver name='qemu'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'> //虚拟机输入日志位置
<log file='/var/lib/nova/instances/8f492746-d49e-4fde-b87e-4cde2d4d1782/console.log' append='off'/>
<target port='0'/>
</serial>
<console type='pty'>
<log file='/var/lib/nova/instances/8f492746-d49e-4fde-b87e-4cde2d4d1782/console.log' append='off'/>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'>
<address type='usb' bus='0' port='1'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<stats period='10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
三 显示虚拟机对应的端口号
[[email protected] ~]# virsh vncdisplay 1
:0
四 虚拟机保存位置
上一篇: docker学习笔记(持续更新)
下一篇: openstack VNC无法使用