<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Place the gparted iso file somewhere you can access it from the VM. I would recommend placing it on the Centos server that hosts the VM. I keep all my ISO files in a folder named ISOs.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I run the gnome desktop on my servers, so I use VNC to remote control the server. I would run the virt-manager gui to shut down the VM guest, connect the guest&#8217;s CD to the iso file, and change the boot options to boot from the CD. Of course, you can do all this from the command line, and I&#8217;m sure you can google information of how to do it that way.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>With gparted, I think you can backup the VM over the network to a share. So, I would first backup the VM, then resize the VM disk with gparted and make sure it boots, then backup the VM again, create a new smaller disk for the guest, and restore the smaller backup image.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> centos-virt-bounces@centos.org [mailto:centos-virt-bounces@centos.org] <b>On Behalf Of </b>Poh Yong Hwang<br><b>Sent:</b> Monday, September 20, 2010 1:25 AM<br><b>To:</b> Discussion about the virtualization on CentOS<br><b>Subject:</b> Re: [CentOS-virt] How do I reduce a disk size of a particular VM?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Hi,<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>I am trying to boot that particular VM which I want to resize using gparted ISO. May I know how can I boot a VM using a ISO file?<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Thanks!<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>YongSan<o:p></o:p></p><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>&gt;<br>&gt; On Fri, Aug 27, 2010 at 5:30 PM, Victor Padro &lt;<a href="mailto:vpadro@gmail.com">vpadro@gmail.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; On Fri, Aug 27, 2010 at 4:10 AM, Poh Yong Hwang &lt;<a href="mailto:yongsan@gmail.com">yongsan@gmail.com</a>&gt; wrote:<br>&gt;&gt; &gt; Hi,<br>&gt;&gt; &gt; But I would like the diskspace to be release to the hardware node so<br>&gt;&gt; &gt; that i&nbsp;<br>&gt;&gt; &gt; can create another VM as my hardware node is running out of diskspace. I<br>&gt;&gt; &gt; presume that using Gpart only reduce the diskspace on the VM but it will<br>&gt;&gt; &gt; not<br>&gt;&gt; &gt; be release to the hardware node?<br>&gt;&gt; &gt; Thanks!<br>&gt;&gt; &gt; YongSan<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; On Fri, Aug 27, 2010 at 4:58 PM, Victor Padro &lt;<a href="mailto:vpadro@gmail.com">vpadro@gmail.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; On Fri, Aug 27, 2010 at 3:51 AM, Poh Yong Hwang &lt;<a href="mailto:yongsan@gmail.com">yongsan@gmail.com</a>&gt;<br>&gt;&gt; &gt;&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; Hi,<br>&gt;&gt; &gt;&gt; &gt; As per subject, is there a way to reduce diskspace for a VM. I have a<br>&gt;&gt; &gt;&gt; &gt; VM<br>&gt;&gt; &gt;&gt; &gt; with 200GB but would like to reduce the diskspace to 100GB.<br>&gt;&gt; &gt;&gt; &gt; Please advise.<br>&gt;&gt; &gt;&gt; &gt; Thanks!<br>&gt;&gt; &gt;&gt; &gt; Yongsan<br>&gt;&gt; &gt;&gt; &gt; _______________________________________________<br>&gt;&gt; &gt;&gt; &gt; CentOS-virt mailing list<br>&gt;&gt; &gt;&gt; &gt; <a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>&gt;&gt; &gt;&gt; &gt; <a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Perhaps shriking the partition using gparted inside the VM?<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Otherwise I can't figure out how to shrink a raw, qcow file under KVM<br>&gt;&gt; &gt;&gt; for example...<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; --<br>&gt;&gt; &gt;&gt; Linux User #452368<br>&gt;&gt; &gt;&gt; <a href="http://twitter.com/vpadro" target="_blank">http://twitter.com/vpadro</a><br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &quot;Everything that irritates us about others can lead us to an<br>&gt;&gt; &gt;&gt; understanding of ourselves&quot;<br>&gt;&gt; &gt;&gt; _______________________________________________<br>&gt;&gt; &gt;&gt; CentOS-virt mailing list<br>&gt;&gt; &gt;&gt; <a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>&gt;&gt; &gt;&gt; <a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; _______________________________________________<br>&gt;&gt; &gt; CentOS-virt mailing list<br>&gt;&gt; &gt; <a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>&gt;&gt; &gt; <a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt;<br>&gt;&gt; What are you using to virtualize those VMs?<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; Linux User #452368<br>&gt;&gt; <a href="http://twitter.com/vpadro" target="_blank">http://twitter.com/vpadro</a><br>&gt;&gt;<br>&gt;&gt; &quot;Everything that irritates us about others can lead us to an<br>&gt;&gt; understanding of ourselves&quot;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; CentOS-virt mailing list<br>&gt;&gt; <a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>&gt;&gt; <a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; CentOS-virt mailing list<br>&gt; <a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>&gt; <a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>&gt;<br>&gt;<o:p></o:p></p></div></div><p class=MsoNormal>I can only think of creating a smaller qcow file, clonning using dd<br>the contents of the oversized qcow/raw HD to that newly qcow<br>file...although is not the best solution.<br><br>Maybe someone else could bring a better solution because there's no<br>much info on KVM just a little under Xen... :(<br><span style='color:#888888'><br><br><br>--</span><o:p></o:p></p><div><div><p class=MsoNormal>Linux User #452368<br><a href="http://twitter.com/vpadro" target="_blank">http://twitter.com/vpadro</a><br><br>&quot;Everything that irritates us about others can lead us to an<br>understanding of ourselves&quot;<br>_______________________________________________<br>CentOS-virt mailing list<br><a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br><a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></div></body></html>