真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

虛擬機(jī)磁盤移動(dòng)位置后失效解決辦法-創(chuàng)新互聯(lián)

http://forums.gentoo.org/viewtopic-t-908100-start-0.html 虛擬機(jī)磁盤移動(dòng)位置后失效解決辦法

i have been using VirtualBox for W7 on my Gentoo machine, without any problems for quite some time.

I have given my virtual disk /mnt/w7/Windows_7.vdi a separate partition /dev/hda1 of size 26 GB. Now the size of the virtual disk has grown and I need more disk space. I have installed a new SATA SSD of size 120 GB an mounted it under /mnt/vb_w7/

My intention has been to move the virtual disk to the new SSD. I did the follwing steps to move the virtual disk:

1. cloned the virtual disk to the new location

創(chuàng)新互聯(lián)憑借專業(yè)的設(shè)計(jì)團(tuán)隊(duì)扎實(shí)的技術(shù)支持、優(yōu)質(zhì)高效的服務(wù)意識(shí)和豐厚的資源優(yōu)勢(shì),提供專業(yè)的網(wǎng)站策劃、成都做網(wǎng)站、網(wǎng)站制作、網(wǎng)站優(yōu)化、軟件開發(fā)、網(wǎng)站改版等服務(wù),在成都十年的網(wǎng)站建設(shè)設(shè)計(jì)經(jīng)驗(yàn),為成都數(shù)千家中小型企業(yè)策劃設(shè)計(jì)了網(wǎng)站。
代碼:
# /opt/bin/VBoxManage clonehd /mnt/w7/Windows_7.vdi /mnt/vb_w7/Windows_7.vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 0c0f2877-96e9-4455-8629-58957d70ee23

2. Released the old virtual disk, through the VB GUI

代碼:
Menu -> Virtual Media Manager -> Right Click -> Release

3. Choose the new location of the (cloned) virtual disk, through the VB GUI

代碼:
Settings -> Storage -> Click on SATA Controller -> Right Click and Add Hard Disk -> Choose Existing disk -> brows to the new virtual disk location/mnt/vb_w7/Windows_7.vdi) -> Open

Here I get an error message from VirtualBox:

引用:
"Failed to open the hard disk /mnt/vb_w7/Windows_7.vdi
The medium '/mnt/vb_w7/Windows_7.vdi' can't be used as requested device type.
Details:
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Medium
Interface: IMedium
{9edda847-1279-4b0a-9af7-9d66251ccc18}
Callee:
IVirtualBox {d2de270c-1d4b-4c9e-843f-bbb9b47269ff}

I have done the steps according to the VB Manual. I have unfortunately no clue how to solve this.

When I examine the original virtual disk (/mnt/w7/Windows_7.vdi) and the cloned one (/mnt/vb_w7/Windows_7.vdi) the cloned one seems OK with the VBoxManage tool:

代碼:
phils_pc philip # /opt/bin/VBoxManage showhdinfo /mnt/w7/Windows_7.vdi
UUID:         5fce96ff-44d9-485d-93b1-c6d873a6ef90
Accessible:      yes
Logical size:     20480 MBytes
Current size on disk: 20480 MBytes
Type:         normal (base)
Storage format:    VDI
Format variant:    fixed default
Location:       /mnt/w7/Windows_7.vdi

and

代碼:
phils_pc philip # /opt/bin/VBoxManage showhdinfo /mnt/vb_w7/Windows_7.vdi
UUID:         0c0f2877-96e9-4455-8629-58957d70ee23
Accessible:      yes
Logical size:     20480 MBytes
Current size on disk: 19668 MBytes
Type:         normal (base)
Storage format:    VDI
Format variant:    dynamic default
Location:       /mnt/vb_w7/Windows_7.vdi

S O L V E D:

The problem was that the permissions for the virtual disk file was changed when cloning the disk.

Here are the complete sequence, in 6 steps, for a successful change of location for the virtual machine files and the virtual disk:

Original location /mnt/w7 (on /dev/hda1) and destination /mnt/vb_w7/ (on /dev/sda1)

Step 1:
Use the VBoxManage tool to clone the virtual disk in order to provide it a new UUID. Give the cloned disk a new name in the same step

代碼:
/opt/bin/VBoxManage clonehd /mnt/w7/Windows_7.vdi /mnt/vb_w7/Win_7.vdi

Just copy the file to the new location does not work, because VirtualBox needs a unique UUID for the virtual disk file.
New UUID is: 14a33a14-cac3-4e5b-ae13-72f33be7181b

Step 2:
Modify the permission right to the file (virtual disk)

代碼:
# chmod 777 /mnt/vb_w7/Win_7.vdi

in order for VirtualBox to recognize the file as a disk

Step 3:
Expand the capacity of the virtual disk to 100 GB (102400 MB)

代碼:
# cp /mnt/w7/Windows 7/ /mnt/vb_w7/

Step 4:
Re-configure the virtual machine (named Window 7) to point to the new directory and to attach the cloned disk
In the VirtualBox GUI:

代碼:
Menu -> Virtual Media Manager -> Right Click -> Release

and 

代碼:

Settings -> Storage -> Click on SATA Controller -> Right Click and Add Hard Disk -> Choose Existing disk -> brows to the new virtual disk location/mnt/vb_w7/Win_7.vdi) -> Open

Step 5:
Re-configure the virtual machin (named “Windows 7” in my case) to point to the new directory for the snapshots

代碼:
General → Advanced → Snapshot folder → “/mnt/vb_w7/Windows 7”

A final check of the virtual disk size:

代碼:
# /opt/bin/VBoxManage showhdinfo /mnt/vb_w7/Win_7.vdi
UUID:         14a33a14-cac3-4e5b-ae13-72f33be7181b
Accessible:      yes
Logical size:     102400 MBytes
Current size on disk: 19669 MBytes
Type:         normal (base)
Storage format:    VDI
Format variant:    dynamic default
Location:       /mnt/vb_w7/Win_7.vdi

Step 6:
Extend the hard disk space in W7

Start the virtual machine to boot into Windows 7 on the newly attached VDI. 

代碼:

Go to Start–>Control Panel–>Administrative Tools–>Computer Management In Computer Management–>Disk Management,
choose your system drive(Boot), right click on it and choose "Extend Volume"

_________________


網(wǎng)頁(yè)名稱:虛擬機(jī)磁盤移動(dòng)位置后失效解決辦法-創(chuàng)新互聯(lián)
瀏覽地址:http://weahome.cn/article/gcggj.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部