{"id":113,"date":"2008-03-02T01:00:02","date_gmt":"2008-03-02T04:00:02","guid":{"rendered":"http:\/\/cosiis.com\/blog\/index.php\/archives\/113"},"modified":"2008-03-02T01:00:02","modified_gmt":"2008-03-02T04:00:02","slug":"compactar-vhd","status":"publish","type":"post","link":"http:\/\/cosiis.com\/blog\/archives\/113","title":{"rendered":"Compactar VHD"},"content":{"rendered":"<p>Despues de un tiempo de uso de\u00a0una m\u00e1quina virtual, el disco (vhd)\u00a0comienza a incrementar su tama\u00f1o y a fragmentrase. Muchas veces\u00a0puede aumentar bastante, entonces deber\u00edamos tratar de reducirlo. La respuesta\u00a0es compactar el disco virtual. Para el ejemplo tenemos un disco de 3927 MB que tiene aproximadamente 3 meses de uso.<\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1000-0.JPG\" title=\"size [1]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1000-0.thumbnail.JPG\" alt=\"size [1]\" \/><\/a><\/p>\n<p>El procedimiento para compactar un disco virtual es el siguiente:<\/p>\n<p>1) Montar el disco virtual usando la utilidad vhdmount que viene con el Virtual Server (es una opci\u00f3n cuando elegimos los componentes a instalar). La misma est\u00e1 ubicada en %progrmfiles%Microsoft Virtual ServerVhdmount. Entonces ejecutamos:<\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><strong>%programfiles%Microsoft Virtual ServerVhdmountvhdmount.exe \/m &#8220;Q:DataXP.vhd&#8221;\u00a0 G<\/strong><\/span><\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1001-2.JPG\" title=\"vhdmount\"><\/a><\/span><\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><\/span><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1001-2.JPG\" title=\"vhdmount\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1001-2.thumbnail.JPG\" alt=\"vhdmount\" \/><\/a><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1002-3.JPG\" title=\"vhdmount [2]\"><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1002-3.JPG\" title=\"vhdmount [2]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1002-3.thumbnail.JPG\" alt=\"vhdmount [2]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1003-4.JPG\" title=\"vhdmount [3]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1003-4.thumbnail.JPG\" alt=\"vhdmount [3]\" \/><\/a><\/p>\n<p>de esta forma el disco virtual estar\u00e1 montado como la unidad <strong><span style=\"color: #000000\">G:<\/span><\/strong> de nuestro sistema.<\/p>\n<p>2) Ahora podemos desfragmentarlo:<\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><strong>defrag G:<\/strong><\/span><\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><\/span><\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><\/span><\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><\/span><\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><\/span><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1005-6.JPG\" title=\"defrag [1]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1005-6.thumbnail.JPG\" alt=\"defrag [1]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1006-7.JPG\" title=\"defrag [2]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1006-7.thumbnail.JPG\" alt=\"defrag [2]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1007-8.JPG\" title=\"defrag [3]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1007-8.thumbnail.JPG\" alt=\"defrag [3]\" \/><\/a><\/p>\n<p>3) Precompactamos el disco (esta utilidad viene en las Virtual Machine Additions como <span style=\"color: #000000\"><strong>precompact.iso<\/strong><\/span>)<\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><\/span><\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><strong>precompact.exe -SetDisks:G<\/strong><\/span><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1008-9.JPG\" title=\"precompact [1]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1008-9.thumbnail.JPG\" alt=\"precompact [1]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1009-1.JPG\" title=\"precompact [2]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1009-1.thumbnail.JPG\" alt=\"precompact [2]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1010-2.JPG\" title=\"precompact [3]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1010-2.thumbnail.JPG\" alt=\"precompact [3]\" \/><\/a>\u00a0<\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1011-3.JPG\" title=\"precompact [4]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1011-3.thumbnail.JPG\" alt=\"precompact [4]\" \/><\/a><\/p>\n<p>4) Ya podemos desmontar la unidad:<\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><strong><span style=\"color: #0000ff; font-family: courier new,courier\">%programfiles%Microsoft Virtual ServerVhdmountvhdmount.exe \/u \/c &#8220;Q:DataXP.vhd&#8221;<\/span><\/strong><\/span><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1012-4.JPG\" title=\"unplug [1]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1012-4.thumbnail.JPG\" alt=\"unplug [1]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1013-5.JPG\" title=\"unplug [2]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1013-5.thumbnail.JPG\" alt=\"unplug [2]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1014-6.JPG\" title=\"unplug [3]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1014-6.thumbnail.JPG\" alt=\"unplug [3]\" \/><\/a><\/p>\n<p>5) Ahora si\u00a0compactaremos. Lo podemos hacer de\u00a03 formas, mediante un script, con el VMRC Plus o con la consola web del VIrtual Server. Solo veremos las 2 primeras.<\/p>\n<p><strong><u>Script<\/u><\/strong><\/p>\n<p>Ejecutamos el script para compactar el disco:<\/p>\n<p><span style=\"font-size: 10pt; color: #0000ff; font-family: courier new,courier\"><strong>compact.vbs Q:DataXP.vhd<\/strong><\/span><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1015-7.JPG\" title=\"compact [1]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1015-7.thumbnail.JPG\" alt=\"compact [1]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1016-8.JPG\" title=\"compact [2]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1016-8.thumbnail.JPG\" alt=\"compact [2]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1019-1.JPG\" title=\"compact [4]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1019-1.thumbnail.JPG\" alt=\"compact [4]\" \/><\/a><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1022-2.JPG\" title=\"compact [5]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1022-2.thumbnail.JPG\" alt=\"compact [5]\" \/><\/a><\/p>\n<p>Veamos ahora cuanto espacio ocupa el disco virtual:<\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1023-3.JPG\" title=\"size [2]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1023-3.thumbnail.JPG\" alt=\"size [2]\" \/><\/a><\/p>\n<p>Pasamos de\u00a03927 MB\u00a0a 3153 MB, lo cu\u00e1l es bastante considerable (casi un 20%)<\/p>\n<p><u><strong>VMRC Plus<\/strong><\/u><\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1024-4.JPG\" title=\"vmrc [1]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1024-4.thumbnail.JPG\" alt=\"vmrc [1]\" \/><\/a><\/p>\n<p>Seleccionamos la solapa <strong>Inspect<\/strong> y buscamos el disco a compactar.<\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1025-5.JPG\" title=\"vmrc [2]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1025-5.thumbnail.JPG\" alt=\"vmrc [2]\" \/><\/a><\/p>\n<p>Pulsamos el bot\u00f3n <strong>Inspect<\/strong> y veremos la informaci\u00f3n del disco.<\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1026-6.JPG\" title=\"vmrc [3]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1026-6.thumbnail.JPG\" alt=\"vmrc [3]\" \/><\/a><\/p>\n<p>En la lista desplegable seleccionamos <strong>Compact <\/strong>y luego pulsamos el bot\u00f3n <strong>Compact<\/strong>.<\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1027-7.JPG\" title=\"vmrc [4]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1027-7.thumbnail.JPG\" alt=\"vmrc [4]\" \/><\/a><\/p>\n<p>Vemos que el proceso comienza.<\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1028-8.JPG\" title=\"vmrc [5]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1028-8.thumbnail.JPG\" alt=\"vmrc [5]\" \/><\/a><\/p>\n<p>Despu\u00e9s de un rato, todo termina.<\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1029-9.JPG\" title=\"vmrc [6]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1029-9.thumbnail.JPG\" alt=\"vmrc [6]\" \/><\/a><\/p>\n<p>Volvemos a seleccionar <strong>Inspect<\/strong> para ver el resultado de todo el proceso.<\/p>\n<p><a href=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1030-1.JPG\" title=\"vmrc [7]\"><img decoding=\"async\" src=\"http:\/\/cosiis.com\/blog\/wp-content\/uploads\/2008\/03\/1030-1.thumbnail.JPG\" alt=\"vmrc [7]\" \/><\/a><\/p>\n<p>Ya sabemos que hacer cuando necesitemos disminuir el tama\u00f1o de un disco virtual.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Despues de un tiempo de uso de\u00a0una m\u00e1quina virtual, el disco (vhd)\u00a0comienza a incrementar su tama\u00f1o y a fragmentrase. Muchas veces\u00a0puede aumentar bastante, entonces deber\u00edamos tratar de reducirlo. La respuesta\u00a0es compactar el disco virtual. Para el ejemplo tenemos un disco <a class=\"more-link\" href=\"http:\/\/cosiis.com\/blog\/archives\/113\">Continue reading <span class=\"screen-reader-text\">  Compactar VHD<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,19,20],"tags":[56,61],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-tools","category-virtualserver","tag-virtual","tag-windows"],"_links":{"self":[{"href":"http:\/\/cosiis.com\/blog\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cosiis.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cosiis.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cosiis.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/cosiis.com\/blog\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":0,"href":"http:\/\/cosiis.com\/blog\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"wp:attachment":[{"href":"http:\/\/cosiis.com\/blog\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cosiis.com\/blog\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cosiis.com\/blog\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}