Hello,
I have a question regarding the
For example, I import a Linux VM from VMWare
On first boot of the VM, I need to access the efi/bios to properly set the boot file (unless there is some other magic that I am unaware of?). Easy enough, but I have a large number of Ubuntu (as well as other LInux VMs kali/debian/etc) created from 'master' templates. Once I have performed the first boot, and saved the boot information, i can:
I now have an efidisk that has the 'boot information' saved.
If I import another VM based on the same 'master' template:
I can now 'import' the efidisk as follows, the VM will boot without me having to manually configure the efi/bios option
When I attempt to include
Is there a reason we can't pass
Thanks,
Mike
I have a question regarding the
qm import
command. When importing Linux VMs from a VMWare environment, an efidisk0 is created as part of the import process. For example, I import a Linux VM from VMWare
qm import 200 esx01:ha-datacenter/sto01-PROD/MM01-Ubuntu-Linux/MM01-Ubuntu-Linux.vmx --storage ceph_pool_ssd
transferred 0.0 B of 528.0 KiB (0.00%)
transferred 528.0 KiB of 528.0 KiB (100.00%)
transferred 528.0 KiB of 528.0 KiB (100.00%)
efidisk0: successfully created disk 'ceph_pool_ssd:vm-200-disk-0,efitype=4m,size=1M'
create full clone of drive (esx01:ha-datacenter/sto01/MM01-Ubuntu-Linux/MM01-Ubuntu-Linux.vmdk)
transferred 0.0 B of 20.0 GiB (0.00%)
transferred 206.8 MiB of 20.0 GiB (1.01%)
...
transferred 20.0 GiB of 20.0 GiB (100.00%)
scsi0: successfully created disk 'ceph_pool_ssd:vm-200-disk-1,size=20G'
On first boot of the VM, I need to access the efi/bios to properly set the boot file (unless there is some other magic that I am unaware of?). Easy enough, but I have a large number of Ubuntu (as well as other LInux VMs kali/debian/etc) created from 'master' templates. Once I have performed the first boot, and saved the boot information, i can:
rbd export ceph_pool_ssd/vm-200-disk-0 /tmp/vm-200-disk-0.raw
I now have an efidisk that has the 'boot information' saved.
If I import another VM based on the same 'master' template:
qm import 201 esx01:ha-datacenter/sto01-PROD/MM02-Ubuntu-Linux/MM02-Ubuntu-Linux.vmx --storage ceph_pool_ssd
transferred 0.0 B of 528.0 KiB (0.00%)
transferred 528.0 KiB of 528.0 KiB (100.00%)
transferred 528.0 KiB of 528.0 KiB (100.00%)
efidisk0: successfully created disk 'ceph_pool_ssd:vm-201-disk-0,efitype=4m,size=1M'
create full clone of drive (esx01:ha-datacenter/sto01/MM02-Ubuntu-Linux/MM02-Ubuntu-Linux.vmdk)
transferred 0.0 B of 20.0 GiB (0.00%)
transferred 206.8 MiB of 20.0 GiB (1.01%)
...
transferred 20.0 GiB of 20.0 GiB (100.00%)
scsi0: successfully created disk 'ceph_pool_ssd:vm-200-disk-1,size=20G'
I can now 'import' the efidisk as follows, the VM will boot without me having to manually configure the efi/bios option
qm set 201 --delete efidisk0 --force
update VM 201: -delete efidisk0 -force 1
Removing image: 100% complete...done.
qm set 201 --efidisk0 file=ceph_pool_ssd:0,efitype=4m,import-from=/tmp/vm-200-disk-0.raw,pre-enrolled-keys=0,format=raw
update VM 201: -efidisk0 file=ceph_pool_ssd:0,efitype=4m,import-from=/tmp/vm-200-disk-0.raw,pre-enrolled-keys=0,format=raw
transferred 0.0 B of 1.0 MiB (0.00%)
transferred 1.0 MiB of 1.0 MiB (100.00%)
transferred 1.0 MiB of 1.0 MiB (100.00%)
efidisk0: successfully created disk 'ceph_pool_ssd:vm-201-disk-0,efitype=4m,pre-enrolled-keys=0,size=1M'
When I attempt to include
import-from
in the --efidisk0 file=
option for qm import
qm import 201 esx01:ha-datacenter/sto01-PROD/MM01-Ubuntu-Linux/MM01-Ubuntu-Linux.vmx
--storage ceph_pool_ssd --efidisk file=ceph_pool_ssd:0,efitype=4m,import-from=/tmp/vm-200-disk-0.raw,pre-enrolled-keys=0,format=raw
400 Parameter verification failed.
efidisk0: invalid format - format error
efidisk0.import-from: property is not defined in schema and the schema does not allow additional properties
qm import <vmid> <source> --storage <string> [OPTIONS]
Is there a reason we can't pass
import-from
to qm import
? Obviously not difficult to script around, but still curious!Thanks,
Mike