How to create vmdk image file and use it as usb device with the help of qemu-img and qemu-utils tool
## Create vmdk file
```sudo apt install qemu-img
sudo qemu-img create -f vmdk virtual_usb_system_installer.vmdk 4G
```
> Or you could go to File->Virtual Media Manager to create a new vmdk file, it even supports disk resize.
## Mount it as usb folder so `etcher` can use it to create a system-installer-in-usb
```
sudo apt install qemu-utils
sudo modprobe nbd
> Or you could go to File->Virtual Media Manager to create a new vmdk file, it even supports disk resize.
## Mount it as usb folder so `etcher` can use it to create a system-installer-in-usb
```
sudo apt install qemu-utils
sudo modprobe nbd
sudo qemu-nbd -r -c /dev/nbd1 virtual_usb_system_installer.vmdk
```
## Use it as the boot-loader in virtualbox
https://yingshaoxo.blogspot.com/2023/04/how-to-use-usb-pe-operation-system-in.html
```
qemu-img convert -f vmdk virtual_usb_system_installer.vmdk -O vdi virtual_usb_system_installer.vdi
qemu-img convert -f vmdk virtual_usb_system_installer.vmdk -O vdi virtual_usb_system_installer.vdi
```