红联Linux门户
Linux帮助

KVM虚拟机在线更改iso

发布时间:2014-08-19 09:26:06来源:linux网站作者:tonychiu

解释:guest01代表需更改的虚机名,*.iso为需添加的iso

如果报错:virsh # attach-disk ICCS-PM /gfs/sysdisk/installdisk-pool/cn_win_srv_2003_r2_enterprise_with_sp2_vl_cd2.iso hdc --driver file --type cdrom --mode readonly

错误:Failed to attach disk

错误:internal error unsupported driver name 'file' for disk '/gfs/sysdisk/installdisk-pool/cn_win_srv_2003_r2_enterprise_with_sp2_vl_cd2.iso'

取消--driver file参数即可


Add CDROM:

#virsh

attach-disk guest01 /root/disc1.iso hdc --driver file --type cdrom

--mode readonly

Change CDROM:

attach-disk guest01 /root/disc2.iso hdc --driver file --type cdrom

--mode readonly

Remove CDROM:

attach-disk guest01 " " hdc --driver file --type cdrom

--mode readonly