IPB

Bienvenue invité ( Connexion | Inscription )

 
Reply to this topicStart new topic
> [résolu] modifier taille disque .VDI dans VirtualBox, ça veut pas …
Options
radioman
posté 5 Jul 2014, 13:05
Message #1


Macbidouilleur d'Or !
*****

Groupe : Membres
Messages : 5 984
Inscrit : 30 Sep 2002
Lieu : Limoges
Membre no 3 870



Bonjour
Mon "disque dur" de ma machine virtuelle sous VirtualBox est quasi plein (20 Go)
j'essaie d'appliquer les commandes trouvée dans le mode d'emploi pour le passer à 30 Go mais ça veut pas :
Code
vboxmanage list hdds
me donne bien l'UUID du disque
Code
vboxmanage modifyhd 0bc6a5d6-9739-420e-baa9-d3cd3d1c5d57 resize 30000
me dit Invalid parameter 'resize'


le mode d'emploi:
Citation
8.23 VBoxManage modifyhd
With the modifyhd command, you can change the characteristics of a disk image after it has been created:
Note: For compatibility with earlier versions of VirtualBox, the “showvdiinfo” com- mand is also supported and mapped internally to the “showhdinfo” command.
Note: For compatibility with earlier versions of VirtualBox, the “createvdi” command is also supported and mapped internally to the “createhd” command.
VBoxManage modifyhd
<uuid|filename>
[--type normal|writethrough|immutable|shareable|
readonly|multiattach]
[--autoreset on|off]
[--compact]
[--resize <megabytes>|--resizebyte <bytes>]
141
8 VBoxManage
Note: Despite the “hd” in the subcommand name, the command works with all disk images, not only hard disks. For compatibility with earlier versions of VirtualBox, the “modifyvdi” command is also supported and mapped internally to the “modifyhd” com- mand.
The disk image to modify must be specified either by its UUID (if the medium is registered) or by its filename. Registered images can be listed by VBoxManage list hdds (see chapter 8.4, VBoxManage list, page 122 for more information). A filename must be specified as valid path, either as an absolute path or as a relative path starting from the current directory.
The following options are available:
• With the --type argument, you can change the type of an existing image between the normal, immutable, write-through and other modes; see chapter 5.4, Special image write modes, page 85 for details.
• For immutable (differencing) hard disks only, the --autoreset on|off option determines whether the disk is automatically reset on every VM startup (again, see chapter 5.4, Special image write modes, page 85). The default is “on”.
• With the --compact option, can be used to compact disk images, i.e. remove blocks that only contains zeroes. This will shrink a dynamically allocated image again; it will reduce the physical size of the image without affecting the logical size of the virtual disk. Com- paction works both for base images and for diff images created as part of a snapshot.
For this operation to be effective, it is required that free space in the guest system first be zeroed out using a suitable software tool. For Windows guests, you can use the sdelete tool provided by Microsoft. Execute sdelete -z in the guest to zero the free disk space before compressing the virtual disk image. For Linux, use the zerofree utility which supports ext2/ext3 filesystems. For Mac OS X guests, use the Erase Free Space feature of the built-in Disk Utility. Use Zero Out Data there.
Please note that compacting is currently only available for VDI images. A similar effect can be achieved by zeroing out free blocks and then cloning the disk to any other dynamically allocated format. You can use this workaround until compacting is also supported for disk formats other than VDI.
• The --resize x option (where x is the desired new total space in megabytes) allows you to change the capacity of an existing image; this adjusts the logical size of a virtual disk without affecting the physical size much.3 This currently works only for VDI and VHD formats, and only for the dynamically allocated variants, and can only be used to expand (not shrink) the capacity. For example, if you originally created a 10G disk which is now full, you can use the --resize 15360 command to change the capacity to 15G (15,360MB) without having to create a new image and copy all data from within a virtual machine. Note however that this only changes the drive capacity; you will typically next need to use a partition management tool inside the guest to adjust the main partition to fill the drive.


une petite idée de ce qui bloque ?

j'ai essayé en bytes

Code
vboxmanage modifyhd 0bc6a5d6-9739-420e-baa9-d3cd3d1c5d57 resizebyte 32212254720


mais ça veut pas non plus .

Ce message a été modifié par radioman - 6 Jul 2014, 10:33.


