libvirt:virt-install
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| libvirt:virt-install [2025/09/04 16:25] – created jonathan | libvirt:virt-install [2025/09/23 19:21] (current) – jonathan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== virt-install - iscsi ===== | ==== virt-install - iscsi ===== | ||
| - | < | + | < |
| + | virt-install --name squid \ | ||
| + | --memory 8192 --vcpus 4 --cpu host-passthrough | ||
| + | --os-variant ubuntu24.04 --virt-type kvm \ | ||
| + | --disk path=/ | ||
| + | --cdrom / | ||
| + | --network network=vlan222, | ||
| + | --graphics vnc --channel unix, | ||
| + | --controller type=usb, | ||
| + | --controller type=scsi, | ||
| + | --controller type=sata --controller type=virtio-serial \ | ||
| + | --rng / | ||
| + | </ | ||
| + | |||
| + | <code -- virt-install with ISCSI> | ||
| virt-install --name myFirstVM \ | virt-install --name myFirstVM \ | ||
| --memory 4096 --vcpus 4 --cpu host-passthrough | --memory 4096 --vcpus 4 --cpu host-passthrough | ||
| Line 12: | Line 26: | ||
| --controller type=sata --controller type=virtio-serial \ | --controller type=sata --controller type=virtio-serial \ | ||
| --rng / | --rng / | ||
| + | </ | ||
| + | |||
| + | <code -- virt-install with CLOUD-INIT> | ||
| + | virt-install --name MyFirstVM \ | ||
| + | --memory 4096 --vcpus 4 --cpu host-passthrough | ||
| + | --os-variant ubuntu24.04 --virt-type kvm \ | ||
| + | --disk path=/ | ||
| + | --network bridge=br0, | ||
| + | --network network=ovsbr0, | ||
| + | --cloud-init user-data=/ | ||
| + | --graphics none \ | ||
| + | --console pty, | ||
| + | --noautoconsole | ||
| + | </ | ||
| + | |||
| + | |||
| + | <code -- uefi> | ||
| + | virt-install --name xrv9k \ | ||
| + | --memory 16384 --vcpus 4,cores=1 --cpu host-passthrough | ||
| + | --virt-type kvm \ | ||
| + | --osinfo detect=on, | ||
| + | --boot uefi, | ||
| + | --disk path=/ | ||
| + | --network network=ovsbr0, | ||
| + | --graphics vnc --channel unix, | ||
| + | --controller type=usb, | ||
| + | --controller type=sata --controller type=virtio-serial \ | ||
| + | --rng / | ||
| + | </ | ||
| + | |||
| + | <code -- / | ||
| + | # | ||
| + | hostname: MyFirstVM | ||
| + | users: | ||
| + | - name: user1 | ||
| + | ssh-authorized-keys: | ||
| + | - ssh-ed25519 < | ||
| + | sudo: ALL=(ALL) NOPASSWD: | ||
| + | shell: /bin/bash | ||
| + | lock-passwd: | ||
| + | |||
| + | - name: root | ||
| + | ssh-authorized-keys: | ||
| + | - ssh-ed25519 < | ||
| + | sudo: ALL=(ALL) NOPASSWD: | ||
| + | shell: /bin/bash | ||
| + | lock-passwd: | ||
| + | |||
| + | ssh_pwauth: True | ||
| + | |||
| + | chpasswd: | ||
| + | users: | ||
| + | - name: root | ||
| + | password: < | ||
| + | - name: user1 | ||
| + | password: < | ||
| + | expire: false | ||
| + | </ | ||
| + | |||
| + | <code -- / | ||
| + | # | ||
| + | network: | ||
| + | version: 2 | ||
| + | ethernets: | ||
| + | enp1s0: | ||
| + | dhcp4: no | ||
| + | dhcp6: no | ||
| + | accept-ra: no | ||
| + | addresses: [192.168.31.178/ | ||
| + | nameservers: | ||
| + | addresses: [1.0.0.1, | ||
| + | routes: | ||
| + | - to: 0.0.0.0/0 | ||
| + | via: 192.168.31.152 | ||
| + | - to: 10.0.0.0/8 | ||
| + | via: 192.168.31.1 | ||
| + | - to: 172.0.0.0/ | ||
| + | via: 192.168.31.1 | ||
| + | - to: 192.168.0.0/ | ||
| + | via: 192.168.31.1 | ||
| + | enp2s0: | ||
| + | dhcp4: no | ||
| + | dhcp6: no | ||
| + | accept-ra: no | ||
| + | addresses: [192.168.30.5/ | ||
| </ | </ | ||
libvirt/virt-install.1757003139.txt.gz · Last modified: by jonathan
