kvm attach iso

来源:互联网 发布:谷歌版coc数据 编辑:程序博客网 时间:2024/06/05 00:47
使用 ISO .


~~~{.xml}
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source dev='/var/iso/w2008.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
~~~


也可以先在 domain 配置中加:


~~~{.xml}
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide' tray='open'/>
      <readonly/>
    </disk>
~~~


然后运行命令:


~~~{.console}
virsh attach-disk i-1 /var/iso/w2008.iso hdc --type cdrom --mode readonly
~~~
原创粉丝点击