cloudstack-users-cn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloudstackfqa2013 <cloudstackfqa2...@163.com>
Subject 回复: 回复: 请问cloudstack + KVM 部署好后,创建的系统VM与用户VM都放在哪个目录下
Date Thu, 05 Dec 2013 09:37:29 GMT
您好:
      你说的cloudstack 用户虚拟机的img 镜像是放在主存储在没错,但是cloudstack
系统VM是放在KVM宿主机上的。
下面是我找到的过程:
但是 cloudstack + kvm(libvirt) 是使用kvm (libvirt)作为虚拟机支撑,是在宿主机上是有一个XML文件(虚拟机的描述文件)
我要找的就是这个文件,我想通过此XML来查看cloudstack 产生的两个系统VM
的一些信息(如网卡配置,USB配置等),现在我找到的,
其目录是在/var/run/libvirt/qemu 下。如
[root@agent-kvm qemu]# ls
s-93-VM.pid  s-93-VM.xml  v-94-VM.pid  v-94-VM.xml

如
s-93-VM.xml 文件内容如下,如果你对 KVM 很熟悉的话,就可以看到这个cloudstack
系统VM 的各种配置。
当然,有时部署碰到 系统VM 无法创建成功,就是因为 /var/lib/libvirt/qemu/
下有一些没清除的内容,造成的。
如下面的XML 文件,就很清楚的告诉你,cloudstack系统VM是没放在主存储上,而放在宿主机上的目录:'/mnt/b3628db3-e670-34e4-bcbf-d194b8075c9a/048dd252-5db4-4ed6-b9df-52b858ed0a3d'/

<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE 
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit s-93-VM
or other application using the libvirt API.
-->