--------------------

 MacBook Pro 16" core I9 (2020) type 16.1 / 2,3 Ghz / 32 Go / 1To / Big Sur 11.6.1 (depuis la sortie de Monterey)
 Imac Alu 24" core 2 duo (mid 2007) type 7,1 / 2,4 Ghz / 4 Go / SSD Crucial C300 256 Go Samsung 840 EVO 512 Go / El Capitan 10.11.6
 Imac G4 800 15" (2002) type 4,2 60 Go 80Go 7200tr / 768 Mo / Pioneer DVR 104 111D / Tiger 10.4.11
 SSD externe M2 FireCuda 520 2To test Monterey / Time Machine MBP 16
 DD externe 4 To Time Machine MBP 16
 DD externe 2 To Big Sur Beta bidouilles
 DD externe AluICE 500 Go Time Machine iMac 24
 Dock "Freecom" + DD Bidouilles 10.4 / 10.5 / 10.6 / 10.7 / 10.8 / 10.9 / 10.10 / 10.11 / 10.12 / 10.13 / 10.14
 Dock double "Advance Dual Easy Docking" pour cloner les disques …
 imprimante-scanner A3 Epson Workforce 7620 / iPad 2 32 Go / iPhone 8+ Red 256 Go
Go to the top of the page
 
+Quote Post
audionuma
posté 5 Jul 2014, 16:32
Message #2


Macbidouilleur d'Or !
*****

Groupe : Membres
Messages : 2 031
Inscrit : 27 Apr 2004
Membre no 18 176



Bonjour, ton disque est bien en capacité dynamique ?
Citation
This currently works only for VDI and VHD formats, and only for the dynamically allocated variants

ensuite :
Citation
Note however that this only changes the drive capacity; you will typically next need to use a partition management tool inside the guest to adjust the main partition to fill the drive

est-ce que tu es allé voir depuis l'invité quelle taille de disque est vue ?

Ce message a été modifié par audionuma - 5 Jul 2014, 16:33.


--------------------
Membre du club des AIPBP (Anciens Inscrits Pas Beaucoup de Posts) Voir la liste
Futur ex-macbidouilleur, sous Dell / Ubuntu depuis 2021 !
Go to the top of the page
 
+Quote Post
radioman
posté 5 Jul 2014, 18:13
Message #3


Macbidouilleur d'Or !
*****

Groupe : Membres
Messages : 5 984
Inscrit : 30 Sep 2002
Lieu : Limoges
Membre no 3 870



c'est bien un .VDI et il est vu comme un 20 Go par virtualbox


--------------------

 MacBook Pro 16" core I9 (2020) type 16.1 / 2,3 Ghz / 32 Go / 1To / Big Sur 11.6.1 (depuis la sortie de Monterey)
 Imac Alu 24" core 2 duo (mid 2007) type 7,1 / 2,4 Ghz / 4 Go / SSD Crucial C300 256 Go Samsung 840 EVO 512 Go / El Capitan 10.11.6
 Imac G4 800 15" (2002) type 4,2 60 Go 80Go 7200tr / 768 Mo / Pioneer DVR 104 111D / Tiger 10.4.11
 SSD externe M2 FireCuda 520 2To test Monterey / Time Machine MBP 16
 DD externe 4 To Time Machine MBP 16
 DD externe 2 To Big Sur Beta bidouilles
 DD externe AluICE 500 Go Time Machine iMac 24
 Dock "Freecom" + DD Bidouilles 10.4 / 10.5 / 10.6 / 10.7 / 10.8 / 10.9 / 10.10 / 10.11 / 10.12 / 10.13 / 10.14
 Dock double "Advance Dual Easy Docking" pour cloner les disques …
 imprimante-scanner A3 Epson Workforce 7620 / iPad 2 32 Go / iPhone 8+ Red 256 Go
Go to the top of the page
 
+Quote Post
radioman
posté 5 Jul 2014, 22:23
Message #4


Macbidouilleur d'Or !
*****

Groupe : Membres
Messages : 5 984
Inscrit : 30 Sep 2002
Lieu : Limoges
Membre no 3 870



bon finalement j'ai créé un nouveau disque sur lequel j'ai cloné l'ancien et , là, la commande fonctionne …

Code
mbp-de-jp:~ JP$ vboxmanage clonehd 558f6616-13e8-4436-9399-3ee5011cbc6c 0bc6a5d6-9739-420e-baa9-d3cd3d1c5d57
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 5b7ec505-7638-4c17-9b65-7b33bdd8f9f7
mbp-de-jp:~ JP$


pourquoi la commande resize ne veut pas fonctionner ohmy.gif

Edit:Arghh, le clone ne semble pas être bootable !
Edit 2: normal le clone est vide !!!
Edit 3: la commande clonehd <source><destination> me crée un troisième disque, de la taille du premier, ET VIDE ?¿?¿?¿ dry.gif

Ce message a été modifié par radioman - 6 Jul 2014, 09:58.


--------------------

 MacBook Pro 16" core I9 (2020) type 16.1 / 2,3 Ghz / 32 Go / 1To / Big Sur 11.6.1 (depuis la sortie de Monterey)
 Imac Alu 24" core 2 duo (mid 2007) type 7,1 / 2,4 Ghz / 4 Go / SSD Crucial C300 256 Go Samsung 840 EVO 512 Go / El Capitan 10.11.6
 Imac G4 800 15" (2002) type 4,2 60 Go 80Go 7200tr / 768 Mo / Pioneer DVR 104 111D / Tiger 10.4.11
 SSD externe M2 FireCuda 520 2To test Monterey / Time Machine MBP 16
 DD externe 4 To Time Machine MBP 16
 DD externe 2 To Big Sur Beta bidouilles
 DD externe AluICE 500 Go Time Machine iMac 24
 Dock "Freecom" + DD Bidouilles 10.4 / 10.5 / 10.6 / 10.7 / 10.8 / 10.9 / 10.10 / 10.11 / 10.12 / 10.13 / 10.14
 Dock double "Advance Dual Easy Docking" pour cloner les disques …
 imprimante-scanner A3 Epson Workforce 7620 / iPad 2 32 Go / iPhone 8+ Red 256 Go
Go to the top of the page
 
+Quote Post
radioman
posté 6 Jul 2014, 09:29
Message #5


Macbidouilleur d'Or !
*****

Groupe : Membres
Messages : 5 984
Inscrit : 30 Sep 2002
Lieu : Limoges
Membre no 3 870



trouvé !!!
il fallait juste garder les 2 tirets devant la commande
Code
vboxmanage modifyhd 0bc6a5d6-9739-420e-baa9-d3cd3d1c5d57--resize 30000
et non pas
Code
vboxmanage modifyhd 0bc6a5d6-9739-420e-baa9-d3cd3d1c5d57 resize 30000

mad.gif et ben non!!!

avec resize ça veut rien savoir

cà commence à me saouler cette commande de M…e

Enfin !!!!
Code
mbp-de-jp:~ JP$ vboxmanage modifyhd 558f6616-13e8-4436-9399-3ee5011cbc6c --resize 35840
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
mbp-de-jp:~ JP$


Ce message a été modifié par radioman - 6 Jul 2014, 10:34.


--------------------

 MacBook Pro 16" core I9 (2020) type 16.1 / 2,3 Ghz / 32 Go / 1To / Big Sur 11.6.1 (depuis la sortie de Monterey)
 Imac Alu 24" core 2 duo (mid 2007) type 7,1 / 2,4 Ghz / 4 Go / SSD Crucial C300 256 Go Samsung 840 EVO 512 Go / El Capitan 10.11.6
 Imac G4 800 15" (2002) type 4,2 60 Go 80Go 7200tr / 768 Mo / Pioneer DVR 104 111D / Tiger 10.4.11
 SSD externe M2 FireCuda 520 2To test Monterey / Time Machine MBP 16
 DD externe 4 To Time Machine MBP 16
 DD externe 2 To Big Sur Beta bidouilles
 DD externe AluICE 500 Go Time Machine iMac 24
 Dock "Freecom" + DD Bidouilles 10.4 / 10.5 / 10.6 / 10.7 / 10.8 / 10.9 / 10.10 / 10.11 / 10.12 / 10.13 / 10.14
 Dock double "Advance Dual Easy Docking" pour cloner les disques …
 imprimante-scanner A3 Epson Workforce 7620 / iPad 2 32 Go / iPhone 8+ Red 256 Go
Go to the top of the page
 
+Quote Post
Beavis
posté 14 Jul 2017, 11:57
Message #6


Nouveau Membre


Groupe : Membres
Messages : 2
Inscrit : 25 Feb 2009
Membre no 131 888



Bonjour bonjour, je me permets de rehausser ce topic car je suis confronté à un problème assez proche de celui de radioman.

En effet j'utilise VirtualBox pour faire tourner Ubuntu sur mon mac, mais j'ai commis l'erreur de ne lui allouer que trop peu d'espace (10Go..), en mémoire fixe.

J'ai donc décidé de créer un autre DD virtuel, en taille dynamique cette fois-ci, et d'y cloner l'ancien. C'est ici que les choses se sont compliquées pour moi : j'utilise la commande VBoxManage clonehd <chemin vers ancien disque> --existing <chemin vers nouveau disque>, trouvée sur un autre site, mais rien n'y fait ! En réponse j'ai un message d'erreur assez kilométrique auquel je dois admettre ne pas comprendre grand chose, si ce n'est qu'il y a une "syntaxe error", mais je ne sais pas laquelle...

Quelqu'un aurait-il une idée de ce que je fais mal ?
Go to the top of the page
 
+Quote Post
radioman
posté 31 Jul 2017, 13:11
Message #7


Macbidouilleur d'Or !
*****

