Combat: Add a hard drive to the Windows system installed on a KVM virtual machine

Source: Internet
Author: User

Host is ubuntu16.04, installed KVM, and installed Windows 7 system, initially allocated hard disk space is too small, so consider adding hard disk, the specific operation record as follows.

1. Create a hard disk image with the QEMU HDD Image tool qemu-img


$CD/var/lib/libvirt/images/

$sudo qemu-img create-f qcow2 extendwin.img 10G

Check the information for the newly created image

$ qemu-img Info extendwin.img

2. Close the virtual machine

Can be turned off in the Windows operating system interface, or can be turned off with the Virsh shutdown tool

3, use in the Virsh edit the virtual machine with edit command

Find the following section

Add a new disk

<disk type= ' file ' device= ' disk ' >

<driver name= ' qemu ' type= ' Qcow2 '/>

<source file= '/var/lib/libvirt/images/extendwin.img '/>

<target dev= 'hdc' bus= 'ide'/>

</disk>

May error when saving, select "I" to forcibly save.

4. Start Windows, add new hard disks with Disk Management



The following steps are omitted.


Combat: Add a hard drive to the Windows system installed on a KVM virtual machine

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.