歡迎您光臨本站 註冊首頁

在XEN中安裝guest os時如何換ISO

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

在XEN中安裝guest os時如何換ISO

在XEN中完全虛擬化一個機器(我機器支持VT的),我用本地一個目錄中的ISO文件,但是系統通常都是有多個ISO的,在第一個ISO安裝完之後提示換第二張光碟,應該怎麼換呢?本來想可能過一段時間他就可以自己換了,可是還是不行.想SHUTDOWN了換個路徑,但是失敗了,SHUTDOWN就起不來了.在網上找了很多也不知道到底怎麼做,所以來麻煩大家了,望幫忙.

另外加一問如何用XEN複製本虛擬平台的系統?
《解決方案》

Hi, 換 ISO 的問題,可以試試 xm 的 block-attach 和 block-detach參數。具體請看:

$ man xm


在 man 手冊里給出了例子的:

block-attach domain-id be-dev fe-dev mode
           Create a new virtual block device.  This will trigger a hotplug event for the guest
           OPTIONS

           domain-id
               The domain id of the guest domain that the device will be attached to.

           be-dev
               The device in the backend domain (usually domain 0) to be exported.  This can be specified
               as a physical partition (phy:sda7) or as a file mounted as loopback
               (file://path/to/loop.iso).

           fe-dev
               How the device should be presented to the guest domain.  It can be specified as either a
               symbolic name, such as /dev/hdc, for common devices, or by device id, such as 0x1400
               (/dev/hdc device id in hex).

           mode
               The access mode for the device from the guest domain.  Supported modes are rw (read/write)
               or ro (read-only).

           bedomain-id
               The back end domain hosting the device.  This defaults to domain 0.

           EXAMPLES

           Mount an ISO as a Disk
               xm block-attach guestdomain file://path/to/dsl-2.0RC2.iso /dev/hdc ro

               This will mount the dsl iso as /dev/hdc in the guestdomain as a read only device.  This
               will probably not be detected as a cdrom by the guest, but mounting /dev/hdc manually will
               work.

       block-detach domain-id devid
           Destroy a domain』s virtual block device. devid must be the device id given to the device by
           domain 0.  You will need to run xm block-list to determine that number.

[火星人 ] 在XEN中安裝guest os時如何換ISO已經有955次圍觀

http://coctec.com/docs/service/show-post-8094.html