|
1 | 1 | # Disk Images |
2 | 2 |
|
3 | | -The `to-disk` command creates bootable disk images from bootc containers. |
4 | | - |
5 | | -## Supported Formats |
6 | | - |
7 | | -```bash |
8 | | -# Raw disk image (default) |
9 | | -bcvk to-disk quay.io/fedora/fedora-bootc:42 output.img |
10 | | - |
11 | | -# QCOW2 (compressed, for QEMU/KVM) |
12 | | -bcvk to-disk --format qcow2 quay.io/fedora/fedora-bootc:42 output.qcow2 |
13 | | - |
14 | | -# VHD (Hyper-V, Azure) |
15 | | -bcvk to-disk --format vhd quay.io/fedora/fedora-bootc:42 output.vhd |
16 | | - |
17 | | -# VMDK (VMware) |
18 | | -bcvk to-disk --format vmdk quay.io/fedora/fedora-bootc:42 output.vmdk |
19 | | -``` |
20 | | - |
21 | | -## Configuration Options |
22 | | - |
23 | | -```bash |
24 | | -# Disk size |
25 | | -bcvk to-disk --size 50G quay.io/fedora/fedora-bootc:42 output.img |
26 | | - |
27 | | -# Filesystem type |
28 | | -bcvk to-disk --filesystem xfs quay.io/fedora/fedora-bootc:42 output.img |
29 | | -bcvk to-disk --filesystem ext4 quay.io/fedora/fedora-bootc:42 output.img |
30 | | - |
31 | | -# Partitioning scheme |
32 | | -bcvk to-disk --partition gpt quay.io/fedora/fedora-bootc:42 output.img |
33 | | -bcvk to-disk --partition mbr quay.io/fedora/fedora-bootc:42 output.img |
34 | | -``` |
35 | | - |
36 | | -## Common Use Cases |
37 | | - |
38 | | -### Cloud Deployment |
39 | | - |
40 | | -```bash |
41 | | -# AWS/GCP (raw format) |
42 | | -bcvk to-disk --format raw --size 30G quay.io/fedora/fedora-bootc:42 cloud.img |
43 | | - |
44 | | -# Azure (VHD format) |
45 | | -bcvk to-disk --format vhd --size 30G quay.io/fedora/fedora-bootc:42 azure.vhd |
46 | | -``` |
47 | | - |
48 | | -### Bare Metal |
49 | | - |
50 | | -```bash |
51 | | -# Create bootable USB/SD card image |
52 | | -bcvk to-disk --size 16G quay.io/fedora/fedora-bootc:42 usb.img |
53 | | -sudo dd if=usb.img of=/dev/sdX bs=4M status=progress |
54 | | -``` |
55 | | - |
56 | | -### Virtualization |
57 | | - |
58 | | -```bash |
59 | | -# QEMU/KVM |
60 | | -bcvk to-disk --format qcow2 quay.io/fedora/fedora-bootc:42 vm.qcow2 |
61 | | -qemu-system-x86_64 -hda vm.qcow2 -m 2048 -enable-kvm |
62 | | - |
63 | | -# VMware |
64 | | -bcvk to-disk --format vmdk quay.io/fedora/fedora-bootc:42 vm.vmdk |
65 | | - |
66 | | -# VirtualBox (requires conversion) |
67 | | -bcvk to-disk --format raw quay.io/fedora/fedora-bootc:42 vm.img |
68 | | -VBoxManage convertfromraw vm.img vm.vdi |
69 | | -``` |
| 3 | +The `to-disk` command creates disk images from bootc containers. |
| 4 | +It is a wrapper for [bootc install to-disk](https://bootc-dev.github.io/bootc/man/bootc-install-to-disk.8.html). |
0 commit comments