如何动态更换一个虚机CDROM的ISO镜像

来源:互联网 发布:淘宝点阿里旺旺没反应 编辑:程序博客网 时间:2024/05/28 16:23
Use xm block-list <domid> to find the cdrom be-path for the domain, for example: 
localhost:~# xm block-list 3
Vdev  BE handle state evt-ch ring-ref BE-path
768    0    0     1      -1     -1    /local/domain/0/backend/vbd/3/768  
5632   0    0     1      -1     -1    /local/domain/0/backend/vbd/3/5632 
Having identified the cdrom device (5632) you can check what iso image it is connected to: 
localhost:~# xenstore-read /local/domain/0/backend/vbd/3/5632/params
/root/win/win.ISO
To connect a new iso image: 
xenstore-write local/domain/0/backend/vbd/3/5632/params /mnt/new.iso 
And you can now see that it is connected: 
xenstore-read /local/domain/0/backend/vbd/3/5632/params /mnt/new.iso 
This method works with both emulated devices and with gplpv drivers. 
原创粉丝点击