![]() STEP 5) Use parted to resize the partition. We use openssh client to connect to our server. Or just use the web browser and start the virtual server from WebVirtMgr if it is what you use. Qemu-system-x86_64 -enable-kvm -smp 4,maxcpus=8 -daemonize -vnc :30 -cdrom /mnt/vm/isos/CentOS-7-x86_64-Minimal-1810.iso -drive file=/mnt/vm/images/templatesrv-wordpress.bin,cache=none,aio=threads,if=virtio -boot c -net nic,model=virtio,macaddr=00:00:00:00:00:30 -net tap,ifname=tap30,script=no,downscript=no -balloon virtio -m 8144 -monitor telnet:127.0.0.1:5830,server,nowait * Manual start of QEMU emulator – qemu-system-x86_64: Start your server by issuing a command with virsh or QEMU (qemu-system-x86_64) or from a web interface if use one (like WebVirtMgr). Qemu-img resize my-private-vm-01.img +174GB We want to increse the size with 174GB to 200GB. STEP 2) Resize the image file of the virtual server.įind where are located the virtual servers’ image files in your installation and use qemu-img. If you use a web interface (for example WebVirtMgr) check whether the virtual server is in power-off state. QEMU 2.0.0 monitor - type 'help' for more information If you use QEMU manually wait for the process to exit or if you have enabled the management console connect to it using telnet and just quit – this will destory the QEMU virtual server process – again be careful with unsaved ~]# ps axuf|grep qemu But it is dangerous for your data if you issue it on a running virtual server, because it may lose the unsaved data. The destroy command ensures there is no QEMU process, which still operates over the image disk file. It is almost certain if the VNC port is released, the QEMU process has been exited. Be careful to check whether the host server killed the QEMU process. The best way is to power it off within the server with the “poweroff” command. Use parted to resize the partition (and fix the GPT of the disk – not the disk is larger, so the GPT table need fixing).Get a root ssh shell (probably by using openssh). ![]() Resize with qemu-img the raw image of the virtual server.Our setup is a QEMU virtual server using a raw image of 20G and the steps are as follow: Of course, you can use this article as an example of expanding the partitions of a physical disk. ![]() This article is to show how easy is to grow the size of QEMU virtual disk and its partitions (along with ext4 file system).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |