Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
2400f132
Commit
2400f132
authored
Jul 28, 2021
by
Francesc Guasch
Browse files
wip(doc): resize final steps
parent
84368f7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/docs/images/new_size.jpg
0 → 100644
View file @
2400f132
14.5 KB
docs/docs/resize_hard_drive_windows.rst
View file @
2400f132
...
...
@@ -121,3 +121,62 @@ Then save an exit fdisk:
Calling ioctl() to re-read partition table.
Syncing disks.
Fix the new partition
---------------------
The new partition must be checked and fixed before resize.
ntfsfix
~~~~~~~
Fix it first in the host:
.. prompt:: bash #
ntfsfix /dev/nbd1p2
chkdsk
~~~~~~~
Now we need to let the Windows virtual machine to check the drive.
First of all disconnect the device from the *nbd* to let it run in the virtual machine.
It is a good idea to remove the *nbd* module to make sure it is properly disconnected.
.. prompt:: bash #
qemu-nbd -d /dev/nbd
rmmod nbd
Boot the virtual machine, enter the *cmd* as admin and check the disk. This command
will check the disk on the next reboot. Answer yes when asked and reboot the virtual
machine. It will probaly warn you that the disk will be checked unless a key is pressed.
Do not press any key, let it continue itself. In a few seconds it will be verified.
.. ::
C:> chkdsk c; /f
Come back again to the host and tell the filesystem to resize itself to the new full size limit:
.. prompt:: bash #
modprobe nbd
qemu-nbd -c /dev/nbd1 /var/lib/libvirt/images/WindowsE10-hda.qcow2
ntfsresize /dev/nbd1p2
Disconnect again the nbd and start the virtual machine.
.. prompt:: bash #
qemu-nbd -d /dev/nbd
rmmod nbd
Check the new size
------------------
Boot the virtual machine again, go to storage properties of the PC. The new size
should be available:
.. figure:: images/resize_volume.jpg
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment