Adding an existing virtual disk image

C

caracolla

Guest
Hi, I haven't found a way to add an existing virtual disk image to a VM via web ui
Is this feature (working in 1.x) planned?
 
you need to move/copy the file to the right storage via CLI or SCP tools (like winscp if you are on windows).

as soon as the files are there, you can add them via GUI to VM (1.9 and also on 2.0).
 
you need to move/copy the file to the right storage via CLI or SCP tools (like winscp if you are on windows).
as soon as the files are there, you can add them via GUI to VM (1.9 and also on 2.0).
The web UI does not "see" the image in the local storage (example in '/var/lib/vz/images/100' ).
With Add->Hard Disk procedure, the UI does not allow to choose the already existing image file
 
hi,
just create a new image with proper properties(qcow,raw,virtio...)
copy your image to the /mnt/pve/SOMETHING/images/100/ folder (if 100 is your vmid)
and than rename your image
"mv oldimage.img vm-100-disk-1.qcow2"
 
hi,
just create a new image with proper properties(qcow,raw,virtio...)
copy your image to the /mnt/pve/SOMETHING/images/100/ folder (if 100 is your vmid)
and than rename your image
"mv oldimage.img vm-100-disk-1.qcow2"

Please read my previous answer. The web UI does not see the existing image file
 
works here. maybe wrong permissions?
 
works here. maybe wrong permissions?
Just changed permission of the raw image fille to 666, same negative result.
Maybe I have completely misunderstood the interface.
Here is a screen shot for Add->Hard Disk window

hd.jpg

It seems not possible to pick an image file from a list.

Here is a screenshot from a 1.9 server:

hdOld.jpg
In the 2.0 beta2 the section 'Use an existing virtual disk' is completely missing
 
see this screenshot - should look like this. but there seems to be an issue, will dig deeper.

unused-disks.png
 
It seems to me that I can only add the disk to the same machine I previously removed it from. What if I want to add it to another virtual machine ? Do I need to do it from CLI ?
 
The linked issue above https://bugzilla.proxmox.com/show_bug.cgi?id=57 is actually not the same problem as this query the way I see it.

The linked issue is asking to import large files from a particular storage device into Proxmox. The question here I think is different, it's asking for a GUI option to 'attach' an existing image to a new or existing VM.

In my case I have a large VM from another installation on a drive that I would like to attach (not import). It would be faster than restoring from backup - which I guess I'll have to do since there's no 'attach existing image' option. There's probably a command line option, just not sure how that will 'see' the image in ZFS yet - ZFS is still a bit spooky to me how files don't show up in command line. :D
 
I found how to attach the disk with a combination of the GUI and console.
1 Make sure you have a VM created with the same ID as the ID used on the disk. (I assume you can just rename the disk file name too if you have access to it). So if you have vm-100-disk-2 then you need a VM created with ID of 100.
2 Then do a qm rescan in the console of the Proxmox server.
3 Then the disks show up magically as unused disks in the GUI, under the hardware option within the specific VM
4 Then click edit on them, make sure they look right and click OK.
All done.
 
Should also add, in my case since I had two disks I had to reset the boot order. Done under VM, Options, Boot Order
 
  • Like
Reactions: somla
Buenos dias, como puedo ubicar el directorio de un disco en un sistema zfs, quisiera recuperar un disco respaldado pero con otro numero de VM, y para ello necesitaria cambiarle el nombre, me explico? Saludos.
 
I found how to attach the disk with a combination of the GUI and console.
1 Make sure you have a VM created with the same ID as the ID used on the disk. (I assume you can just rename the disk file name too if you have access to it). So if you have vm-100-disk-2 then you need a VM created with ID of 100.
2 Then do a qm rescan in the console of the Proxmox server.
3 Then the disks show up magically as unused disks in the GUI, under the hardware option within the specific VM
4 Then click edit on them, make sure they look right and click OK.
All done.
Just to say thanks, you have saved me probably a couple hours and a bunch of data.
 
I found how to attach the disk with a combination of the GUI and console.
1 Make sure you have a VM created with the same ID as the ID used on the disk. (I assume you can just rename the disk file name too if you have access to it). So if you have vm-100-disk-2 then you need a VM created with ID of 100.
2 Then do a qm rescan in the console of the Proxmox server.
3 Then the disks show up magically as unused disks in the GUI, under the hardware option within the specific VM
4 Then click edit on them, make sure they look right and click OK.
All done.

qm rescan ftw!!!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!