<domstatus state='running' reason='booted' pid='8381'>
  <taint flag='high-privileges'/>
  <monitor path='/var/lib/libvirt/qemu/s-93-VM.monitor' json='1' type='unix'/>
  <vcpus>
    <vcpu pid='8466'/>
  </vcpus>
  <qemuCaps>
    <flag name='vnc-colon'/>
    <flag name='no-reboot'/>
    <flag name='drive'/>
    <flag name='name'/>
    <flag name='uuid'/>
    <flag name='vnet-hdr'/>
    <flag name='migrate-qemu-tcp'/>
    <flag name='migrate-qemu-exec'/>
    <flag name='drive-cache-v2'/>
    <flag name='kvm'/>
    <flag name='drive-format'/>
    <flag name='vga'/>
    <flag name='0.10'/>
    <flag name='pci-device'/>
    <flag name='mem-path'/>
    <flag name='drive-serial'/>
    <flag name='migrate-qemu-unix'/>
    <flag name='chardev'/>
    <flag name='enable-kvm'/>
    <flag name='monitor-json'/>
    <flag name='balloon'/>
    <flag name='device'/>
    <flag name='smp-topology'/>
    <flag name='netdev'/>
    <flag name='rtc'/>
    <flag name='vhost-net'/>
    <flag name='no-kvm-pit'/>
    <flag name='tdf'/>
    <flag name='pci-configfd'/>
    <flag name='nodefconfig'/>
    <flag name='boot-menu'/>
    <flag name='name-process'/>
    <flag name='drive-readonly'/>
    <flag name='smbios-type'/>
    <flag name='vga-qxl'/>
    <flag name='spice'/>
    <flag name='vga-none'/>
    <flag name='migrate-qemu-fd'/>
    <flag name='boot-index'/>
    <flag name='hda-duplex'/>
    <flag name='drive-aio'/>
    <flag name='pci-multibus'/>
    <flag name='pci-bootindex'/>
    <flag name='ccid-passthru'/>
    <flag name='chardev-spicevmc'/>
    <flag name='virtio-tx-alg'/>
    <flag name='device-qxl-vga'/>
    <flag name='pci-multifunction'/>
    <flag name='virtio-blk-pci.ioeventfd'/>
    <flag name='sga'/>
    <flag name='virtio-blk-pci.event_idx'/>
    <flag name='virtio-net-pci.event_idx'/>
    <flag name='piix3-usb-uhci'/>
    <flag name='piix4-usb-uhci'/>
    <flag name='usb-ehci'/>
    <flag name='ich9-usb-ehci1'/>
    <flag name='usb-redir'/>
    <flag name='usb-hub'/>
    <flag name='no-shutdown'/>
    <flag name='cache-unsafe'/>
    <flag name='rombar'/>
    <flag name='no-acpi'/>
    <flag name='virtio-blk-pci.scsi'/>
    <flag name='blk-sg-io'/>
    <flag name='drive-copy-on-read'/>
    <flag name='cpu-host'/>
    <flag name='system_wakeup'/>
    <flag name='scsi-disk.channel'/>
    <flag name='scsi-block'/>
    <flag name='block-job-async'/>
    <flag name='scsi-cd'/>
    <flag name='hda-micro'/>
    <flag name='dump-guest-memory'/>
    <flag name='balloon-event'/>
    <flag name='virtio-scsi-pci'/>
    <flag name='blockio'/>
    <flag name='disable-s3'/>
    <flag name='disable-s4'/>
    <flag name='usb-redir.filter'/>
    <flag name='ide-drive.wwn'/>
    <flag name='scsi-disk.wwn'/>
    <flag name='reboot-timeout'/>
    <flag name='dump-guest-core'/>
    <flag name='seamless-migration'/>
    <flag name='disable-ksm'/>
    <flag name='virtio-net-pci.__com_redhat_macvtap_compat'/>
    <flag name='qxl'/>
    <flag name='VGA'/>
    <flag name='cirrus-vga'/>
    <flag name='ipv6-migration'/>
  </qemuCaps>
  <domain type='kvm' id='4'>
    <name>s-93-VM</name>
    <uuid>14bbc1df-9578-38b4-928f-237f353547cf</uuid>
    <description>Debian GNU/Linux 5.0 (32-bit)</description>
    <memory unit='KiB'>262144</memory>
    <currentMemory unit='KiB'>262144</currentMemory>
    <vcpu placement='static'>1</vcpu>
    <cputune>
      <shares>500</shares>
    </cputune>
    <os>
      <type arch='x86_64' machine='rhel6.4.0'>hvm</type>
      <boot dev='cdrom'/>
      <boot dev='hd'/>
    </os>
    <features>
      <acpi/>
      <apic/>
      <pae/>
    </features>
    <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='file' device='disk'>
        <driver name='qemu' type='qcow2' cache='none'/>
        <source file='/mnt/b3628db3-e670-34e4-bcbf-d194b8075c9a/048dd252-5db4-4ed6-b9df-52b858ed0a3d'/>
        <target dev='vda' bus='virtio'/>
        <alias name='virtio-disk0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='none'/>
        <source file='/mnt/b3628db3-e670-34e4-bcbf-d194b8075c9a/s-93-VM-patchdisk'/>
        <target dev='vdb' bus='virtio'/>
        <alias name='virtio-disk1'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
      </disk>
      <disk type='file' device='cdrom'>
        <driver name='qemu' type='raw' cache='none'/>
        <source file='/usr/share/cloudstack-common/vms/systemvm.iso'/>
        <target dev='hdc' bus='ide'/>
        <readonly/>
        <alias name='ide0-1-0'/>
        <address type='drive' controller='0' bus='1' target='0' unit='0'/>
      </disk>
      <controller type='usb' index='0'>
        <alias name='usb0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
      </controller>
      <controller type='ide' index='0'>
        <alias name='ide0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
      </controller>
      <interface type='bridge'>
        <mac address='0e:00:a9:fe:01:84'/>
        <source bridge='cloud0'/>
        <target dev='vnet0'/>
        <model type='virtio'/>
        <alias name='net0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
      </interface>
      <interface type='bridge'>
        <mac address='06:d8:a6:00:01:18'/>
        <source bridge='cloudbr0'/>
        <target dev='vnet1'/>
        <model type='virtio'/>
        <alias name='net1'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
      </interface>
      <interface type='bridge'>
        <mac address='06:67:44:00:00:9b'/>
        <source bridge='cloudbr0'/>
        <target dev='vnet2'/>
        <model type='virtio'/>
        <alias name='net2'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
      </interface>
      <interface type='bridge'>
        <mac address='06:d1:e6:00:01:02'/>
        <source bridge='cloudbr0'/>
        <target dev='vnet3'/>
        <model type='virtio'/>
        <alias name='net3'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
      </interface>
      <serial type='pty'>
        <source path='/dev/pts/7'/>
        <target port='0'/>
        <alias name='serial0'/>
      </serial>
      <console type='pty' tty='/dev/pts/7'>
        <source path='/dev/pts/7'/>
        <target type='serial' port='0'/>
        <alias name='serial0'/>
      </console>
      <input type='tablet' bus='usb'>
        <alias name='input0'/>
      </input>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' port='5901' autoport='yes' listen='0.0.0.0'>
        <listen type='address' address='0.0.0.0'/>
      </graphics>
      <video>
        <model type='cirrus' vram='9216' heads='1'/>
        <alias name='video0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
      </video>
      <memballoon model='virtio'>
        <alias name='balloon0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
      </memballoon>
    </devices>
    <seclabel type='none'/>
  </domain>
</domstatus>




cloudstackfqa2013

发件人: wanghaicheng2004@126.com
发送时间: 2013-12-05 17:05
收件人: users-cn; cloudstackfqa2013
主题: 回复: 回复: 请问cloudstack + KVM 部署好后,创建的系统VM与用户VM都放在哪个目录下
兄弟,如果CS没有启用本地存储,那么VM应该是存放到主存储中的,可以通过数据库查询相应的虚拟机的保存位置。只有当你玩单机的KVM时,你的VM默认才在你说的那个目录下




wanghaicheng2004@126.com

发件人: cloudstackfqa2013
发送时间: 2013-12-05 16:59
收件人: users-cn
主题: 回复: 请问cloudstack + KVM 部署好后,创建的系统VM与用户VM都放在哪个目录下
您好:
      我找到了,给自己顶一下。




cloudstackfqa2013

发件人: cloudstackfqa2013
发送时间: 2013-12-05 16:51
收件人: users-cn
主题: 请问cloudstack + KVM 部署好后,创建的系统VM与用户VM都放在哪个目录下
您好:

     请问cloudstack + KVM 部署好后,创建的系统VM与用户VM都放在哪个目录下
,
玩过KVM 的人都知道,KVM 产生的虚拟机是在 /var/lib/libvirt/qemu 或
/etc/libvirt/qemu 下有XML文件的对应的虚拟机。
请问cloudstack + KVM 创建的VM 在哪个目录呢?





cloudstackfqa2013
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message