This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:techstuff:libvirt [2012/09/22 06:43] – nathan | public:techstuff:libvirt [2020/04/25 13:05] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Creating a VM ===== | ===== Creating a VM ===== | ||
- | ==== Basic install | + | ==== Creating an KVM VM ==== |
virt-install | virt-install | ||
Line 13: | Line 13: | ||
--disk=/ | --disk=/ | ||
- | ==== Existing image ==== | + | ==== Creating an LXC VM ==== |
+ | |||
+ | * Capped resources at 512mb of ram and 2 cpus | ||
+ | |||
+ | cd /img | ||
+ | mkdir < | ||
+ | sudo debootstrap wheezy < | ||
+ | sudo virt-install --connect lxc:/// --name cubert --ram 512 --vcpu 2 --filesystem / | ||
virt-install \ | virt-install \ | ||
- | --name <VM name> | + | |
- | --ram < | + | --name httpd_guest |
- | --disk path=/ | + | --ram 512 |
+ | --vcpus 2 | ||
+ | ==== Existing KVM image ==== | ||
+ | |||
+ | virt-install | ||
+ | | ||
+ | --ram < | ||
+ | --disk path=/ | ||
--import --noautoconsole --force | --import --noautoconsole --force | ||
Line 30: | Line 44: | ||
< | < | ||
- | * Installing to an LVM Pool instead. Replace disk line with this one. | + | * Installing to an LVM Pool instead. Replace disk line with this one. You'll end up with a volume called < |
+ | |||
+ | < | ||
+ | |||
+ | * If you want a specific name you'll need to create the volume manually first. | ||
+ | |||
+ | < | ||
+ | |||
+ | And then use this line to specify it. | ||
- | < | + | < |
===== Open Serial Console to VM ===== | ===== Open Serial Console to VM ===== |