IMPORT a Virtual Machine Template (OVA, VMDK, RAW, ...) into Proxmox!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so a lot of companies provide software as a virtual Appliance an image for a virtual machine that might be an OVA package or a raw disk image or a vmdk or something like that in any case we need to get that file into proxmox as a disk for our virtual machine and here's how today I have a proximox system version 7.211 and I would like to import a micro tick Cloud hosted router and I chose the CHR because it's available in so many different image formats for the same image so we can do the vmdk we could do the OVA or the raw disk image all three of these are possible to import into proxmox and we can show the process for all three so before we can import anything the first thing we need to do is actually create a virtual machine so we're going to go through this make a router you can set the options however you'd like we're not going to set a CD drive and when it comes to disks you can basically set whatever you want here because we're going to delete it later so I'll set it 10 CFS but we're going to delete this anyway so it doesn't matter where you put here you just have to put something to make the wizard happy two pours the ram and Network so now that the VM is created we can detach and delete the hard disk we created so we'll start by detaching it now it'll show up as unused disk and once it's unused we can remove it there we go so now the VM has no disk we can even delete this CD-ROM attachment too so now we need to get our virtual Appliance imported as a disk so we can add it to our virtual machine so coming to the Shell here we need to download the file one option you have is to download it to an existing data store so like for example I could go to ISO images and click download from URL and it would end up in my isos folder the other option is to just put it in the root user's home directory which then it says is slash root if you have enough space on your root partition you can just put it here and delete it later that's what I'm going to do so I'm going to start with the OVA since it's the most complicated I'm going to use router OS 7.6 stable so I need the URL so I'm going to right click on that and say copy link so over here I'm going to W get it if you get paste there we go done so let's see what file we got so we got CHR 7.6.0 VA so the OVA file is actually just hard and it's not even gzipped it's just hard so we can extract that using tar minus x v f so tar Dash xcf and the file name and it says we got three files the ovf the MF and the vmdk so the obf if we cap that is an XML file that describes the system so in this case proxmox isn't going to be able to read the ovf so we're going to have to import the sort of configuration manually so the MF file is also just check Subs which might be useful for you if you want to verify them but I have faith that this was downloaded correctly so the vmdk that is the actual disk image and so now we're going to import the disk image so now we've extracted the disk image from the OVA and we can import it like any other raw disk image in this case with the vmdk format so let's jump ahead and how we import disks into proxbox so now that we have our disk image file in a vmdk format this will also work with raw and qcau2 formats if you have one of those we need to import it and the command we use for that is qm so qm is one of the management commands from proxbox and there's a qm command called import disk and this is what we're going to use so we're going to take this disk file and tell it to import it as an external disk into a VM so we need to give it the VM ID which we've already created file that we have and the storage location we're going to add it to so in this case it can be an image file or a raw file or a vmdk or a qcat 2 all of those will work we have one option and that's what format we should put the resulting file as and if you're using ZFS or lvm or a block based storage device this doesn't matter at all this can use native ZFS block devices or native lvm devices if you're using a file based storage like NFS or Samba or ext4 or something like that then you need to pass this target format which can either be qcat 2 raw or vmdk and in most cases in proxmox you're going to want qcat 2. if you're using file based storage in my case I'm using ZFS so I'm going to leave out the format argument so come back here we see the file we have is called CHR 7.6. disk one so we're going to qm import disk we're going to import it to vm202 the file name is CHR Dash 7.6 disk one Dot vmdk and the storage location I wanted to go in is local ZFS so of course you need to know what storage location you have in proxbox and I'm not going to give it a format argument because ZFS has native block devices so I don't need to well I spelled it wrong there we go so now we have imported the disk into proxmox now it is going to show up under local ZFS so vm2 do disk zero pretty darn tiny but it's not yet attached to the VM so once you've imported the vmdk you don't need any of the files anymore that were used to create it so we can remove the vmdk the OVA all of those files and get rid of them now the VM has been imported it's in proxbox's storage system no need for the origin anymore so we tagged it as being part of vmid 202 but we haven't told it how to attach that yet so if we go here we see unused disk local ZFS vm202 disk 0. so this disk it knows belongs to vm202 but it's not sure how to attach it yet so we could reassign it to a different VM so now to get it mounted in the VM we just double click on it and we add unused disk so you can choose what bus you want to use I'm going to use SATA that's a pretty good option SSD emulation and discard are usually pretty good options to use let's add that size 128 Megs another option you have here is to resize it if you want to make it bigger so we could say resize it by one gig so at this point we've added the disk but we didn't tell that it's bootable so we have to go down here to options and boot order and you see Net Zero is the only only bootable device so we have to add our new Drive say to zero and move to the top so it doesn't try to net boot on us there we go it should boot so now if we just want this one BM here we could boot it up that would be the end of the story or we can turn into a template so we right click on the VM and say convert to template yes then we're done so now this is a template and it has a different icon because it's a template so now if we want to make new versions of the CHR router we can just click clone so we want to make this name 203 so if we make a full clone then we can choose a new location for the disk and all that stuff if we make a linked clone then the VM disk is still linked to the source so we can't change the location because they're going to share the source file and just modifications to the disk will be stored for this clone of the template so I have a new clone of my template it's based on 202 disk 0 but it has its own disk 0 . it's good to go so now when I start it so I'd resize the disk to fill the whole space and now we have a login so hopefully you guys didn't mind the shorter topic this week I'm actually on vacation for Thanksgiving so I filmed this before I left just want to keep continuity on the channel don't like going offline for too long got some nice big projects coming up soon hopefully you can stay tuned for those so like And subscribe to see more of my future content if you want to read the commands or copy and paste them there's a blog post in the description below that has all that if you want to chat with me about this or anything else proxmox related feel free to jump into my Discord server also link down below for that so as always I'll see you on the next adventure
Info
Channel: apalrd's adventures
Views: 31,965
Rating: undefined out of 5
Keywords:
Id: k6-miz1Tb80
Channel Id: undefined
Length: 9min 22sec (562 seconds)
Published: Thu Dec 01 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.