Ich verwende kvm, um die virtuelle Maschine zu installieren. Anschließend wird das Image hochgeladen, um die Instanz der virtuellen OpenStack-Maschine zu erstellen. Das Fließen sind meine Befehle
befehl 1. Bild erstellen
$ qemu-img create -f qcow2 ubuntu.img 20G
befehl 2. install virtual machine die ubuntu-14.04-server-AMD64.iso befindet sich im aktuellen verzeichnis.
$ kvm -cdrom ubuntu-14.04-server-AMD64.iso -drive file=ubuntu.img,if=virtio,index=0 -boot d -net nic -Net User
Aber bei der Installation der virutalen Maschine. Es berichtet
mount: mounting /dev/vda on /media failed: Invalid argument
unmount: can't unmount /media: Invalid argument
mount: mounting /dev/fd0 on /media failed: No such device or address
Und am Ende berichtete es:
show ls /dev
$ ls /dev
autofs hwrng loop1 nbd2 ram12 shm tty21 tty41 tty61 ttyS22 vcs1
block i2c-0 loop2 nbd3 ram13 snapshot tty22 tty42 tty62 ttyS23 vcs2
bsg i2c-1 loop3 nbd4 ram14 snd tty23 tty43 tty63 ttyS24 vcs3
btrfs-control i2c-10 loop4 nbd5 ram15 sr0 tty24 tty44 tty7 ttyS25 vcs4
bus i2c-11 loop5 nbd6 ram2 stderr tty25 tty45 tty8 ttyS26 vcs5
cdrom i2c-12 loop6 nbd7 ram3 stdin tty26 tty46 tty9 ttyS27 vcs6
char i2c-13 loop7 nbd8 ram4 stdout tty27 tty47 ttyprintk ttyS28 vcsa
console i2c-14 loop-control nbd9 ram5 tty tty28 tty48 ttyS0 ttyS29 vcsa1
core i2c-2 mapper ndctl0 ram6 tty0 tty29 tty49 ttyS1 ttyS3 vcsa2
cpu i2c-3 mcelog net ram7 tty1 tty3 tty5 ttyS10 ttyS30 vcsa3
cpu_dma_latency i2c-4 media0 network_latency ram8 tty10 tty30 tty50 ttyS11 ttyS31 vcsa4
cuse i2c-5 mei0 network_throughput ram9 tty11 tty31 tty51 ttyS12 ttyS4 vcsa5
disk i2c-6 mem null random tty12 tty32 tty52 ttyS13 ttyS5 vcsa6
dri i2c-7 memory_bandwidth port rfkill tty13 tty33 tty53 ttyS14 ttyS6 vfio
ecryptfs i2c-8 nbd0 ppp rtc tty14 tty34 tty54 ttyS15 ttyS7 vga_arbiter
fb0 i2c-9 nbd1 psaux rtc0 tty15 tty35 tty55 ttyS16 ttyS8 vhci
fb1 input nbd10 ptmx sda tty16 tty36 tty56 ttyS17 ttyS9 vhost-net
fd kfd nbd11 pts sda1 tty17 tty37 tty57 ttyS18 uhid video0
full kmsg nbd12 ram0 sda2 tty18 tty38 tty58 ttyS19 uinput zero
Fuse kvm nbd13 ram1 sda5 tty19 tty39 tty59 ttyS2 urandom
hidraw0 log nbd14 ram10 sg0 tty2 tty4 tty6 ttyS20 v4l
hpet loop0 nbd15 ram11 sg1 tty20 tty40 tty60 ttyS21 vcs
Wie kann ich das Problem beheben und die virtuelle Maschine installieren?
Das Hauptproblem besteht darin, dass das von Ihnen erstellte virtuelle Laufwerk nicht formatiert ist, sondern nur ein unformatiertes Laufwerk ohne Partitionstabelle. Ein weiteres Problem ist, dass Sie das Format qcow2
Ausgewählt und eine IMG-Datei erstellt haben. Sie müssen diesen Befehl ausführen: qemu-img create -f qcow2 ubuntu.qcow2 20G
.
Laden Sie die neueste stabile Version von GParted Live herunter | Direkter Download-Link -> GParted 0.26.1-1
Legen Sie die ISO-Datei und das virtuelle Laufwerk ein, starten Sie von der GParted-ISO-Datei, erstellen Sie eine neue Partitionstabelle, erstellen Sie neue Partitionen und formatieren Sie sie. Hier finden Sie eine Präsentation zum Vorbereiten einer Festplatte .
Dies ist ein erweiterter Hinweis, es reicht aus, die Partitionstabelle zu erstellen und mit ext4
Zu formatieren.
kvm -hda ubuntu.qcow2 -cdrom gparted-live-0.26.1-1-AMD64.iso -boot d -enable-kvm
Nachdem der Vorgang abgeschlossen ist, schließen Sie (Ausschalten) GParted Live, um die virtuelle Maschine herunterzufahren. Legen Sie nun das Installationsmedium für Ubuntu Server 14.04 ein und starten Sie die Installation des Systems.
kvm -hda ubuntu.qcow2 -cdrom ubuntu-14.04-server-AMD64.iso -boot d -enable-kvm
Hinweis: Dies sind die grundlegenden Befehle: Wählen Sie die Pfade aus, in denen sich die Dateien befinden, und fügen Sie zusätzliche Startoptionen hinzu, die Ihren Anforderungen entsprechen, z. B. die Speicherkapazität (-m 8192
).