Groupe : Membres
Messages : 5 984
Inscrit : 30 Sep 2002
Lieu : Limoges
Membre no 3 870



Citation (Beavis @ 14 Jul 2017, 12:57) *
Quelqu'un aurait-il une idée de ce que je fais mal ?


j'ai pas remis le nez dedans depuis 2014, mais d'après ce que j'ai écrit quelques messages plus haut :
Code
mbp-de-jp:~ JP$ vboxmanage clonehd 558f6616-13e8-4436-9399-3ee5011cbc6c 0bc6a5d6-9739-420e-baa9-d3cd3d1c5d57

c'est
Code
vboxmanage clonehd "UUID disque source" "UUID disque cible"

la commande …

Edit: … à tester …

Edit2: les commandes semblent différer un peu dans la version récente de VBoxManage: dans le terminal taper vboxmanage pour avoir la liste des commandes …


Ce message a été modifié par radioman - 31 Jul 2017, 13:34.


--------------------

 MacBook Pro 16" core I9 (2020) type 16.1 / 2,3 Ghz / 32 Go / 1To / Big Sur 11.6.1 (depuis la sortie de Monterey)
 Imac Alu 24" core 2 duo (mid 2007) type 7,1 / 2,4 Ghz / 4 Go / SSD Crucial C300 256 Go Samsung 840 EVO 512 Go / El Capitan 10.11.6
 Imac G4 800 15" (2002) type 4,2 60 Go 80Go 7200tr / 768 Mo / Pioneer DVR 104 111D / Tiger 10.4.11
 SSD externe M2 FireCuda 520 2To test Monterey / Time Machine MBP 16
 DD externe 4 To Time Machine MBP 16
 DD externe 2 To Big Sur Beta bidouilles
 DD externe AluICE 500 Go Time Machine iMac 24
 Dock "Freecom" + DD Bidouilles 10.4 / 10.5 / 10.6 / 10.7 / 10.8 / 10.9 / 10.10 / 10.11 / 10.12 / 10.13 / 10.14
 Dock double "Advance Dual Easy Docking" pour cloner les disques …
 imprimante-scanner A3 Epson Workforce 7620 / iPad 2 32 Go / iPhone 8+ Red 256 Go
Go to the top of the page
 
+Quote Post
papag4
posté 7 Mar 2019, 17:09
Message #8


Macbidouilleur de vermeil !
****

Groupe : Membres
Messages : 1 015
Inscrit : 25 Sep 2003
Lieu : Région Parisienne
Membre no 9 858



Bon, pour info, si cela peut aider:

pour ma part avec VirtualBox 5.2.6...
j'ai augmenté la taille du disque dur dans les "global tools" ( pour ma part de 30 à 80 Go ).
Puis pour que cela soit pris en compte j'ai utilisé l'utilitaire EaseUs Partition dans le "guest":
j'ai formaté la partie vide non pris en compte par Win7 puis j'ai "collé" cette nouvelle partition à la partition C.

et là c'est bon j'ai bien une partition de 80 Go à disposition pour cette VDI. elle est dynamique ( je pense ?) puisque dans les "global tools" elle est donnée pour 80Go pour une taille réelle de 35Go: ce qui correspond à l'utilisation pour cette VDI.

merci !


--------------------
MacPro 2012 2x2,4-6 cores avec 32Go de RAM, 5DD, et un NVME sur PCI, Radeon RX580 en 12.7.3 (OCLP 1.3.0) et MacBook Pro 13p fin2011
Et puis des PCS maintenant... l'Ipad 5mini ne sera pas remplacé (tout collé impossible à réparer) et l'iPhone SE...devenu SE3 en urgence avec bonne promo!
Go to the top of the page
 
+Quote Post
ch21
posté 7 Mar 2019, 18:09
Message #9


Macbidouilleur d'Or !
*****

Groupe : Membres
Messages : 12 334
Inscrit : 4 Nov 2003
Lieu : 21000 ou 22740
Membre no 11 306



Citation (papag4 @ 7 Mar 2019, 17:09) *
et là c'est bon j'ai bien une partition de 80 Go à disposition pour cette VDI. elle est dynamique ( je pense ?) puisque dans les "global tools" elle est donnée pour 80Go pour une taille réelle de 35Go: ce qui correspond à l'utilisation pour cette VDI.

merci !


C'est ça, elle est dynamique.
Il suffit pour t'en convaincre de regarder sa taille dans le Finder. Tu verras qu'elle correspond à la "taille réelle"


--------------------
de l'Apple IIGS (1987) en GS/OS System 6.0.1 au MBP (2012) en Mojave et Mac Mini I7 (2012) en Mojave et Ventura avec OCLP
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 



Nous sommes le : 19th April 2024 - 19:58