Bobcares

Proxmox Attach Existing Disk to VM

by | Jul 3, 2023

Attaching an existing disk to a VM in Proxmox has several benefits, including space optimization or Simplified Data Management. Learn how to attach an existing disk to VM in Proxmox. Our Proxmox Support team is here to help you with your questions and concerns.

Overview
  1. Proxmox Attach Existing Disk to VM
  2. How to attach an existing disk to a VM in Proxmox?
  3. How to attach an existing disk to a VM in Proxmox CLI?
  4. Troubleshooting Tips
  5. Conclusion

Proxmox Attach Existing Disk to VM

If you are looking for a way to add an existing disk to a new VM, you are in the right place.

It involves placing the disk image in the directory that belongs to the VM. Furthermore, the disk image has to be in a format supported by Proxmox, like raw or qcow2. In case the disk image is a different format we can use qemu-img convert to convert between formats.

Proxmox Attach Existing Disk to VM

After that, we have to head to Proxmox and verify if the disk can be seen under “Hardware” as an unused disk.
However, if the Proxmox does not detect the new disk automatically, we have to update our virtual machine configuration file manually. Then, we have to add a new line as seen below at the end of the file:

unused0: local:/

For instance, if the virtual machine’s ID is 102 and the filename of the new disk image is “virtual-machine.raw”:

unused0: local:102/virtual-machine.raw

Then, we have to save the file and reopen the Hardware tab in Proxmox.

Now the new disk image will show up as an unused disk. Then, we can double-click it and configure it for use with the virtual machine.

How to attach an existing disk to a VM in Proxmox?

  1. First, we have to log in to the Proxmox web interface.
  2. Then, head to Virtual Machines or the specific node where our target VM is located.
  3. Once we locate the VM we want to attach the existing disk to, we have to select it.
  4. Now, head to the VM details view and click the Hardware tab to access the VM’s hardware configuration.
  5. Next, click the Add button to add a new device to the VM and choose Hard Disk from the list of available hardware devices.
  6. At this point, we have to choose “Use an existing disk image file” and click Next in the disk configuration dialog.
  7. Furthermore, we have to mention the path to the existing disk image file on the Proxmox storage or the storage location accessible to Proxmox.
  8. We also have to select the corresponding disk format for the existing disk image.
  9. Now it is time to configure the additional disk options.
  10. Finally, click “Finish” to save the changes.
  11. Now it is time to start the VM to access the attached disk within the guest operating system.

How to attach an existing disk to a VM in Proxmox CLI?

We must run the following steps in order to attach an existing disk to a VM in Proxmox CLI:

  1. Identify Disk Location: Find the exact path of the disk image on the Proxmox server.
  2. Create Disk Configuration: To create a new disk configuration for the VM, run the following command:
    qm config -add disk:virtio=local-lvm:/,size=,format=qcow2

    Replace with the virtual machine’s ID, with the storage name, with the path to the disk image, and with the required disk size.

  3. Start or Restart VM: To apply the changes, restart the VM.

Troubleshooting Tips

1. Check that the disk was correctly mounted and recognized by both the Proxmox VE and the VM’s operating system.

2. Verify the permissions and ownership of the disk file on the Proxmox storage.

3. Check the VM’s settings to confirm it corresponds to the intended disk arrangement.

[Need assistance with a different issue? Our team is available 24/7.] x

Conclusion

Attaching an existing disk to a VM in Proxmox has various advantages, including enhanced resource usage, simplified data management, higher performance, and increased flexibility. By maximizing the use of current hardware, you may optimize storage, cut expenses, and improve data security. In summary, our Support Techs demonstrated how to attach existing disks to VM in Proxmox.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF